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  ***
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_BATMAN_ADV_H_
20 #define _UAPI_LINUX_BATMAN_ADV_H_
21 #define BATADV_NL_NAME "batadv"
22 #define BATADV_NL_MCAST_GROUP_CONFIG "config"
23 #define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
24 enum batadv_tt_client_flags {
25   BATADV_TT_CLIENT_DEL = (1 << 0),
26   BATADV_TT_CLIENT_ROAM = (1 << 1),
27   BATADV_TT_CLIENT_WIFI = (1 << 4),
28   BATADV_TT_CLIENT_ISOLA = (1 << 5),
29   BATADV_TT_CLIENT_NOPURGE = (1 << 8),
30   BATADV_TT_CLIENT_NEW = (1 << 9),
31   BATADV_TT_CLIENT_PENDING = (1 << 10),
32   BATADV_TT_CLIENT_TEMP = (1 << 11),
33 };
34 enum batadv_mcast_flags_priv {
35   BATADV_MCAST_FLAGS_BRIDGED = (1 << 0),
36   BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS = (1 << 1),
37   BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS = (1 << 2),
38   BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING = (1 << 3),
39   BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4),
40 };
41 enum batadv_gw_modes {
42   BATADV_GW_MODE_OFF,
43   BATADV_GW_MODE_CLIENT,
44   BATADV_GW_MODE_SERVER,
45 };
46 enum batadv_nl_attrs {
47   BATADV_ATTR_UNSPEC,
48   BATADV_ATTR_VERSION,
49   BATADV_ATTR_ALGO_NAME,
50   BATADV_ATTR_MESH_IFINDEX,
51   BATADV_ATTR_MESH_IFNAME,
52   BATADV_ATTR_MESH_ADDRESS,
53   BATADV_ATTR_HARD_IFINDEX,
54   BATADV_ATTR_HARD_IFNAME,
55   BATADV_ATTR_HARD_ADDRESS,
56   BATADV_ATTR_ORIG_ADDRESS,
57   BATADV_ATTR_TPMETER_RESULT,
58   BATADV_ATTR_TPMETER_TEST_TIME,
59   BATADV_ATTR_TPMETER_BYTES,
60   BATADV_ATTR_TPMETER_COOKIE,
61   BATADV_ATTR_PAD,
62   BATADV_ATTR_ACTIVE,
63   BATADV_ATTR_TT_ADDRESS,
64   BATADV_ATTR_TT_TTVN,
65   BATADV_ATTR_TT_LAST_TTVN,
66   BATADV_ATTR_TT_CRC32,
67   BATADV_ATTR_TT_VID,
68   BATADV_ATTR_TT_FLAGS,
69   BATADV_ATTR_FLAG_BEST,
70   BATADV_ATTR_LAST_SEEN_MSECS,
71   BATADV_ATTR_NEIGH_ADDRESS,
72   BATADV_ATTR_TQ,
73   BATADV_ATTR_THROUGHPUT,
74   BATADV_ATTR_BANDWIDTH_UP,
75   BATADV_ATTR_BANDWIDTH_DOWN,
76   BATADV_ATTR_ROUTER,
77   BATADV_ATTR_BLA_OWN,
78   BATADV_ATTR_BLA_ADDRESS,
79   BATADV_ATTR_BLA_VID,
80   BATADV_ATTR_BLA_BACKBONE,
81   BATADV_ATTR_BLA_CRC,
82   BATADV_ATTR_DAT_CACHE_IP4ADDRESS,
83   BATADV_ATTR_DAT_CACHE_HWADDRESS,
84   BATADV_ATTR_DAT_CACHE_VID,
85   BATADV_ATTR_MCAST_FLAGS,
86   BATADV_ATTR_MCAST_FLAGS_PRIV,
87   BATADV_ATTR_VLANID,
88   BATADV_ATTR_AGGREGATED_OGMS_ENABLED,
89   BATADV_ATTR_AP_ISOLATION_ENABLED,
90   BATADV_ATTR_ISOLATION_MARK,
91   BATADV_ATTR_ISOLATION_MASK,
92   BATADV_ATTR_BONDING_ENABLED,
93   BATADV_ATTR_BRIDGE_LOOP_AVOIDANCE_ENABLED,
94   BATADV_ATTR_DISTRIBUTED_ARP_TABLE_ENABLED,
95   BATADV_ATTR_FRAGMENTATION_ENABLED,
96   BATADV_ATTR_GW_BANDWIDTH_DOWN,
97   BATADV_ATTR_GW_BANDWIDTH_UP,
98   BATADV_ATTR_GW_MODE,
99   BATADV_ATTR_GW_SEL_CLASS,
100   BATADV_ATTR_HOP_PENALTY,
101   BATADV_ATTR_LOG_LEVEL,
102   BATADV_ATTR_MULTICAST_FORCEFLOOD_ENABLED,
103   BATADV_ATTR_NETWORK_CODING_ENABLED,
104   BATADV_ATTR_ORIG_INTERVAL,
105   BATADV_ATTR_ELP_INTERVAL,
106   BATADV_ATTR_THROUGHPUT_OVERRIDE,
107   BATADV_ATTR_MULTICAST_FANOUT,
108   __BATADV_ATTR_AFTER_LAST,
109   NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
110   BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
111 };
112 enum batadv_nl_commands {
113   BATADV_CMD_UNSPEC,
114   BATADV_CMD_GET_MESH,
115   BATADV_CMD_GET_MESH_INFO = BATADV_CMD_GET_MESH,
116   BATADV_CMD_TP_METER,
117   BATADV_CMD_TP_METER_CANCEL,
118   BATADV_CMD_GET_ROUTING_ALGOS,
119   BATADV_CMD_GET_HARDIF,
120   BATADV_CMD_GET_HARDIFS = BATADV_CMD_GET_HARDIF,
121   BATADV_CMD_GET_TRANSTABLE_LOCAL,
122   BATADV_CMD_GET_TRANSTABLE_GLOBAL,
123   BATADV_CMD_GET_ORIGINATORS,
124   BATADV_CMD_GET_NEIGHBORS,
125   BATADV_CMD_GET_GATEWAYS,
126   BATADV_CMD_GET_BLA_CLAIM,
127   BATADV_CMD_GET_BLA_BACKBONE,
128   BATADV_CMD_GET_DAT_CACHE,
129   BATADV_CMD_GET_MCAST_FLAGS,
130   BATADV_CMD_SET_MESH,
131   BATADV_CMD_SET_HARDIF,
132   BATADV_CMD_GET_VLAN,
133   BATADV_CMD_SET_VLAN,
134   __BATADV_CMD_AFTER_LAST,
135   BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
136 };
137 enum batadv_tp_meter_reason {
138   BATADV_TP_REASON_COMPLETE = 3,
139   BATADV_TP_REASON_CANCEL = 4,
140   BATADV_TP_REASON_DST_UNREACHABLE = 128,
141   BATADV_TP_REASON_RESEND_LIMIT = 129,
142   BATADV_TP_REASON_ALREADY_ONGOING = 130,
143   BATADV_TP_REASON_MEMORY_ERROR = 131,
144   BATADV_TP_REASON_CANT_SEND = 132,
145   BATADV_TP_REASON_TOO_MANY = 133,
146 };
147 #endif
148