Re: GetIpAddrTable
- From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
- Date: Wed, 8 Mar 2006 18:35:53 +0900
I think that the order which you see in memory and the order which I see in memory are the same. I think that order is network order not host order.
Load the DWORD from memory into a register and you get 0x681010ac. Before doing any further processing in the host you have to call ntohl.
"Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx> wrote in message news:eDtMT$oQGHA.5092@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxxhttp://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: "TerryFei"
- Re: GetIpAddrTable
- From: Arkady Frenkel
- Re: GetIpAddrTable
- References:
- GetIpAddrTable
- From: Norman Diamond
- Re: GetIpAddrTable
- From: Arkady Frenkel
- GetIpAddrTable
- Prev by Date: Re: Graceful socket cleanup problem
- Next by Date: Re: Problem in LSP
- Previous by thread: Re: GetIpAddrTable
- Next by thread: Re: GetIpAddrTable
- Index(es):
Relevant Pages
|