what is the address family unknown1 in winsock2.h?

286 views Asked by At

In the header file winsock2.h, I found an address family called unknown1.

What does this address family represents and what is it used for ??

Here is the source code of the header file winsock2.h, and here is the code line that contain the constant of that address family:

#define AF_UNKNOWN1 20
2

There are 2 answers

2
Hans Passant On BEST ANSWER

Your copy of winsock2.h is strange, perhaps you left off the comment on purpose. I keep old versions of SDKs around, they are an interesting archeological record of Windows development. I can trace this one back to the WinNT version 4 SDK, released in 1996 and the first SDK version that supported Winsock v2. It extended the address families first supported in NT 3.1 and Winsock v1.1, copy-pasting all of the added ones:

#define AF_VOICEVIEW    18              /* VoiceView */
#define AF_FIREFOX      19              /* Protocols from Firefox */
#define AF_UNKNOWN1     20              /* Somebody is using this! */
#define AF_BAN          21              /* Banyan */
#define AF_ATM          22              /* Native ATM Services */
#define AF_INET6        23              /* Internetwork Version 6 */

Still looks the same way today. Obviously the comment is relevant, Somebody is using this! should have the emphasis on Somebody. It is bracketed by products of companies that had pretty successful products back in the middle 90s, big enough to have a working relationship with Microsoft and get their product verified and supported by Winsock 2 and WinNT4 (Firefox was a company, not the browser btw).

So a somewhat plausible scenario is that a conflict was detect by a tester, otherwise having any idea how dirty his machine was, and filed a bug report. If Microsoft didn't know back in 1996 then, well, nobody knows. Time has not been kind to these companies and their products, the dominance of TCP/IP and the Dot-com bubble bust killed about all of them. Surely the same happened to Somebody Inc :)

1
D. Kovács On

That actually is pretty self-describing: it is everything else which is not defined otherwise. E.g., AF_UNKNOWN1 is an address family which is none of the other, defined address families; PF_UNKNOWN1 is such a protocol family. For the 1 postfix I didn't find now quickly pointers, my assumption is that it has been introduced to avoid conflicts with possibly already existing _UNKNOWN definitions.