netlink.h revision 11cd02dfb91661c65134cac258cf5924270e9d2
111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/**************************************************************************** 211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert **************************************************************************** 311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** 411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** This header was automatically generated from a Linux kernel header 511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** of the same name, to make information necessary for userspace to 611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** call into the kernel available to libc. It contains only constants, 711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** structures, and macros generated from the original header, and thus, 811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** contains no copyrightable information. 911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** 1011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** To edit the content of this header, modify the corresponding 1111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** source file (e.g. under external/kernel-headers/original/) then 1211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** run bionic/libc/kernel/tools/update_all.py 1311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** 1411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** Any manual change here will be lost the next time this script will 1511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** be run. You've been warned! 1611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert *** 1711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert **************************************************************************** 1811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert ****************************************************************************/ 1911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#ifndef _UAPI__LINUX_NETLINK_H 2011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define _UAPI__LINUX_NETLINK_H 2111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include <linux/kernel.h> 2211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include <linux/socket.h> 2311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 2411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#include <linux/types.h> 2511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_ROUTE 0 2611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_UNUSED 1 2711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_USERSOCK 2 2811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 2911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_FIREWALL 3 3011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_SOCK_DIAG 4 3111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_NFLOG 5 3211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_XFRM 6 3311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 3411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_SELINUX 7 3511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_ISCSI 8 3611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_AUDIT 9 3711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_FIB_LOOKUP 10 3811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 3911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_CONNECTOR 11 4011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_NETFILTER 12 4111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_IP6_FW 13 4211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_DNRTMSG 14 4311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 4411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_KOBJECT_UEVENT 15 4511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_GENERIC 16 4611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_SCSITRANSPORT 18 4711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_ECRYPTFS 19 4811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 4911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_RDMA 20 5011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_CRYPTO 21 5111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_INET_DIAG NETLINK_SOCK_DIAG 5211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define MAX_LINKS 32 5311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 5411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct sockaddr_nl { 5511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __kernel_sa_family_t nl_family; 5611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned short nl_pad; 5711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nl_pid; 5811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 5911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nl_groups; 6011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 6111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nlmsghdr { 6211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nlmsg_len; 6311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 6411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u16 nlmsg_type; 6511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u16 nlmsg_flags; 6611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nlmsg_seq; 6711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nlmsg_pid; 6811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 6911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 7011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_REQUEST 1 7111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_MULTI 2 7211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_ACK 4 7311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 7411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_ECHO 8 7511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_DUMP_INTR 16 7611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_ROOT 0x100 7711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_MATCH 0x200 7811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 7911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_ATOMIC 0x400 8011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) 8111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_REPLACE 0x100 8211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_EXCL 0x200 8311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 8411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_CREATE 0x400 8511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLM_F_APPEND 0x800 8611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_ALIGNTO 4U 8711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) 8811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 8911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 9011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN) 9111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) 9211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 9311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 9411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) 9511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) 9611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) 9711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_NOOP 0x1 9811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 9911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_ERROR 0x2 10011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_DONE 0x3 10111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_OVERRUN 0x4 10211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLMSG_MIN_TYPE 0x10 10311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 10411cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nlmsgerr { 10511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert int error; 10611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert struct nlmsghdr msg; 10711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 10811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 10911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_ADD_MEMBERSHIP 1 11011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_DROP_MEMBERSHIP 2 11111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_PKTINFO 3 11211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_BROADCAST_ERROR 4 11311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 11411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_NO_ENOBUFS 5 11511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_RX_RING 6 11611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NETLINK_TX_RING 7 11711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nl_pktinfo { 11811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 11911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 group; 12011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 12111cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nl_mmap_req { 12211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_block_size; 12311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 12411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_block_nr; 12511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_frame_size; 12611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_frame_nr; 12711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 12811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 12911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nl_mmap_hdr { 13011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_status; 13111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert unsigned int nm_len; 13211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nm_group; 13311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 13411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nm_pid; 13511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nm_uid; 13611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u32 nm_gid; 13711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 13811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 13911cd02dfb91661c65134cac258cf5924270e9d2Dan Albertenum nl_mmap_status { 14011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NL_MMAP_STATUS_UNUSED, 14111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NL_MMAP_STATUS_RESERVED, 14211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NL_MMAP_STATUS_VALID, 14311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 14411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NL_MMAP_STATUS_COPY, 14511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NL_MMAP_STATUS_SKIP, 14611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 14711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO 14811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 14911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT) 15011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr)) 15111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NET_MAJOR 36 15211cd02dfb91661c65134cac258cf5924270e9d2Dan Albertenum { 15311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 15411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NETLINK_UNCONNECTED = 0, 15511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert NETLINK_CONNECTED, 15611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 15711cd02dfb91661c65134cac258cf5924270e9d2Dan Albertstruct nlattr { 15811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 15911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u16 nla_len; 16011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert __u16 nla_type; 16111cd02dfb91661c65134cac258cf5924270e9d2Dan Albert}; 16211cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_F_NESTED (1 << 15) 16311cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 16411cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_F_NET_BYTEORDER (1 << 14) 16511cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) 16611cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_ALIGNTO 4 16711cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) 16811cd02dfb91661c65134cac258cf5924270e9d2Dan Albert/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 16911cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) 17011cd02dfb91661c65134cac258cf5924270e9d2Dan Albert#endif 171