Re: GetIpAddrTable

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,Norman!

dwAddr and dwMask sit exactly in host order and not net and here example :
My IP in lan is 172.16.16.104 what I see after return from the function
those are bytes ( in memory ) : ac 10 10 68 hex ( which is 172 16 16 104
decimal) , so ac sit in lowest byte and 68 in highest ( due to Intel's (
host ) byte order ( little endian ) ) of dword and network order demand 172
(ac hex ) to be in highest byte et al accordingly
Arkady

"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message
news:OuNuYRnQGHA.5812@xxxxxxxxxxxxxxxxxxxxxxx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/managing_ip_addresses_using_getipaddrtable.asp
says:
Note The DWORD objects dwAddr and dwMask are returned as numerical
values
in host byte order, not network byte order.

As far as I can tell, dwAddr and dwMask are returned as numerical values
in
network byte order, not host byte order. I have to call ntohl to convert
them.

The page doesn't say anything about the byte order of dwBCastAddr, but
that
doesn't matter. As far as I can tell, dwBCastAddr isn't a broadcast
address in any byte order or bit order.

Does anyone find more sensible information in these fields?



.



Relevant Pages

  • Re: GetIpAddrTable
    ... That showen v.v in the memory the order is host because to receive ... I think that order is network order not host order. ... As far as I can tell, dwBCastAddr isn't a broadcast ...
    (microsoft.public.win32.programmer.networks)
  • GetIpAddrTable
    ... in host byte order, not network byte order. ... I have to call ntohl to convert ... As far as I can tell, dwBCastAddr isn't a broadcast address in any byte order or bit order. ...
    (microsoft.public.win32.programmer.networks)