• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI__LINUX_RTNETLINK_H
8 #define _UAPI__LINUX_RTNETLINK_H
9 #include <linux/types.h>
10 #include <linux/netlink.h>
11 #include <linux/if_link.h>
12 #include <linux/if_addr.h>
13 #include <linux/neighbour.h>
14 #define RTNL_FAMILY_IPMR 128
15 #define RTNL_FAMILY_IP6MR 129
16 #define RTNL_FAMILY_MAX 129
17 enum {
18   RTM_BASE = 16,
19 #define RTM_BASE RTM_BASE
20   RTM_NEWLINK = 16,
21 #define RTM_NEWLINK RTM_NEWLINK
22   RTM_DELLINK,
23 #define RTM_DELLINK RTM_DELLINK
24   RTM_GETLINK,
25 #define RTM_GETLINK RTM_GETLINK
26   RTM_SETLINK,
27 #define RTM_SETLINK RTM_SETLINK
28   RTM_NEWADDR = 20,
29 #define RTM_NEWADDR RTM_NEWADDR
30   RTM_DELADDR,
31 #define RTM_DELADDR RTM_DELADDR
32   RTM_GETADDR,
33 #define RTM_GETADDR RTM_GETADDR
34   RTM_NEWROUTE = 24,
35 #define RTM_NEWROUTE RTM_NEWROUTE
36   RTM_DELROUTE,
37 #define RTM_DELROUTE RTM_DELROUTE
38   RTM_GETROUTE,
39 #define RTM_GETROUTE RTM_GETROUTE
40   RTM_NEWNEIGH = 28,
41 #define RTM_NEWNEIGH RTM_NEWNEIGH
42   RTM_DELNEIGH,
43 #define RTM_DELNEIGH RTM_DELNEIGH
44   RTM_GETNEIGH,
45 #define RTM_GETNEIGH RTM_GETNEIGH
46   RTM_NEWRULE = 32,
47 #define RTM_NEWRULE RTM_NEWRULE
48   RTM_DELRULE,
49 #define RTM_DELRULE RTM_DELRULE
50   RTM_GETRULE,
51 #define RTM_GETRULE RTM_GETRULE
52   RTM_NEWQDISC = 36,
53 #define RTM_NEWQDISC RTM_NEWQDISC
54   RTM_DELQDISC,
55 #define RTM_DELQDISC RTM_DELQDISC
56   RTM_GETQDISC,
57 #define RTM_GETQDISC RTM_GETQDISC
58   RTM_NEWTCLASS = 40,
59 #define RTM_NEWTCLASS RTM_NEWTCLASS
60   RTM_DELTCLASS,
61 #define RTM_DELTCLASS RTM_DELTCLASS
62   RTM_GETTCLASS,
63 #define RTM_GETTCLASS RTM_GETTCLASS
64   RTM_NEWTFILTER = 44,
65 #define RTM_NEWTFILTER RTM_NEWTFILTER
66   RTM_DELTFILTER,
67 #define RTM_DELTFILTER RTM_DELTFILTER
68   RTM_GETTFILTER,
69 #define RTM_GETTFILTER RTM_GETTFILTER
70   RTM_NEWACTION = 48,
71 #define RTM_NEWACTION RTM_NEWACTION
72   RTM_DELACTION,
73 #define RTM_DELACTION RTM_DELACTION
74   RTM_GETACTION,
75 #define RTM_GETACTION RTM_GETACTION
76   RTM_NEWPREFIX = 52,
77 #define RTM_NEWPREFIX RTM_NEWPREFIX
78   RTM_GETMULTICAST = 58,
79 #define RTM_GETMULTICAST RTM_GETMULTICAST
80   RTM_GETANYCAST = 62,
81 #define RTM_GETANYCAST RTM_GETANYCAST
82   RTM_NEWNEIGHTBL = 64,
83 #define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
84   RTM_GETNEIGHTBL = 66,
85 #define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
86   RTM_SETNEIGHTBL,
87 #define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
88   RTM_NEWNDUSEROPT = 68,
89 #define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT
90   RTM_NEWADDRLABEL = 72,
91 #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
92   RTM_DELADDRLABEL,
93 #define RTM_DELADDRLABEL RTM_DELADDRLABEL
94   RTM_GETADDRLABEL,
95 #define RTM_GETADDRLABEL RTM_GETADDRLABEL
96   RTM_GETDCB = 78,
97 #define RTM_GETDCB RTM_GETDCB
98   RTM_SETDCB,
99 #define RTM_SETDCB RTM_SETDCB
100   RTM_NEWNETCONF = 80,
101 #define RTM_NEWNETCONF RTM_NEWNETCONF
102   RTM_DELNETCONF,
103 #define RTM_DELNETCONF RTM_DELNETCONF
104   RTM_GETNETCONF = 82,
105 #define RTM_GETNETCONF RTM_GETNETCONF
106   RTM_NEWMDB = 84,
107 #define RTM_NEWMDB RTM_NEWMDB
108   RTM_DELMDB = 85,
109 #define RTM_DELMDB RTM_DELMDB
110   RTM_GETMDB = 86,
111 #define RTM_GETMDB RTM_GETMDB
112   RTM_NEWNSID = 88,
113 #define RTM_NEWNSID RTM_NEWNSID
114   RTM_DELNSID = 89,
115 #define RTM_DELNSID RTM_DELNSID
116   RTM_GETNSID = 90,
117 #define RTM_GETNSID RTM_GETNSID
118   RTM_NEWSTATS = 92,
119 #define RTM_NEWSTATS RTM_NEWSTATS
120   RTM_GETSTATS = 94,
121 #define RTM_GETSTATS RTM_GETSTATS
122   RTM_SETSTATS,
123 #define RTM_SETSTATS RTM_SETSTATS
124   RTM_NEWCACHEREPORT = 96,
125 #define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT
126   RTM_NEWCHAIN = 100,
127 #define RTM_NEWCHAIN RTM_NEWCHAIN
128   RTM_DELCHAIN,
129 #define RTM_DELCHAIN RTM_DELCHAIN
130   RTM_GETCHAIN,
131 #define RTM_GETCHAIN RTM_GETCHAIN
132   RTM_NEWNEXTHOP = 104,
133 #define RTM_NEWNEXTHOP RTM_NEWNEXTHOP
134   RTM_DELNEXTHOP,
135 #define RTM_DELNEXTHOP RTM_DELNEXTHOP
136   RTM_GETNEXTHOP,
137 #define RTM_GETNEXTHOP RTM_GETNEXTHOP
138   RTM_NEWLINKPROP = 108,
139 #define RTM_NEWLINKPROP RTM_NEWLINKPROP
140   RTM_DELLINKPROP,
141 #define RTM_DELLINKPROP RTM_DELLINKPROP
142   RTM_GETLINKPROP,
143 #define RTM_GETLINKPROP RTM_GETLINKPROP
144   RTM_NEWVLAN = 112,
145 #define RTM_NEWNVLAN RTM_NEWVLAN
146   RTM_DELVLAN,
147 #define RTM_DELVLAN RTM_DELVLAN
148   RTM_GETVLAN,
149 #define RTM_GETVLAN RTM_GETVLAN
150   RTM_NEWNEXTHOPBUCKET = 116,
151 #define RTM_NEWNEXTHOPBUCKET RTM_NEWNEXTHOPBUCKET
152   RTM_DELNEXTHOPBUCKET,
153 #define RTM_DELNEXTHOPBUCKET RTM_DELNEXTHOPBUCKET
154   RTM_GETNEXTHOPBUCKET,
155 #define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET
156   RTM_NEWTUNNEL = 120,
157 #define RTM_NEWTUNNEL RTM_NEWTUNNEL
158   RTM_DELTUNNEL,
159 #define RTM_DELTUNNEL RTM_DELTUNNEL
160   RTM_GETTUNNEL,
161 #define RTM_GETTUNNEL RTM_GETTUNNEL
162   __RTM_MAX,
163 #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
164 };
165 #define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
166 #define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
167 #define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
168 struct rtattr {
169   unsigned short rta_len;
170   unsigned short rta_type;
171 };
172 #define RTA_ALIGNTO 4U
173 #define RTA_ALIGN(len) (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO - 1))
174 #define RTA_OK(rta,len) ((len) >= (int) sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len))
175 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr *) (((char *) (rta)) + RTA_ALIGN((rta)->rta_len)))
176 #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
177 #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
178 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0)))
179 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0))
180 struct rtmsg {
181   unsigned char rtm_family;
182   unsigned char rtm_dst_len;
183   unsigned char rtm_src_len;
184   unsigned char rtm_tos;
185   unsigned char rtm_table;
186   unsigned char rtm_protocol;
187   unsigned char rtm_scope;
188   unsigned char rtm_type;
189   unsigned rtm_flags;
190 };
191 enum {
192   RTN_UNSPEC,
193   RTN_UNICAST,
194   RTN_LOCAL,
195   RTN_BROADCAST,
196   RTN_ANYCAST,
197   RTN_MULTICAST,
198   RTN_BLACKHOLE,
199   RTN_UNREACHABLE,
200   RTN_PROHIBIT,
201   RTN_THROW,
202   RTN_NAT,
203   RTN_XRESOLVE,
204   __RTN_MAX
205 };
206 #define RTN_MAX (__RTN_MAX - 1)
207 #define RTPROT_UNSPEC 0
208 #define RTPROT_REDIRECT 1
209 #define RTPROT_KERNEL 2
210 #define RTPROT_BOOT 3
211 #define RTPROT_STATIC 4
212 #define RTPROT_GATED 8
213 #define RTPROT_RA 9
214 #define RTPROT_MRT 10
215 #define RTPROT_ZEBRA 11
216 #define RTPROT_BIRD 12
217 #define RTPROT_DNROUTED 13
218 #define RTPROT_XORP 14
219 #define RTPROT_NTK 15
220 #define RTPROT_DHCP 16
221 #define RTPROT_MROUTED 17
222 #define RTPROT_KEEPALIVED 18
223 #define RTPROT_BABEL 42
224 #define RTPROT_OPENR 99
225 #define RTPROT_BGP 186
226 #define RTPROT_ISIS 187
227 #define RTPROT_OSPF 188
228 #define RTPROT_RIP 189
229 #define RTPROT_EIGRP 192
230 enum rt_scope_t {
231   RT_SCOPE_UNIVERSE = 0,
232   RT_SCOPE_SITE = 200,
233   RT_SCOPE_LINK = 253,
234   RT_SCOPE_HOST = 254,
235   RT_SCOPE_NOWHERE = 255
236 };
237 #define RTM_F_NOTIFY 0x100
238 #define RTM_F_CLONED 0x200
239 #define RTM_F_EQUALIZE 0x400
240 #define RTM_F_PREFIX 0x800
241 #define RTM_F_LOOKUP_TABLE 0x1000
242 #define RTM_F_FIB_MATCH 0x2000
243 #define RTM_F_OFFLOAD 0x4000
244 #define RTM_F_TRAP 0x8000
245 #define RTM_F_OFFLOAD_FAILED 0x20000000
246 enum rt_class_t {
247   RT_TABLE_UNSPEC = 0,
248   RT_TABLE_COMPAT = 252,
249   RT_TABLE_DEFAULT = 253,
250   RT_TABLE_MAIN = 254,
251   RT_TABLE_LOCAL = 255,
252   RT_TABLE_MAX = 0xFFFFFFFF
253 };
254 enum rtattr_type_t {
255   RTA_UNSPEC,
256   RTA_DST,
257   RTA_SRC,
258   RTA_IIF,
259   RTA_OIF,
260   RTA_GATEWAY,
261   RTA_PRIORITY,
262   RTA_PREFSRC,
263   RTA_METRICS,
264   RTA_MULTIPATH,
265   RTA_PROTOINFO,
266   RTA_FLOW,
267   RTA_CACHEINFO,
268   RTA_SESSION,
269   RTA_MP_ALGO,
270   RTA_TABLE,
271   RTA_MARK,
272   RTA_MFC_STATS,
273   RTA_VIA,
274   RTA_NEWDST,
275   RTA_PREF,
276   RTA_ENCAP_TYPE,
277   RTA_ENCAP,
278   RTA_EXPIRES,
279   RTA_PAD,
280   RTA_UID,
281   RTA_TTL_PROPAGATE,
282   RTA_IP_PROTO,
283   RTA_SPORT,
284   RTA_DPORT,
285   RTA_NH_ID,
286   __RTA_MAX
287 };
288 #define RTA_MAX (__RTA_MAX - 1)
289 #define RTM_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
290 #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct rtmsg))
291 struct rtnexthop {
292   unsigned short rtnh_len;
293   unsigned char rtnh_flags;
294   unsigned char rtnh_hops;
295   int rtnh_ifindex;
296 };
297 #define RTNH_F_DEAD 1
298 #define RTNH_F_PERVASIVE 2
299 #define RTNH_F_ONLINK 4
300 #define RTNH_F_OFFLOAD 8
301 #define RTNH_F_LINKDOWN 16
302 #define RTNH_F_UNRESOLVED 32
303 #define RTNH_F_TRAP 64
304 #define RTNH_COMPARE_MASK (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD | RTNH_F_TRAP)
305 #define RTNH_ALIGNTO 4
306 #define RTNH_ALIGN(len) (((len) + RTNH_ALIGNTO - 1) & ~(RTNH_ALIGNTO - 1))
307 #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && ((int) (rtnh)->rtnh_len) <= (len))
308 #define RTNH_NEXT(rtnh) ((struct rtnexthop *) (((char *) (rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
309 #define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
310 #define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
311 #define RTNH_DATA(rtnh) ((struct rtattr *) (((char *) (rtnh)) + RTNH_LENGTH(0)))
312 struct rtvia {
313   __kernel_sa_family_t rtvia_family;
314   __u8 rtvia_addr[];
315 };
316 struct rta_cacheinfo {
317   __u32 rta_clntref;
318   __u32 rta_lastuse;
319   __s32 rta_expires;
320   __u32 rta_error;
321   __u32 rta_used;
322 #define RTNETLINK_HAVE_PEERINFO 1
323   __u32 rta_id;
324   __u32 rta_ts;
325   __u32 rta_tsage;
326 };
327 enum {
328   RTAX_UNSPEC,
329 #define RTAX_UNSPEC RTAX_UNSPEC
330   RTAX_LOCK,
331 #define RTAX_LOCK RTAX_LOCK
332   RTAX_MTU,
333 #define RTAX_MTU RTAX_MTU
334   RTAX_WINDOW,
335 #define RTAX_WINDOW RTAX_WINDOW
336   RTAX_RTT,
337 #define RTAX_RTT RTAX_RTT
338   RTAX_RTTVAR,
339 #define RTAX_RTTVAR RTAX_RTTVAR
340   RTAX_SSTHRESH,
341 #define RTAX_SSTHRESH RTAX_SSTHRESH
342   RTAX_CWND,
343 #define RTAX_CWND RTAX_CWND
344   RTAX_ADVMSS,
345 #define RTAX_ADVMSS RTAX_ADVMSS
346   RTAX_REORDERING,
347 #define RTAX_REORDERING RTAX_REORDERING
348   RTAX_HOPLIMIT,
349 #define RTAX_HOPLIMIT RTAX_HOPLIMIT
350   RTAX_INITCWND,
351 #define RTAX_INITCWND RTAX_INITCWND
352   RTAX_FEATURES,
353 #define RTAX_FEATURES RTAX_FEATURES
354   RTAX_RTO_MIN,
355 #define RTAX_RTO_MIN RTAX_RTO_MIN
356   RTAX_INITRWND,
357 #define RTAX_INITRWND RTAX_INITRWND
358   RTAX_QUICKACK,
359 #define RTAX_QUICKACK RTAX_QUICKACK
360   RTAX_CC_ALGO,
361 #define RTAX_CC_ALGO RTAX_CC_ALGO
362   RTAX_FASTOPEN_NO_COOKIE,
363 #define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE
364   __RTAX_MAX
365 };
366 #define RTAX_MAX (__RTAX_MAX - 1)
367 #define RTAX_FEATURE_ECN (1 << 0)
368 #define RTAX_FEATURE_SACK (1 << 1)
369 #define RTAX_FEATURE_TIMESTAMP (1 << 2)
370 #define RTAX_FEATURE_ALLFRAG (1 << 3)
371 #define RTAX_FEATURE_TCP_USEC_TS (1 << 4)
372 #define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG | RTAX_FEATURE_TCP_USEC_TS)
373 struct rta_session {
374   __u8 proto;
375   __u8 pad1;
376   __u16 pad2;
377   union {
378     struct {
379       __u16 sport;
380       __u16 dport;
381     } ports;
382     struct {
383       __u8 type;
384       __u8 code;
385       __u16 ident;
386     } icmpt;
387     __u32 spi;
388   } u;
389 };
390 struct rta_mfc_stats {
391   __u64 mfcs_packets;
392   __u64 mfcs_bytes;
393   __u64 mfcs_wrong_if;
394 };
395 struct rtgenmsg {
396   unsigned char rtgen_family;
397 };
398 struct ifinfomsg {
399   unsigned char ifi_family;
400   unsigned char __ifi_pad;
401   unsigned short ifi_type;
402   int ifi_index;
403   unsigned ifi_flags;
404   unsigned ifi_change;
405 };
406 struct prefixmsg {
407   unsigned char prefix_family;
408   unsigned char prefix_pad1;
409   unsigned short prefix_pad2;
410   int prefix_ifindex;
411   unsigned char prefix_type;
412   unsigned char prefix_len;
413   unsigned char prefix_flags;
414   unsigned char prefix_pad3;
415 };
416 enum {
417   PREFIX_UNSPEC,
418   PREFIX_ADDRESS,
419   PREFIX_CACHEINFO,
420   __PREFIX_MAX
421 };
422 #define PREFIX_MAX (__PREFIX_MAX - 1)
423 struct prefix_cacheinfo {
424   __u32 preferred_time;
425   __u32 valid_time;
426 };
427 struct tcmsg {
428   unsigned char tcm_family;
429   unsigned char tcm__pad1;
430   unsigned short tcm__pad2;
431   int tcm_ifindex;
432   __u32 tcm_handle;
433   __u32 tcm_parent;
434 #define tcm_block_index tcm_parent
435   __u32 tcm_info;
436 };
437 #define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU)
438 enum {
439   TCA_UNSPEC,
440   TCA_KIND,
441   TCA_OPTIONS,
442   TCA_STATS,
443   TCA_XSTATS,
444   TCA_RATE,
445   TCA_FCNT,
446   TCA_STATS2,
447   TCA_STAB,
448   TCA_PAD,
449   TCA_DUMP_INVISIBLE,
450   TCA_CHAIN,
451   TCA_HW_OFFLOAD,
452   TCA_INGRESS_BLOCK,
453   TCA_EGRESS_BLOCK,
454   TCA_DUMP_FLAGS,
455   TCA_EXT_WARN_MSG,
456   __TCA_MAX
457 };
458 #define TCA_MAX (__TCA_MAX - 1)
459 #define TCA_DUMP_FLAGS_TERSE (1 << 0)
460 #define TCA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
461 #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct tcmsg))
462 struct nduseroptmsg {
463   unsigned char nduseropt_family;
464   unsigned char nduseropt_pad1;
465   unsigned short nduseropt_opts_len;
466   int nduseropt_ifindex;
467   __u8 nduseropt_icmp_type;
468   __u8 nduseropt_icmp_code;
469   unsigned short nduseropt_pad2;
470   unsigned int nduseropt_pad3;
471 };
472 enum {
473   NDUSEROPT_UNSPEC,
474   NDUSEROPT_SRCADDR,
475   __NDUSEROPT_MAX
476 };
477 #define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1)
478 #define RTMGRP_LINK 1
479 #define RTMGRP_NOTIFY 2
480 #define RTMGRP_NEIGH 4
481 #define RTMGRP_TC 8
482 #define RTMGRP_IPV4_IFADDR 0x10
483 #define RTMGRP_IPV4_MROUTE 0x20
484 #define RTMGRP_IPV4_ROUTE 0x40
485 #define RTMGRP_IPV4_RULE 0x80
486 #define RTMGRP_IPV6_IFADDR 0x100
487 #define RTMGRP_IPV6_MROUTE 0x200
488 #define RTMGRP_IPV6_ROUTE 0x400
489 #define RTMGRP_IPV6_IFINFO 0x800
490 #define RTMGRP_DECnet_IFADDR 0x1000
491 #define RTMGRP_DECnet_ROUTE 0x4000
492 #define RTMGRP_IPV6_PREFIX 0x20000
493 enum rtnetlink_groups {
494   RTNLGRP_NONE,
495 #define RTNLGRP_NONE RTNLGRP_NONE
496   RTNLGRP_LINK,
497 #define RTNLGRP_LINK RTNLGRP_LINK
498   RTNLGRP_NOTIFY,
499 #define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
500   RTNLGRP_NEIGH,
501 #define RTNLGRP_NEIGH RTNLGRP_NEIGH
502   RTNLGRP_TC,
503 #define RTNLGRP_TC RTNLGRP_TC
504   RTNLGRP_IPV4_IFADDR,
505 #define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
506   RTNLGRP_IPV4_MROUTE,
507 #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
508   RTNLGRP_IPV4_ROUTE,
509 #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
510   RTNLGRP_IPV4_RULE,
511 #define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE
512   RTNLGRP_IPV6_IFADDR,
513 #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
514   RTNLGRP_IPV6_MROUTE,
515 #define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
516   RTNLGRP_IPV6_ROUTE,
517 #define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
518   RTNLGRP_IPV6_IFINFO,
519 #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
520   RTNLGRP_DECnet_IFADDR,
521 #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
522   RTNLGRP_NOP2,
523   RTNLGRP_DECnet_ROUTE,
524 #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
525   RTNLGRP_DECnet_RULE,
526 #define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE
527   RTNLGRP_NOP4,
528   RTNLGRP_IPV6_PREFIX,
529 #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
530   RTNLGRP_IPV6_RULE,
531 #define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE
532   RTNLGRP_ND_USEROPT,
533 #define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT
534   RTNLGRP_PHONET_IFADDR,
535 #define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR
536   RTNLGRP_PHONET_ROUTE,
537 #define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE
538   RTNLGRP_DCB,
539 #define RTNLGRP_DCB RTNLGRP_DCB
540   RTNLGRP_IPV4_NETCONF,
541 #define RTNLGRP_IPV4_NETCONF RTNLGRP_IPV4_NETCONF
542   RTNLGRP_IPV6_NETCONF,
543 #define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF
544   RTNLGRP_MDB,
545 #define RTNLGRP_MDB RTNLGRP_MDB
546   RTNLGRP_MPLS_ROUTE,
547 #define RTNLGRP_MPLS_ROUTE RTNLGRP_MPLS_ROUTE
548   RTNLGRP_NSID,
549 #define RTNLGRP_NSID RTNLGRP_NSID
550   RTNLGRP_MPLS_NETCONF,
551 #define RTNLGRP_MPLS_NETCONF RTNLGRP_MPLS_NETCONF
552   RTNLGRP_IPV4_MROUTE_R,
553 #define RTNLGRP_IPV4_MROUTE_R RTNLGRP_IPV4_MROUTE_R
554   RTNLGRP_IPV6_MROUTE_R,
555 #define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R
556   RTNLGRP_NEXTHOP,
557 #define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP
558   RTNLGRP_BRVLAN,
559 #define RTNLGRP_BRVLAN RTNLGRP_BRVLAN
560   RTNLGRP_MCTP_IFADDR,
561 #define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR
562   RTNLGRP_TUNNEL,
563 #define RTNLGRP_TUNNEL RTNLGRP_TUNNEL
564   RTNLGRP_STATS,
565 #define RTNLGRP_STATS RTNLGRP_STATS
566   __RTNLGRP_MAX
567 };
568 #define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
569 struct tcamsg {
570   unsigned char tca_family;
571   unsigned char tca__pad1;
572   unsigned short tca__pad2;
573 };
574 enum {
575   TCA_ROOT_UNSPEC,
576   TCA_ROOT_TAB,
577 #define TCA_ACT_TAB TCA_ROOT_TAB
578 #define TCAA_MAX TCA_ROOT_TAB
579   TCA_ROOT_FLAGS,
580   TCA_ROOT_COUNT,
581   TCA_ROOT_TIME_DELTA,
582   TCA_ROOT_EXT_WARN_MSG,
583   __TCA_ROOT_MAX,
584 #define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
585 };
586 #define TA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
587 #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct tcamsg))
588 #define TCA_FLAG_LARGE_DUMP_ON (1 << 0)
589 #define TCA_ACT_FLAG_LARGE_DUMP_ON TCA_FLAG_LARGE_DUMP_ON
590 #define TCA_ACT_FLAG_TERSE_DUMP (1 << 1)
591 #define RTEXT_FILTER_VF (1 << 0)
592 #define RTEXT_FILTER_BRVLAN (1 << 1)
593 #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
594 #define RTEXT_FILTER_SKIP_STATS (1 << 3)
595 #define RTEXT_FILTER_MRP (1 << 4)
596 #define RTEXT_FILTER_CFM_CONFIG (1 << 5)
597 #define RTEXT_FILTER_CFM_STATUS (1 << 6)
598 #define RTEXT_FILTER_MST (1 << 7)
599 #endif
600