Re: What are these address families?
- From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
- Date: Tue, 14 Feb 2006 11:35:56 +0900
Sorry, this was my fault. One extra & in a place where it didn't belong. Windows is correctly putting a 2 where it belongs. Sorry again.
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message news:%23k%23gYsQMGHA.3064@xxxxxxxxxxxxxxxxxxxxxxx
I call getaddrinfo() and it succeeds, yielding a chain of two addrinfo structures.
In both addrinfo structures, the ai_family member is equal to PF_INET and the ai_addrlen member is equal to 16, great.
In one addrinfo structure, the ai_addr points to a sockaddr structure in which the sin_family member has value -31816. In the other, -31672.
According to file WinSock2.h, the value of the sin_family member can range from 0 to 32. (The use of 0 is discouraged, but if Windows gave me a 0 then I'd try to contend with it. The value of 32 is AF_MAX but doesn't otherwise appear to be a valid family, but if windows gave me a 32 then I'd try to contend with it.)
Anyway, how does the value of the sin_family avoid being equal to AF_INET, and how does it get to be negative, and two different negative values for the two retrieved addresses? What do these mean? How can I use them in calls to other functions such as sendto()?
.
- References:
- What are these address families?
- From: Norman Diamond
- What are these address families?
- Prev by Date: What are these address families?
- Next by Date: How to list all drive maps? ('net use' only shows *current user's* maps)
- Previous by thread: What are these address families?
- Next by thread: How to list all drive maps? ('net use' only shows *current user's* maps)
- Index(es):
Relevant Pages
|