aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rtnetlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r--include/linux/rtnetlink.h63
1 files changed, 23 insertions, 40 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index adf2068d12b5..14fc906ed602 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -127,8 +127,7 @@ enum {
127 with attribute type. 127 with attribute type.
128 */ 128 */
129 129
130struct rtattr 130struct rtattr {
131{
132 unsigned short rta_len; 131 unsigned short rta_len;
133 unsigned short rta_type; 132 unsigned short rta_type;
134}; 133};
@@ -154,8 +153,7 @@ struct rtattr
154 * Definitions used in routing table administration. 153 * Definitions used in routing table administration.
155 ****/ 154 ****/
156 155
157struct rtmsg 156struct rtmsg {
158{
159 unsigned char rtm_family; 157 unsigned char rtm_family;
160 unsigned char rtm_dst_len; 158 unsigned char rtm_dst_len;
161 unsigned char rtm_src_len; 159 unsigned char rtm_src_len;
@@ -171,8 +169,7 @@ struct rtmsg
171 169
172/* rtm_type */ 170/* rtm_type */
173 171
174enum 172enum {
175{
176 RTN_UNSPEC, 173 RTN_UNSPEC,
177 RTN_UNICAST, /* Gateway or direct route */ 174 RTN_UNICAST, /* Gateway or direct route */
178 RTN_LOCAL, /* Accept locally */ 175 RTN_LOCAL, /* Accept locally */
@@ -230,8 +227,7 @@ enum
230 could be assigned a value between UNIVERSE and LINK. 227 could be assigned a value between UNIVERSE and LINK.
231*/ 228*/
232 229
233enum rt_scope_t 230enum rt_scope_t {
234{
235 RT_SCOPE_UNIVERSE=0, 231 RT_SCOPE_UNIVERSE=0,
236/* User defined values */ 232/* User defined values */
237 RT_SCOPE_SITE=200, 233 RT_SCOPE_SITE=200,
@@ -249,8 +245,7 @@ enum rt_scope_t
249 245
250/* Reserved table identifiers */ 246/* Reserved table identifiers */
251 247
252enum rt_class_t 248enum rt_class_t {
253{
254 RT_TABLE_UNSPEC=0, 249 RT_TABLE_UNSPEC=0,
255/* User defined values */ 250/* User defined values */
256 RT_TABLE_COMPAT=252, 251 RT_TABLE_COMPAT=252,
@@ -263,8 +258,7 @@ enum rt_class_t
263 258
264/* Routing message attributes */ 259/* Routing message attributes */
265 260
266enum rtattr_type_t 261enum rtattr_type_t {
267{
268 RTA_UNSPEC, 262 RTA_UNSPEC,
269 RTA_DST, 263 RTA_DST,
270 RTA_SRC, 264 RTA_SRC,
@@ -298,8 +292,7 @@ enum rtattr_type_t
298 * and rtt for different paths from multipath. 292 * and rtt for different paths from multipath.
299 */ 293 */
300 294
301struct rtnexthop 295struct rtnexthop {
302{
303 unsigned short rtnh_len; 296 unsigned short rtnh_len;
304 unsigned char rtnh_flags; 297 unsigned char rtnh_flags;
305 unsigned char rtnh_hops; 298 unsigned char rtnh_hops;
@@ -325,8 +318,7 @@ struct rtnexthop
325 318
326/* RTM_CACHEINFO */ 319/* RTM_CACHEINFO */
327 320
328struct rta_cacheinfo 321struct rta_cacheinfo {
329{
330 __u32 rta_clntref; 322 __u32 rta_clntref;
331 __u32 rta_lastuse; 323 __u32 rta_lastuse;
332 __s32 rta_expires; 324 __s32 rta_expires;
@@ -341,8 +333,7 @@ struct rta_cacheinfo
341 333
342/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */ 334/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */
343 335
344enum 336enum {
345{
346 RTAX_UNSPEC, 337 RTAX_UNSPEC,
347#define RTAX_UNSPEC RTAX_UNSPEC 338#define RTAX_UNSPEC RTAX_UNSPEC
348 RTAX_LOCK, 339 RTAX_LOCK,
@@ -377,12 +368,13 @@ enum
377#define RTAX_MAX (__RTAX_MAX - 1) 368#define RTAX_MAX (__RTAX_MAX - 1)
378 369
379#define RTAX_FEATURE_ECN 0x00000001 370#define RTAX_FEATURE_ECN 0x00000001
380#define RTAX_FEATURE_SACK 0x00000002 371#define RTAX_FEATURE_NO_SACK 0x00000002
381#define RTAX_FEATURE_TIMESTAMP 0x00000004 372#define RTAX_FEATURE_NO_TSTAMP 0x00000004
382#define RTAX_FEATURE_ALLFRAG 0x00000008 373#define RTAX_FEATURE_ALLFRAG 0x00000008
374#define RTAX_FEATURE_NO_WSCALE 0x00000010
375#define RTAX_FEATURE_NO_DSACK 0x00000020
383 376
384struct rta_session 377struct rta_session {
385{
386 __u8 proto; 378 __u8 proto;
387 __u8 pad1; 379 __u8 pad1;
388 __u16 pad2; 380 __u16 pad2;
@@ -407,8 +399,7 @@ struct rta_session
407 * General form of address family dependent message. 399 * General form of address family dependent message.
408 ****/ 400 ****/
409 401
410struct rtgenmsg 402struct rtgenmsg {
411{
412 unsigned char rtgen_family; 403 unsigned char rtgen_family;
413}; 404};
414 405
@@ -421,8 +412,7 @@ struct rtgenmsg
421 * on network protocol. 412 * on network protocol.
422 */ 413 */
423 414
424struct ifinfomsg 415struct ifinfomsg {
425{
426 unsigned char ifi_family; 416 unsigned char ifi_family;
427 unsigned char __ifi_pad; 417 unsigned char __ifi_pad;
428 unsigned short ifi_type; /* ARPHRD_* */ 418 unsigned short ifi_type; /* ARPHRD_* */
@@ -435,8 +425,7 @@ struct ifinfomsg
435 * prefix information 425 * prefix information
436 ****/ 426 ****/
437 427
438struct prefixmsg 428struct prefixmsg {
439{
440 unsigned char prefix_family; 429 unsigned char prefix_family;
441 unsigned char prefix_pad1; 430 unsigned char prefix_pad1;
442 unsigned short prefix_pad2; 431 unsigned short prefix_pad2;
@@ -457,8 +446,7 @@ enum
457 446
458#define PREFIX_MAX (__PREFIX_MAX - 1) 447#define PREFIX_MAX (__PREFIX_MAX - 1)
459 448
460struct prefix_cacheinfo 449struct prefix_cacheinfo {
461{
462 __u32 preferred_time; 450 __u32 preferred_time;
463 __u32 valid_time; 451 __u32 valid_time;
464}; 452};
@@ -468,8 +456,7 @@ struct prefix_cacheinfo
468 * Traffic control messages. 456 * Traffic control messages.
469 ****/ 457 ****/
470 458
471struct tcmsg 459struct tcmsg {
472{
473 unsigned char tcm_family; 460 unsigned char tcm_family;
474 unsigned char tcm__pad1; 461 unsigned char tcm__pad1;
475 unsigned short tcm__pad2; 462 unsigned short tcm__pad2;
@@ -479,8 +466,7 @@ struct tcmsg
479 __u32 tcm_info; 466 __u32 tcm_info;
480}; 467};
481 468
482enum 469enum {
483{
484 TCA_UNSPEC, 470 TCA_UNSPEC,
485 TCA_KIND, 471 TCA_KIND,
486 TCA_OPTIONS, 472 TCA_OPTIONS,
@@ -502,8 +488,7 @@ enum
502 * Neighbor Discovery userland options 488 * Neighbor Discovery userland options
503 ****/ 489 ****/
504 490
505struct nduseroptmsg 491struct nduseroptmsg {
506{
507 unsigned char nduseropt_family; 492 unsigned char nduseropt_family;
508 unsigned char nduseropt_pad1; 493 unsigned char nduseropt_pad1;
509 unsigned short nduseropt_opts_len; /* Total length of options */ 494 unsigned short nduseropt_opts_len; /* Total length of options */
@@ -515,8 +500,7 @@ struct nduseroptmsg
515 /* Followed by one or more ND options */ 500 /* Followed by one or more ND options */
516}; 501};
517 502
518enum 503enum {
519{
520 NDUSEROPT_UNSPEC, 504 NDUSEROPT_UNSPEC,
521 NDUSEROPT_SRCADDR, 505 NDUSEROPT_SRCADDR,
522 __NDUSEROPT_MAX 506 __NDUSEROPT_MAX
@@ -598,8 +582,7 @@ enum rtnetlink_groups {
598#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) 582#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
599 583
600/* TC action piece */ 584/* TC action piece */
601struct tcamsg 585struct tcamsg {
602{
603 unsigned char tca_family; 586 unsigned char tca_family;
604 unsigned char tca__pad1; 587 unsigned char tca__pad1;
605 unsigned short tca__pad2; 588 unsigned short tca__pad2;