Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Berkeley sockets
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Protocol and address families== The Berkeley socket API is a general interface for networking and interprocess communication and supports the use of various network protocols and address architectures. The following lists a sampling of protocol families (preceded by the standard symbolic identifier) defined in a modern [[Linux]] or [[BSD]] implementation: {| class="wikitable sortable" !Identifier || Function or use |- |PF_APPLETALK || [[AppleTalk]] |- |PF_ATMPVC || [[Asynchronous Transfer Mode]] Permanent Virtual Circuits |- |PF_ATMSVC || Asynchronous Transfer Mode Switched Virtual Circuits |- |PF_AX25 || Amateur Radio [[AX.25]] |- |PF_CAN |[[Controller Area Network]] |- |style="font-weight:bold"|PF_BLUETOOTH || [[Bluetooth]] sockets |- |PF_BRIDGE || Multiprotocol [[Bridging (networking)|bridge]] |- |PF_DECnet || Reserved for [[DECnet]] project |- |PF_ECONET || Acorn [[Econet]] |- |style="font-weight:bold"|PF_INET || [[IPv4|Internet Protocol version 4]] |- |style="font-weight:bold"|PF_INET6 || [[IPv6|Internet Protocol version 6]] |- |PF_IPX || Novell's [[Internetwork Packet Exchange]] |- |PF_IRDA || [[IrDA]] sockets |- |PF_KEY || PF_KEY key management API |- |style="font-weight:bold"|PF_LOCAL, PF_UNIX, PF_FILE || Local to host (pipes and file-domain) |- |PF_NETROM || Amateur radio NET/ROM (related to AX.25)<ref>{{cite web |url=https://manpages.debian.org/experimental/ax25-tools/netrom.4.en.html}}</ref> |- |PF_NETBEUI || Reserved for 802.2LLC project |- |PF_SECURITY || Security callback pseudo AF |- |PF_NETLINK, PF_ROUTE || routing API |- |PF_PACKET || Packet capture sockets |- |PF_PPPOX || [[PPPoX|PPP over X]] sockets |- |PF_SNA || Linux [[Systems Network Architecture]] (SNA) Project |- |PF_WANPIPE || Sangoma Wanpipe API sockets |} A socket for communications is created with the {{code|socket()}} function, by specifying the desired protocol family ({{mono|PF_}}-identifier) as an argument. The original design concept of the socket interface distinguished between protocol types (families) and the specific address types that each may use. It was envisioned that a protocol family may have several address types. Address types were defined by additional symbolic constants, using the prefix {{mono|AF}} instead of {{mono|PF}}. The {{mono|AF}}-identifiers are intended for all data structures that specifically deal with the address type and not the protocol family. However, this concept of separation of protocol and address type has not found implementation support and the {{mono|AF}}-constants were defined by the corresponding protocol identifier, leaving the distinction between {{mono|AF}} and {{mono|PF}} constants as a technical argument of no practical consequence. Indeed, much confusion exists in the proper usage of both forms.<ref>''UNIX Network Programming'' Volume 1, Third Edition: The Sockets Networking API, W. Richard Stevens, Bill Fenner, Andrew M. Rudoff, Addison Wesley, 2003.</ref> The POSIX.1β2008 specification doesn't specify any {{mono|PF}}-constants, but only {{mono|AF}}-constants<ref>{{cite web |url=http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html |title=The Open Group Base Specifications Issue 7 |publisher=Pubs.opengroup.org |access-date=2012-07-26}}</ref> ===Raw sockets=== [[Raw socket]]s provide a simple interface that bypasses the processing by the host's TCP/IP stack. They permit implementation of networking protocols in [[user space]] and aid in debugging of the protocol stack.<ref>{{cite web | url=https://msdn.microsoft.com/en-us/library/windows/desktop/ms740548(v=vs.85).aspx | title=TCP/IP raw sockets - Win32 apps | date=19 January 2022 }}</ref> Raw sockets are used by some services, such as [[Internet Control Message Protocol|ICMP]], that operate at the [[Internet Layer]] of the TCP/IP model.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Berkeley sockets
(section)
Add topic