The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 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 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __LINUX_NETLINK_H |
| 20 | #define __LINUX_NETLINK_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <linux/socket.h> |
| 22 | #include <linux/types.h> |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | #define NETLINK_ROUTE 0 |
| 25 | #define NETLINK_UNUSED 1 |
| 26 | #define NETLINK_USERSOCK 2 |
| 27 | #define NETLINK_FIREWALL 3 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #define NETLINK_INET_DIAG 4 |
| 30 | #define NETLINK_NFLOG 5 |
| 31 | #define NETLINK_XFRM 6 |
| 32 | #define NETLINK_SELINUX 7 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | #define NETLINK_ISCSI 8 |
| 35 | #define NETLINK_AUDIT 9 |
| 36 | #define NETLINK_FIB_LOOKUP 10 |
| 37 | #define NETLINK_CONNECTOR 11 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | #define NETLINK_NETFILTER 12 |
| 40 | #define NETLINK_IP6_FW 13 |
| 41 | #define NETLINK_DNRTMSG 14 |
| 42 | #define NETLINK_KOBJECT_UEVENT 15 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #define NETLINK_GENERIC 16 |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 45 | #define NETLINK_SCSITRANSPORT 18 |
| 46 | #define NETLINK_ECRYPTFS 19 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 47 | #define NETLINK_RDMA 20 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 49 | #define NETLINK_IDLETIMER 21 |
| 50 | #define MAX_LINKS 32 |
| 51 | struct sockaddr_nl { |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | sa_family_t nl_family; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | unsigned short nl_pad; |
| 55 | __u32 nl_pid; |
| 56 | __u32 nl_groups; |
| 57 | }; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 59 | struct nlmsghdr { |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | __u32 nlmsg_len; |
| 61 | __u16 nlmsg_type; |
| 62 | __u16 nlmsg_flags; |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | __u32 nlmsg_seq; |
| 65 | __u32 nlmsg_pid; |
| 66 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 67 | #define NLM_F_REQUEST 1 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | #define NLM_F_MULTI 2 |
| 70 | #define NLM_F_ACK 4 |
| 71 | #define NLM_F_ECHO 8 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 72 | #define NLM_F_ROOT 0x100 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | #define NLM_F_MATCH 0x200 |
| 75 | #define NLM_F_ATOMIC 0x400 |
| 76 | #define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 77 | #define NLM_F_REPLACE 0x100 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | #define NLM_F_EXCL 0x200 |
| 80 | #define NLM_F_CREATE 0x400 |
| 81 | #define NLM_F_APPEND 0x800 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 82 | #define NLMSG_ALIGNTO 4U |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 84 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
| 85 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
| 86 | #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) |
| 87 | #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 89 | #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
| 90 | #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) |
| 91 | #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len)) |
| 92 | #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | #define NLMSG_NOOP 0x1 |
| 95 | #define NLMSG_ERROR 0x2 |
| 96 | #define NLMSG_DONE 0x3 |
| 97 | #define NLMSG_OVERRUN 0x4 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 99 | #define NLMSG_MIN_TYPE 0x10 |
| 100 | struct nlmsgerr { |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 101 | int error; |
| 102 | struct nlmsghdr msg; |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 105 | #define NETLINK_ADD_MEMBERSHIP 1 |
| 106 | #define NETLINK_DROP_MEMBERSHIP 2 |
| 107 | #define NETLINK_PKTINFO 3 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 109 | #define NETLINK_BROADCAST_ERROR 4 |
| 110 | #define NETLINK_NO_ENOBUFS 5 |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 111 | struct nl_pktinfo { |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 112 | __u32 group; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 114 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 115 | #define NET_MAJOR 36 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 116 | enum { |
| 117 | NETLINK_UNCONNECTED = 0, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 119 | NETLINK_CONNECTED, |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 120 | }; |
Ashish Sharma | 17ed54d | 2012-04-05 19:50:42 -0700 | [diff] [blame] | 121 | struct nlattr { |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 122 | __u16 nla_len; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 124 | __u16 nla_type; |
| 125 | }; |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 126 | #define NLA_F_NESTED (1 << 15) |
| 127 | #define NLA_F_NET_BYTEORDER (1 << 14) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 129 | #define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 130 | #define NLA_ALIGNTO 4 |
| 131 | #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) |
| 132 | #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 134 | #endif |