info > ADDRESS_FAMILIES

📛 NAME

address_families - socket address families (domains)

🚀 Quick Reference

Use Case Command Description
🌐 IPv4 TCP socket(AF_INET, SOCK_STREAM, 0) Create a TCP socket for IPv4
🌐 IPv4 UDP socket(AF_INET, SOCK_DGRAM, 0) Create a UDP socket for IPv4
🏠 Local Unix socket(AF_UNIX, SOCK_STREAM, 0) Create a local socket
🌍 IPv6 TCP socket(AF_INET6, SOCK_STREAM, 0) Create a TCP socket for IPv6
🔗 Netlink socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) Kernel user interface
📦 Packet socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) Low-level packet interface
🔵 Bluetooth socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) Bluetooth RFCOMM protocol
🖥️ VSock socket(AF_VSOCK, SOCK_STREAM, 0) Hypervisor-guest interaction
🚗 CAN bus socket(AF_CAN, SOCK_RAW, CAN_RAW) Controller Area Network
🔐 Crypto socket(AF_ALG, SOCK_SEQPACKET, 0) Kernel crypto API interface

📝 SYNOPSIS

#include <sys/types.h>          /* See NOTES */
#include <sys/socket.h>

int socket(int domain, int type, int protocol);

📖 DESCRIPTION

The domain argument of the socket(2) specifies a communication domain; this selects the protocol family which will be used for communication. These families are defined in <sys/socket.h>. The formats currently understood by the Linux kernel include:

🔗 SEE ALSO

📄 COLOPHON

This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.

ADDRESS_FAMILIES
📛 NAME 🚀 Quick Reference 📝 SYNOPSIS 📖 DESCRIPTION 🔗 SEE ALSO 📄 COLOPHON

Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-09 09:29 @2600:1f28:365:80b0:50b3:453e:ff52:20f7
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format