in reply to RE: Re: UDP in NT
in thread UDP in NT

My reference for now is "UNIX Network Programming, Networking APIs: Sockets and XTI" by W. Richard Stevens, and published by Prentice Hall.

It tells that the differences between AF and PF are only in name only, where A means address and P means protocol. The PF_INET was originally intended to allow for multiple address families, but was never implemented. If you were to examine the sockets.h header file, you'll find that the PF_ values are just assigned to the AF_ values, so which prefix you use is really just personal preference.

You queried on what is the best "domain" for NT. NT does not have it's own "domain" in the list. The "domains" were written on unix, so you have values like "AF_UNIX" for Unix Only protocols, "AF_ROUTE" for routing sockets, and "AF_LOCAL", which is another example of Unix Domain Protocols. The only cross platform family that should be used is AF_INET, which is the Internet's IP, UDP, and TCP protocols.

Types include SOCK_DGRAM (a UDP only style), SOCK_STREAM (for TCP sockets), and SOCK_RAW. SOCK_RAW is the most interresting, because it delivers the IP information to you, rather than the data from the TCP packet. (This means that you can write ICMP applications like ping and tracert using a SOCK_RAW to access the protocol...)

I hope this is helpfull, but not overly detailed (there's nothing like drinking from a firehydrant...)

Joe Lewis
sharktooth@innocent.com