Re: GetIpAddrTable
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Wed, 8 Mar 2006 11:08:22 +0200
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?
.
- Follow-Ups:
- Re: GetIpAddrTable
- From: Norman Diamond
- Re: GetIpAddrTable
- References:
- GetIpAddrTable
- From: Norman Diamond
- GetIpAddrTable
- Prev by Date: Re: storing a zip file on a server
- Next by Date: Re: Graceful socket cleanup problem
- Previous by thread: GetIpAddrTable
- Next by thread: Re: GetIpAddrTable
- Index(es):
Relevant Pages
|