mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[IPHLPAPI]
- Tabs to spaces. No code changes. svn path=/trunk/; revision=71305
This commit is contained in:
parent
1ebef466b4
commit
f40cfb8b12
1 changed files with 23 additions and 23 deletions
|
@ -183,21 +183,21 @@ static NTSTATUS getInterfaceInfoSet( HANDLE tcpFile,
|
||||||
TDIEntityID ip_ent;
|
TDIEntityID ip_ent;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
status = getNthIpEntity( tcpFile, curInterf, &ip_ent );
|
status = getNthIpEntity( tcpFile, curInterf, &ip_ent );
|
||||||
if( NT_SUCCESS(status) )
|
if( NT_SUCCESS(status) )
|
||||||
status = tdiGetIpAddrsForIpEntity
|
status = tdiGetIpAddrsForIpEntity
|
||||||
( tcpFile, &ip_ent, &addrs, &numAddrs );
|
( tcpFile, &ip_ent, &addrs, &numAddrs );
|
||||||
for( j = 0; j < numAddrs && NT_SUCCESS(status); j++ ) {
|
for( j = 0; j < numAddrs && NT_SUCCESS(status); j++ ) {
|
||||||
TRACE("ADDR %d: index %d (target %d)\n", j, addrs[j].iae_index, infoSetInt[curInterf].if_info.ent.if_index);
|
TRACE("ADDR %d: index %d (target %d)\n", j, addrs[j].iae_index, infoSetInt[curInterf].if_info.ent.if_index);
|
||||||
if( addrs[j].iae_index ==
|
if( addrs[j].iae_index ==
|
||||||
infoSetInt[curInterf].if_info.ent.if_index ) {
|
infoSetInt[curInterf].if_info.ent.if_index ) {
|
||||||
memcpy( &infoSetInt[curInterf].ip_addr,
|
memcpy( &infoSetInt[curInterf].ip_addr,
|
||||||
&addrs[j],
|
&addrs[j],
|
||||||
sizeof( addrs[j] ) );
|
sizeof( addrs[j] ) );
|
||||||
curInterf++;
|
curInterf++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ static DWORD getNumInterfacesInt(BOOL onlyNonLoopback)
|
||||||
for( i = 0; i < numEntities; i++ ) {
|
for( i = 0; i < numEntities; i++ ) {
|
||||||
if( isInterface( &entitySet[i] ) &&
|
if( isInterface( &entitySet[i] ) &&
|
||||||
(!onlyNonLoopback ||
|
(!onlyNonLoopback ||
|
||||||
(onlyNonLoopback && !isLoopback( tcpFile, &entitySet[i] ))) )
|
(onlyNonLoopback && !isLoopback( tcpFile, &entitySet[i] ))) )
|
||||||
numInterfaces++;
|
numInterfaces++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,9 +406,9 @@ InterfaceIndexTable *getInterfaceIndexTableInt( BOOL nonLoopbackOnly ) {
|
||||||
status = getInterfaceInfoSet( tcpFile, &ifInfo, &numInterfaces );
|
status = getInterfaceInfoSet( tcpFile, &ifInfo, &numInterfaces );
|
||||||
|
|
||||||
TRACE("InterfaceInfoSet: %08x, %04x:%08x\n",
|
TRACE("InterfaceInfoSet: %08x, %04x:%08x\n",
|
||||||
status,
|
status,
|
||||||
ifInfo->entity_id.tei_entity,
|
ifInfo->entity_id.tei_entity,
|
||||||
ifInfo->entity_id.tei_instance);
|
ifInfo->entity_id.tei_instance);
|
||||||
|
|
||||||
if( NT_SUCCESS(status) ) {
|
if( NT_SUCCESS(status) ) {
|
||||||
ret = (InterfaceIndexTable *)
|
ret = (InterfaceIndexTable *)
|
||||||
|
@ -418,13 +418,13 @@ InterfaceIndexTable *getInterfaceIndexTableInt( BOOL nonLoopbackOnly ) {
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ret->numAllocated = numInterfaces;
|
ret->numAllocated = numInterfaces;
|
||||||
TRACE("NumInterfaces = %d\n", numInterfaces);
|
TRACE("NumInterfaces = %d\n", numInterfaces);
|
||||||
|
|
||||||
for( i = 0; i < numInterfaces; i++ ) {
|
for( i = 0; i < numInterfaces; i++ ) {
|
||||||
TRACE("Examining interface %d\n", i);
|
TRACE("Examining interface %d\n", i);
|
||||||
if( !nonLoopbackOnly ||
|
if( !nonLoopbackOnly ||
|
||||||
!isLoopback( tcpFile, &ifInfo[i].entity_id ) ) {
|
!isLoopback( tcpFile, &ifInfo[i].entity_id ) ) {
|
||||||
TRACE("Interface %d matches (%d)\n", i, curInterface);
|
TRACE("Interface %d matches (%d)\n", i, curInterface);
|
||||||
ret->indexes[curInterface++] =
|
ret->indexes[curInterface++] =
|
||||||
ifInfo[i].if_info.ent.if_index;
|
ifInfo[i].if_info.ent.if_index;
|
||||||
}
|
}
|
||||||
|
@ -633,7 +633,7 @@ char *toIPAddressString(unsigned int addr, char string[16])
|
||||||
|
|
||||||
if (string)
|
if (string)
|
||||||
strncpy(string, inet_ntoa(iAddr), 16);
|
strncpy(string, inet_ntoa(iAddr), 16);
|
||||||
|
|
||||||
return inet_ntoa(iAddr);
|
return inet_ntoa(iAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue