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