PF_INET , AF_INET 차이점

프로토콜 형식을 표현 => PF_INET

주소       형식을 표현 => AF_INET



MSDN에 가보면

 Note that the values for the AF_ address family and PF_ protocol family constants are identical (for example, AF_INET and PF_INET), so either constant can be used.


해석

identical : 아주 동일한!

AF_ address family constants == PF_ protocol family constants ? TRUE!!



SOCKET WSAAPI socket( _In_  int af, _In_  int type, _In_  int protocol );


af 인자를 잠시 살펴보면

AfMeaning
AF_UNSPEC
0

The address family is unspecified.

AF_INET
2

The Internet Protocol version 4 (IPv4) address family.

AF_IPX
6

The IPX/SPX address family. This address family is only supported if the NWLink IPX/SPX NetBIOS Compatible Transport protocol is installed.

This address family is not supported on Windows Vista and later.

AF_APPLETALK
16

The AppleTalk address family. This address family is only supported if the AppleTalk protocol is installed.

This address family is not supported on Windows Vista and later.

AF_NETBIOS
17

The NetBIOS address family. This address family is only supported if the Windows Sockets provider for NetBIOS is installed.

The Windows Sockets provider for NetBIOS is supported on 32-bit versions of Windows. This provider is installed by default on 32-bit versions of Windows.

The Windows Sockets provider for NetBIOS is not supported on 64-bit versions of windows including Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, or Windows XP.

The Windows Sockets provider for NetBIOS only supports sockets where the type parameter is set to SOCK_DGRAM.

The Windows Sockets provider for NetBIOS is not directly related to the NetBIOSprogramming interface. The NetBIOS programming interface is not supported on Windows Vista, Windows Server 2008, and later.

AF_INET6
23

The Internet Protocol version 6 (IPv6) address family.

AF_IRDA
26

The Infrared Data Association (IrDA) address family.

This address family is only supported if the computer has an infrared port and driver installed.

AF_BTH
32

The Bluetooth address family.

This address family is supported on Windows XP with SP2 or later if the computer has a Bluetooth adapter and driver installed.


by 개발자가 되자! 2013. 3. 6. 17:12