blob: bcdac472066c1df2ab20f07fb62c0db08419e1d9 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__LINUX_NETLINK_H
20#define _UAPI__LINUX_NETLINK_H
21#include <linux/kernel.h>
22#include <linux/socket.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/types.h>
25#define NETLINK_ROUTE 0
26#define NETLINK_UNUSED 1
27#define NETLINK_USERSOCK 2
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define NETLINK_FIREWALL 3
30#define NETLINK_SOCK_DIAG 4
31#define NETLINK_NFLOG 5
32#define NETLINK_XFRM 6
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define NETLINK_SELINUX 7
35#define NETLINK_ISCSI 8
36#define NETLINK_AUDIT 9
37#define NETLINK_FIB_LOOKUP 10
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define NETLINK_CONNECTOR 11
40#define NETLINK_NETFILTER 12
41#define NETLINK_IP6_FW 13
42#define NETLINK_DNRTMSG 14
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define NETLINK_KOBJECT_UEVENT 15
45#define NETLINK_GENERIC 16
46#define NETLINK_SCSITRANSPORT 18
47#define NETLINK_ECRYPTFS 19
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define NETLINK_RDMA 20
50#define NETLINK_CRYPTO 21
51#define NETLINK_INET_DIAG NETLINK_SOCK_DIAG
52#define MAX_LINKS 32
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct sockaddr_nl {
Tao Baod7db5942015-01-28 10:07:51 -080055 __kernel_sa_family_t nl_family;
56 unsigned short nl_pad;
57 __u32 nl_pid;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 nl_groups;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61struct nlmsghdr {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u32 nlmsg_len;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __u16 nlmsg_type;
65 __u16 nlmsg_flags;
66 __u32 nlmsg_seq;
67 __u32 nlmsg_pid;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70#define NLM_F_REQUEST 1
71#define NLM_F_MULTI 2
72#define NLM_F_ACK 4
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define NLM_F_ECHO 8
75#define NLM_F_DUMP_INTR 16
Christopher Ferris05d08e92016-02-04 13:16:38 -080076#define NLM_F_DUMP_FILTERED 32
Ben Cheng655a7c02013-10-16 16:09:24 -070077#define NLM_F_ROOT 0x100
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080079#define NLM_F_MATCH 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define NLM_F_ATOMIC 0x400
Tao Baod7db5942015-01-28 10:07:51 -080081#define NLM_F_DUMP (NLM_F_ROOT | NLM_F_MATCH)
Ben Cheng655a7c02013-10-16 16:09:24 -070082#define NLM_F_REPLACE 0x100
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080084#define NLM_F_EXCL 0x200
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define NLM_F_CREATE 0x400
86#define NLM_F_APPEND 0x800
87#define NLMSG_ALIGNTO 4U
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080089#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
91#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
92#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094#define NLMSG_DATA(nlh) ((void *) (((char *) nlh) + NLMSG_LENGTH(0)))
Tao Baod7db5942015-01-28 10:07:51 -080095#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr *) (((char *) (nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
96#define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len))
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080099#define NLMSG_NOOP 0x1
Ben Cheng655a7c02013-10-16 16:09:24 -0700100#define NLMSG_ERROR 0x2
101#define NLMSG_DONE 0x3
102#define NLMSG_OVERRUN 0x4
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104#define NLMSG_MIN_TYPE 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -0700105struct nlmsgerr {
Tao Baod7db5942015-01-28 10:07:51 -0800106 int error;
107 struct nlmsghdr msg;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109};
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define NETLINK_ADD_MEMBERSHIP 1
111#define NETLINK_DROP_MEMBERSHIP 2
112#define NETLINK_PKTINFO 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114#define NETLINK_BROADCAST_ERROR 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700115#define NETLINK_NO_ENOBUFS 5
116#define NETLINK_RX_RING 6
117#define NETLINK_TX_RING 7
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define NETLINK_LISTEN_ALL_NSID 8
120#define NETLINK_LIST_MEMBERSHIPS 9
121#define NETLINK_CAP_ACK 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700122struct nl_pktinfo {
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u32 group;
Ben Cheng655a7c02013-10-16 16:09:24 -0700125};
126struct nl_mmap_req {
Tao Baod7db5942015-01-28 10:07:51 -0800127 unsigned int nm_block_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 unsigned int nm_block_nr;
130 unsigned int nm_frame_size;
131 unsigned int nm_frame_nr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700132};
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134struct nl_mmap_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800135 unsigned int nm_status;
136 unsigned int nm_len;
137 __u32 nm_group;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 __u32 nm_pid;
140 __u32 nm_uid;
141 __u32 nm_gid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700142};
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144enum nl_mmap_status {
Tao Baod7db5942015-01-28 10:07:51 -0800145 NL_MMAP_STATUS_UNUSED,
146 NL_MMAP_STATUS_RESERVED,
147 NL_MMAP_STATUS_VALID,
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 NL_MMAP_STATUS_COPY,
150 NL_MMAP_STATUS_SKIP,
Ben Cheng655a7c02013-10-16 16:09:24 -0700151};
152#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
155#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
156#define NET_MAJOR 36
157enum {
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 NETLINK_UNCONNECTED = 0,
160 NETLINK_CONNECTED,
Ben Cheng655a7c02013-10-16 16:09:24 -0700161};
162struct nlattr {
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 __u16 nla_len;
165 __u16 nla_type;
Ben Cheng655a7c02013-10-16 16:09:24 -0700166};
167#define NLA_F_NESTED (1 << 15)
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169#define NLA_F_NET_BYTEORDER (1 << 14)
170#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
171#define NLA_ALIGNTO 4
172#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
175#endif