socket question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > socket question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    socket question  
stathis gotsis


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-06 10:52 PM

Hello,
I wonder how AF_INET is different from PF_INET when passed as the first
parameter to socket(). My man only states PF_INET.

Thank you







[ Post a follow-up to this message ]



    Re: socket question  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-15-06 10:52 PM

In article <dqej42$b6h$1@ulysses.noc.ntua.gr>,
"stathis gotsis" <stathisgotsis@hotmail.com> wrote:

> Hello,
>    I wonder how AF_INET is different from PF_INET when passed as the first
> parameter to socket(). My man only states PF_INET.

The original intent was that the AF_* constants would be used when
dealing with addresses, and PF_* when dealing with protocol suites.
However, in practice there's a one-to-one correspondence -- IP protocols
always use IP addresses, Appletalk protocols always use Appletalk
addresses, etc.  So AF_INET == PF_INET, and over time the distinction
between the two sets was dropped.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Re: socket question  
Lew Pitcher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-16-06 07:50 AM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Barry Margolin wrote:
> In article <dqej42$b6h$1@ulysses.noc.ntua.gr>,
>  "stathis gotsis" <stathisgotsis@hotmail.com> wrote:
>
> 
>
>
> The original intent was that the AF_* constants would be used when
> dealing with addresses, and PF_* when dealing with protocol suites.
> However, in practice there's a one-to-one correspondence -- IP protocols
> always use IP addresses, Appletalk protocols always use Appletalk
> addresses, etc.  So AF_INET == PF_INET, and over time the distinction
> between the two sets was dropped.
>

The late W. Richard Stevens (the author of the "TCP/IP Illustrated" series)
has a page (derived from a 1996 thread in comp.protocols.tcpip) that discuss
es
this.

See http://www.kohala.com/start/lanciani.96apr10.txt


- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

 iD8DBQFDyw85agVFX4UWr64RArFiAJ9NZe+0OPD2
myiNAfNimrPd38DiuACgn8yR
JpnH5cseIVD+UVR9a5XAG/E=
=FXlO
-----END PGP SIGNATURE-----





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:05 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register