NETLINK(7) Linux Programmer's Manual NETLINK(7) NAME netlink, PF_NETLINK - SYNOPSIS #include #include #include netlink_socket = socket(PF_NETLINK, socket_type, netlink_family); DESCRIPTION Netlink API netlink Netlink SOCK_RAW SOCK_DGRAM socket_type netlink datagram raw sockets netlink_family netlink netlink NETLINK_ROUTE IPv4 ( rtnetlink(7)) NETLINK_FIREWALL IPv4 NETLINK_ARPD arp NETLINK_ROUTE6 IPv6 NETLINK_IP6_FW IPv6 () NETLINK_TAPBASE...NETLINK_TAPBASE+15 ethertap Ethertap "" NETLINK_SKIP Enskip NETLINK_USERSOCK Netlink nlmsghdr Netlink NLM_F_MULTI NLMSG_DONE NLMSG_* netlink(3). Netlink NLM_F_ACK NLMSG_ERROR 0 () NLMSG_ERROR netlink 32 bind(2) sockaddr_nl nl_groups 0 sendmsg(2) connect(2) nl_groups uid 0 CAP_NET_ADMIN netlink pid struct nlmsghdr { __u32 nlmsg_len; /* */ __u16 nlmsg_type; /* */ __u16 nlmsg_flags; /* */ __u32 nlmsg_seq; /* */ __u32 nlmsg_pid; /* PID */ }; struct nlmsgerr { int error; /* errno 0 acks*/ struct nlmsghdr msg; /* */ }; nlmsghdr nlmsg_type NLMSG_NOOP NLMSG_ERROR nlmsgerr NLMSG_DONE netlink NETLINK_ROUTE. rtnetlink(7) nlmsg_flags NLM_F_REQUEST NLM_F_MULTI NLMSG_DONE . NLM_F_ACK NLM_F_ECHO GET NLM_F_ROOT NLM_F_MATCH NLM_F_ATOMIC (atomic snapshot) NLM_F_DUMP NEW NLM_F_REPLACE NLM_F_EXCL NLM_F_CREATE NLM_F_APPEND NLM_F_ATOMIC CAP_NET_ADMIN sockaddr_nl netlink sockaddr_nl netlink (nl_groups 0). struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* */ pid_t nl_pid; /* pid */ __u32 nl_groups; /* */ }; nl_pid netlink pid 0 nl_groups neltlink BUGS NOTES libnetlink netlink VERSIONS netlink Linux 2.2 Linux 2.0 netlink( cmsg(3), rtnetlink(7), netlink(3). ftp://ftp.inr.ac.ru/ip-routing/iproute2* libnetlink [] LetBright [] 2000/11/09 linuxman: http://cmpp.linuxforum.net man man https://github.com/man-pages-zh/manpages- zh Linux Man Page 27 Apr 1999 NETLINK(7)