| 1 |
.\" Copyright 2018, Eugene Syromyatnikov <[email protected]> |
| 2 |
.\" Copyright 2018, Michael Kerrisk <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 6 |
.\" |
| 7 |
.TH address_families 7 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
address_families \- socket address families (domains) |
| 10 |
.SH SYNOPSIS |
| 11 |
.nf |
| 12 |
.BR "#include <sys/types.h>" " /* See NOTES */" |
| 13 |
.B #include <sys/socket.h> |
| 14 |
.P |
| 15 |
.BI "int socket(int " domain ", int " type ", int " protocol ); |
| 16 |
.fi |
| 17 |
.SH DESCRIPTION |
| 18 |
The |
| 19 |
.I domain |
| 20 |
argument of the |
| 21 |
.BR socket (2) |
| 22 |
specifies a communication domain; |
| 23 |
this selects the protocol family |
| 24 |
which will be used for communication. |
| 25 |
These families are defined in |
| 26 |
.IR <sys/socket.h> . |
| 27 |
The formats currently understood by the Linux kernel include: |
| 28 |
.TP |
| 29 |
.B AF_UNIX |
| 30 |
.TQ |
| 31 |
.B AF_LOCAL |
| 32 |
Local communication. |
| 33 |
For further information, see |
| 34 |
.BR unix (7). |
| 35 |
.TP |
| 36 |
.B AF_INET |
| 37 |
IPv4 Internet protocols. |
| 38 |
For further information, see |
| 39 |
.BR ip (7). |
| 40 |
.TP |
| 41 |
.B AF_AX25 |
| 42 |
Amateur radio AX.25 protocol. |
| 43 |
For further information, see |
| 44 |
.BR ax25 (4). |
| 45 |
.\" Part of ax25-tools |
| 46 |
.TP |
| 47 |
.B AF_IPX |
| 48 |
IPX \- Novell protocols. |
| 49 |
.TP |
| 50 |
.B AF_APPLETALK |
| 51 |
AppleTalk |
| 52 |
For further information, see |
| 53 |
.BR ddp (7). |
| 54 |
.TP |
| 55 |
.B AF_NETROM |
| 56 |
AX.25 packet layer protocol. |
| 57 |
For further information, see |
| 58 |
.BR netrom (4), |
| 59 |
.\" Part of ax25-tools package |
| 60 |
.UR https:\://www.tldp.org/HOWTO/AX25-HOWTO/x61.html |
| 61 |
.I The Packet Radio Protocols and Linux |
| 62 |
.UE |
| 63 |
and the |
| 64 |
.IR AX.25 ", " NET/ROM ", and " "ROSE network programming" |
| 65 |
chapters of the |
| 66 |
.UR https:\://www.tldp.org/HOWTO/AX25-HOWTO/x2107.html |
| 67 |
.I Linux Amateur Radio AX.25 HOWTO |
| 68 |
.UE . |
| 69 |
.TP |
| 70 |
.B AF_BRIDGE |
| 71 |
Can't be used for creating sockets; |
| 72 |
mostly used for bridge links in |
| 73 |
.BR rtnetlink (7) |
| 74 |
protocol commands. |
| 75 |
.TP |
| 76 |
.B AF_ATMPVC |
| 77 |
Access to raw ATM Permanent Virtual Circuits (PVCs). |
| 78 |
For further information, see the |
| 79 |
.UR https:\://www.tldp.org/HOWTO/text/ATM-Linux-HOWTO |
| 80 |
.I ATM on Linux HOWTO |
| 81 |
.UE . |
| 82 |
.TP |
| 83 |
.B AF_X25 |
| 84 |
ITU-T X.25 / ISO/IEC\~8208 protocol. |
| 85 |
For further information, see |
| 86 |
.BR x25 (7). |
| 87 |
.TP |
| 88 |
.B AF_INET6 |
| 89 |
IPv6 Internet protocols. |
| 90 |
For further information, see |
| 91 |
.BR ipv6 (7). |
| 92 |
.TP |
| 93 |
.B AF_ROSE |
| 94 |
RATS (Radio Amateur Telecommunications Society). |
| 95 |
Open Systems environment (ROSE) AX.25 packet layer protocol. |
| 96 |
For further information, see the resources listed for |
| 97 |
.BR AF_NETROM . |
| 98 |
.TP |
| 99 |
.B AF_DECnet |
| 100 |
Support was removed in Linux 6.1. |
| 101 |
.TP |
| 102 |
.B AF_NETBEUI |
| 103 |
Reserved for "802.2LLC project"; |
| 104 |
never used. |
| 105 |
.TP |
| 106 |
.B AF_SECURITY |
| 107 |
This was a short-lived (between Linux 2.1.30 and 2.1.99pre2) protocol family |
| 108 |
for firewall upcalls. |
| 109 |
.TP |
| 110 |
.B AF_KEY |
| 111 |
Key management protocol, originally developed for usage with IPsec |
| 112 |
(since Linux 2.1.38). |
| 113 |
This has no relation to |
| 114 |
.BR keyctl (2) |
| 115 |
and the in-kernel key storage facility. |
| 116 |
See |
| 117 |
.UR https:\://tools.ietf.org/html/rfc2367 |
| 118 |
RFC 2367 |
| 119 |
.I PF_KEY Key Management API, Version 2 |
| 120 |
.UE |
| 121 |
for details. |
| 122 |
.TP |
| 123 |
.B AF_NETLINK |
| 124 |
Kernel user interface device. |
| 125 |
For further information, see |
| 126 |
.BR netlink (7). |
| 127 |
.TP |
| 128 |
.B AF_PACKET |
| 129 |
Low-level packet interface. |
| 130 |
For further information, see |
| 131 |
.BR packet (7). |
| 132 |
.\" .TP |
| 133 |
.\" .B AF_ASH |
| 134 |
.\" Asynchronous Serial Host protocol (?) |
| 135 |
.\" Notes from Eugene Syromyatnikov: |
| 136 |
.\" I haven't found any concrete information about this one; |
| 137 |
.\" it never was implemented in Linux, at least, judging by historical |
| 138 |
.\" repos. There is also this file (and its variations): |
| 139 |
.\" https://github.com/ecki/net-tools/blob/master/lib/ash.c |
| 140 |
.\" ( https://github.com/ecki/net-tools/commits/master/lib/ash.c ) |
| 141 |
.\" it mentions "NET-2 distribution" (BSD Net/2?), but, again, I failed |
| 142 |
.\" to find any mentions of "ash" protocol there. |
| 143 |
.\" (for the reference: |
| 144 |
.\" ftp://pdp11.org.ru/pub/unix-archive/Distributions/UCB/Net2/net2.tar.gz ) |
| 145 |
.\" Another source that mentions it is |
| 146 |
.\" https://www.silabs.com/documents/public/user-guides/ug101-uart-gateway-protocol-reference.pdf |
| 147 |
.\" https://www.silabs.com/documents/public/user-guides/ug115-ashv3-protocol-reference.pdf |
| 148 |
.\" but I doubt that it's related, as former files use 64-byte addresses and |
| 149 |
.\" "Hamming-encode of hops", and that's barely combines with a protocol |
| 150 |
.\" that is mainly used over serial connection. |
| 151 |
.TP |
| 152 |
.B AF_ECONET |
| 153 |
.\" commit: 349f29d841dbae854bd7367be7c250401f974f47 |
| 154 |
Acorn Econet protocol (removed in Linux 3.5). |
| 155 |
See the |
| 156 |
.UR http:\://www.8bs.com/othrdnld/manuals/econet.shtml |
| 157 |
Econet documentation |
| 158 |
.UE |
| 159 |
for details. |
| 160 |
.TP |
| 161 |
.B AF_ATMSVC |
| 162 |
Access to ATM Switched Virtual Circuits (SVCs) |
| 163 |
See the |
| 164 |
.UR https:\://www.tldp.org/HOWTO/text/ATM-Linux-HOWTO |
| 165 |
.I ATM on Linux HOWTO |
| 166 |
.UE |
| 167 |
for details. |
| 168 |
.TP |
| 169 |
.B AF_RDS |
| 170 |
.\" commit: 639b321b4d8f4e412bfbb2a4a19bfebc1e68ace4 |
| 171 |
Reliable Datagram Sockets (RDS) protocol (since Linux 2.6.30). |
| 172 |
RDS over RDMA has no relation to |
| 173 |
.B AF_SMC |
| 174 |
or |
| 175 |
.BR AF_XDP . |
| 176 |
For further information, see |
| 177 |
.\" rds-tools: https://github.com/oracle/rds-tools/blob/master/rds.7 |
| 178 |
.\" rds-tools: https://github.com/oracle/rds-tools/blob/master/rds-rdma.7 |
| 179 |
.BR rds (7), |
| 180 |
.BR rds\-rdma (7), |
| 181 |
and |
| 182 |
.I Documentation/networking/rds.rst |
| 183 |
in the Linux kernel source tree. |
| 184 |
.TP |
| 185 |
.B AF_IRDA |
| 186 |
.\" commits: 1ca163afb6fd569b, d64c2a76123f0300 |
| 187 |
Socket interface over IrDA |
| 188 |
(moved to staging in Linux 4.14, removed in Linux 4.17). |
| 189 |
.\" irda-utils: https://sourceforge.net/p/irda/code/HEAD/tree/tags/IRDAUTILS_0_9_18/irda-utils/man/irda.7.gz?format=raw |
| 190 |
For further information, see |
| 191 |
.BR irda (7). |
| 192 |
.TP |
| 193 |
.B AF_PPPOX |
| 194 |
Generic PPP transport layer, for setting up L2 tunnels |
| 195 |
(L2TP and PPPoE). |
| 196 |
See |
| 197 |
.I Documentation/networking/l2tp.rst |
| 198 |
in the Linux kernel source tree for details. |
| 199 |
.TP |
| 200 |
.B AF_WANPIPE |
| 201 |
.\" commits: ce0ecd594d78710422599918a608e96dd1ee6024 |
| 202 |
Legacy protocol for wide area network (WAN) connectivity |
| 203 |
that was used by Sangoma WAN cards (called "WANPIPE"); |
| 204 |
removed in Linux 2.6.21. |
| 205 |
.TP |
| 206 |
.B AF_LLC |
| 207 |
.\" linux-history commit: 34beb106cde7da233d4df35dd3d6cf4fee937caa |
| 208 |
Logical link control (IEEE 802.2 LLC) protocol, upper part |
| 209 |
of data link layer of ISO/OSI networking protocol stack |
| 210 |
(since Linux 2.4); |
| 211 |
has no relation to |
| 212 |
.BR AF_PACKET . |
| 213 |
See chapter |
| 214 |
.I 13.5.3.\& Logical Link Control |
| 215 |
in |
| 216 |
.I Understanding Linux Kernel Internals |
| 217 |
(O'Reilly Media, 2006) |
| 218 |
and |
| 219 |
.I IEEE Standards for Local Area Networks: Logical Link Control |
| 220 |
(The Institute of Electronics and Electronics Engineers, Inc., |
| 221 |
New York, New York, 1985) |
| 222 |
for details. |
| 223 |
See also |
| 224 |
.UR https:\://wiki.linuxfoundation.org/networking/llc |
| 225 |
some historical notes |
| 226 |
.UE |
| 227 |
regarding its development. |
| 228 |
.TP |
| 229 |
.B AF_IB |
| 230 |
.\" commits: 8d36eb01da5d371f..ce117ffac2e93334 |
| 231 |
InfiniBand native addressing (since Linux 3.11). |
| 232 |
.TP |
| 233 |
.B AF_MPLS |
| 234 |
.\" commits: 0189197f441602acdca3f97750d392a895b778fd |
| 235 |
Multiprotocol Label Switching (since Linux 4.1); |
| 236 |
mostly used for configuring MPLS routing via |
| 237 |
.BR netlink (7), |
| 238 |
as it doesn't expose ability to create sockets to user space. |
| 239 |
.TP |
| 240 |
.B AF_CAN |
| 241 |
.\" commits: 8dbde28d9711475a..5423dd67bd0108a1 |
| 242 |
Controller Area Network automotive bus protocol (since Linux 2.6.25). |
| 243 |
See |
| 244 |
.I Documentation/networking/can.rst |
| 245 |
in the Linux kernel source tree for details. |
| 246 |
.TP |
| 247 |
.B AF_TIPC |
| 248 |
.\" commits: b97bf3fd8f6a16966d4f18983b2c40993ff937d4 |
| 249 |
TIPC, "cluster domain sockets" protocol (since Linux 2.6.16). |
| 250 |
See |
| 251 |
.UR http:\://tipc.io/programming.html |
| 252 |
.I TIPC Programmer's Guide |
| 253 |
.UE |
| 254 |
and the |
| 255 |
.UR http:\://tipc.io/protocol.html |
| 256 |
protocol description |
| 257 |
.UE |
| 258 |
for details. |
| 259 |
.TP |
| 260 |
.B AF_BLUETOOTH |
| 261 |
.\" commits: 8d36eb01da5d371f..ce117ffac2e93334 |
| 262 |
Bluetooth low-level socket protocol (since Linux 3.11). |
| 263 |
See |
| 264 |
.UR https:\://git.kernel.org\:/pub/scm\:/bluetooth/bluez.git\:/tree/doc/mgmt-api.txt |
| 265 |
.I Bluetooth Management API overview |
| 266 |
.UE |
| 267 |
and |
| 268 |
.UR https:\://people.csail.mit.edu/albert/bluez-intro/ |
| 269 |
.I An Introduction to Bluetooth Programming |
| 270 |
by Albert Huang |
| 271 |
.UE |
| 272 |
for details. |
| 273 |
.TP |
| 274 |
.B AF_IUCV |
| 275 |
.\" commit: eac3731bd04c7131478722a3c148b78774553116 |
| 276 |
IUCV (inter-user communication vehicle) z/VM protocol |
| 277 |
for hypervisor-guest interaction (since Linux 2.6.21); |
| 278 |
has no relation to |
| 279 |
.B AF_VSOCK |
| 280 |
and/or |
| 281 |
.B AF_SMC |
| 282 |
See |
| 283 |
.UR https:\://www.ibm.com\:/support\:/knowledgecenter\:/en\:/SSB27U_6.4.0\:/com.ibm.zvm.v640.hcpb4\:/iucv.htm |
| 284 |
.I IUCV protocol overview |
| 285 |
.UE |
| 286 |
for details. |
| 287 |
.TP |
| 288 |
.B AF_RXRPC |
| 289 |
.\" commit: 17926a79320afa9b95df6b977b40cca6d8713cea |
| 290 |
.\" http://people.redhat.com/~dhowells/rxrpc/ |
| 291 |
.\" https://www.infradead.org/~dhowells/kafs/af_rxrpc_client.html |
| 292 |
.\" http://workshop.openafs.org/afsbpw09/talks/thu_2/kafs.pdf |
| 293 |
.\" http://pages.cs.wisc.edu/~remzi/OSTEP/dist-afs.pdf |
| 294 |
.\" http://web.mit.edu/kolya/afs/rx/rx-spec |
| 295 |
Rx, Andrew File System remote procedure call protocol |
| 296 |
(since Linux 2.6.22). |
| 297 |
See |
| 298 |
.I Documentation/networking/rxrpc.rst |
| 299 |
in the Linux kernel source tree for details. |
| 300 |
.TP |
| 301 |
.B AF_ISDN |
| 302 |
.\" commit: 1b2b03f8e514e4f68e293846ba511a948b80243c |
| 303 |
New "modular ISDN" driver interface protocol (since Linux 2.6.27). |
| 304 |
See the |
| 305 |
.UR http:\://www.misdn.eu/wiki/Main_Page/ |
| 306 |
mISDN wiki |
| 307 |
.UE |
| 308 |
for details. |
| 309 |
.TP |
| 310 |
.B AF_PHONET |
| 311 |
.\" commit: 4b07b3f69a8471cdc142c51461a331226fef248a |
| 312 |
Nokia cellular modem IPC/RPC interface (since Linux 2.6.31). |
| 313 |
See |
| 314 |
.I Documentation/networking/phonet.rst |
| 315 |
in the Linux kernel source tree for details. |
| 316 |
.TP |
| 317 |
.B AF_IEEE802154 |
| 318 |
.\" commit: 9ec7671603573ede31207eb5b0b3e1aa211b2854 |
| 319 |
IEEE 802.15.4 WPAN (wireless personal area network) raw packet protocol |
| 320 |
(since Linux 2.6.31). |
| 321 |
See |
| 322 |
.I Documentation/networking/ieee802154.rst |
| 323 |
in the Linux kernel source tree for details. |
| 324 |
.TP |
| 325 |
.B AF_CAIF |
| 326 |
.\" commit: 529d6dad5bc69de14cdd24831e2a14264e93daa4 |
| 327 |
.\" https://lwn.net/Articles/371017/ |
| 328 |
.\" http://read.pudn.com/downloads157/doc/comm/698729/Misc/caif/Com%20CPU%20to%20Appl%20CPU%20Interface%20DESCRIPTION_LZN901%202002_revR1C.pdf |
| 329 |
.\" http://read.pudn.com/downloads157/doc/comm/698729/Misc/caif/Com%20CPU%20to%20Appl%20CPU%20Interface%20PROTOCOL%20SPECIFICATION_LZN901%201708_revR1A.pdf |
| 330 |
Ericsson's Communication CPU to Application CPU interface (CAIF) protocol |
| 331 |
(since Linux 2.6.36). |
| 332 |
See |
| 333 |
.I Documentation/networking/caif/linux_caif.rst |
| 334 |
in the Linux kernel source tree for details. |
| 335 |
.TP |
| 336 |
.B AF_ALG |
| 337 |
Interface to kernel crypto API (since Linux 2.6.38). |
| 338 |
See |
| 339 |
.I Documentation/crypto/userspace\-if.rst |
| 340 |
in the Linux kernel source tree for details. |
| 341 |
.TP |
| 342 |
.B AF_VSOCK |
| 343 |
.\" commit: d021c344051af91f42c5ba9fdedc176740cbd238 |
| 344 |
VMWare VSockets protocol for hypervisor-guest interaction (since Linux 3.9); |
| 345 |
has no relation to |
| 346 |
.B AF_IUCV |
| 347 |
and |
| 348 |
.BR AF_SMC . |
| 349 |
For further information, see |
| 350 |
.BR vsock (7). |
| 351 |
.TP |
| 352 |
.B AF_KCM |
| 353 |
.\" commit: 03c8efc1ffeb6b82a22c1af8dd908af349563314 |
| 354 |
KCM (kernel connection multiplexer) interface (since Linux 4.6). |
| 355 |
See |
| 356 |
.I Documentation/networking/kcm.rst |
| 357 |
in the Linux kernel source tree for details. |
| 358 |
.TP |
| 359 |
.B AF_QIPCRTR |
| 360 |
.\" commit: bdabad3e363d825ddf9679dd431cca0b2c30f881 |
| 361 |
Qualcomm IPC router interface protocol (since Linux 4.7). |
| 362 |
.TP |
| 363 |
.B AF_SMC |
| 364 |
.\" commit: f3a3e248f3f7cd9a4bed334022704d7e7fc781bf |
| 365 |
SMC-R (shared memory communications over RDMA) protocol (since Linux 4.11), |
| 366 |
and SMC-D (shared memory communications, direct memory access) protocol |
| 367 |
for intra-node z/VM quest interaction (since Linux 4.19); |
| 368 |
has no relation to |
| 369 |
.BR AF_RDS ", " AF_IUCV |
| 370 |
or |
| 371 |
.BR AF_VSOCK . |
| 372 |
See |
| 373 |
.UR https:\://tools.ietf.org/html/rfc7609 |
| 374 |
RFC 7609 |
| 375 |
.I IBM's Shared Memory Communications over RDMA (SMC-R) Protocol |
| 376 |
.UE |
| 377 |
for details regarding SMC-R. |
| 378 |
See |
| 379 |
.UR https:\://www-01.ibm.com\:/software/network\:/commserver\:/SMC-D/index.html |
| 380 |
.I SMC-D Reference Information |
| 381 |
.UE |
| 382 |
for details regarding SMC-D. |
| 383 |
.TP |
| 384 |
.B AF_XDP |
| 385 |
.\" commit: c0c77d8fb787cfe0c3fca689c2a30d1dad4eaba7 |
| 386 |
XDP (express data path) interface (since Linux 4.18). |
| 387 |
See |
| 388 |
.I Documentation/networking/af_xdp.rst |
| 389 |
in the Linux kernel source tree for details. |
| 390 |
.TP |
| 391 |
.B AF_MCTP |
| 392 |
.\" commit: bc49d8169aa72295104f1558830c568efb946315 |
| 393 |
MCTP (Management Component Transport Protocol) interface (since Linux 5.15), |
| 394 |
as defined by the DMTF specification DSP0236. |
| 395 |
For further information, see |
| 396 |
.BR mctp (7). |
| 397 |
.SH SEE ALSO |
| 398 |
.BR socket (2), |
| 399 |
.BR socket (7) |