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


In reply to RE: RE: Re: UDP in NT by Anonymous Monk
in thread UDP in NT by THuG

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.