Red Baron

POST : Network

AF_xxx versus PR_xxx

To quote from W. Richard Stevens 'Unix Network Programming V1 2ed p.88':
(forgive any typos)

AF_xxx versus PR_xxx

The AF_ prefix stands for "address family" and the PF_prefix stands for
"protocol family". Historicly, the intent was that a single protocol family
might support multiple address families and that the PF_ value was used to
create the socket and the AF_ value was used in socket address structures.
But in actuality, a protocol family supporting multiple address families has
never been supported and the <sys/socket.h> header defines the PF_ value
for a given protocol to be equal to the AF_ value for that protocol. While
there is no guarentee that this equality between the two will always be true,
should anyone change this for existing protocols, lots of existing code would
break. To conform to existing coding practice, we use only the AF_ constants
in this text, although you may encounter the PF_ value, mainly in calls to
_socket_.


top

posted at

2007. 1. 31. 01:38


CONTENTS

Red Baron
BLOG main image

RSS 2.0Tattertools
공지 아카이브
최근 글 최근 댓글 최근 트랙백
카테고리 태그 구름사이트 링크