diff options
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r-- | include/linux/rtnetlink.h | 57 |
1 files changed, 19 insertions, 38 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index adf2068d12b5..05330fc5b436 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 | ||
130 | struct rtattr | 130 | struct 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 | ||
157 | struct rtmsg | 156 | struct 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 | ||
174 | enum | 172 | enum { |
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 | ||
233 | enum rt_scope_t | 230 | enum 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 | ||
252 | enum rt_class_t | 248 | enum 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 | ||
266 | enum rtattr_type_t | 261 | enum 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 | ||
301 | struct rtnexthop | 295 | struct 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 | ||
328 | struct rta_cacheinfo | 321 | struct 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 | ||
344 | enum | 336 | enum { |
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, |
@@ -381,8 +372,7 @@ enum | |||
381 | #define RTAX_FEATURE_TIMESTAMP 0x00000004 | 372 | #define RTAX_FEATURE_TIMESTAMP 0x00000004 |
382 | #define RTAX_FEATURE_ALLFRAG 0x00000008 | 373 | #define RTAX_FEATURE_ALLFRAG 0x00000008 |
383 | 374 | ||
384 | struct rta_session | 375 | struct rta_session { |
385 | { | ||
386 | __u8 proto; | 376 | __u8 proto; |
387 | __u8 pad1; | 377 | __u8 pad1; |
388 | __u16 pad2; | 378 | __u16 pad2; |
@@ -407,8 +397,7 @@ struct rta_session | |||
407 | * General form of address family dependent message. | 397 | * General form of address family dependent message. |
408 | ****/ | 398 | ****/ |
409 | 399 | ||
410 | struct rtgenmsg | 400 | struct rtgenmsg { |
411 | { | ||
412 | unsigned char rtgen_family; | 401 | unsigned char rtgen_family; |
413 | }; | 402 | }; |
414 | 403 | ||
@@ -421,8 +410,7 @@ struct rtgenmsg | |||
421 | * on network protocol. | 410 | * on network protocol. |
422 | */ | 411 | */ |
423 | 412 | ||
424 | struct ifinfomsg | 413 | struct ifinfomsg { |
425 | { | ||
426 | unsigned char ifi_family; | 414 | unsigned char ifi_family; |
427 | unsigned char __ifi_pad; | 415 | unsigned char __ifi_pad; |
428 | unsigned short ifi_type; /* ARPHRD_* */ | 416 | unsigned short ifi_type; /* ARPHRD_* */ |
@@ -435,8 +423,7 @@ struct ifinfomsg | |||
435 | * prefix information | 423 | * prefix information |
436 | ****/ | 424 | ****/ |
437 | 425 | ||
438 | struct prefixmsg | 426 | struct prefixmsg { |
439 | { | ||
440 | unsigned char prefix_family; | 427 | unsigned char prefix_family; |
441 | unsigned char prefix_pad1; | 428 | unsigned char prefix_pad1; |
442 | unsigned short prefix_pad2; | 429 | unsigned short prefix_pad2; |
@@ -457,8 +444,7 @@ enum | |||
457 | 444 | ||
458 | #define PREFIX_MAX (__PREFIX_MAX - 1) | 445 | #define PREFIX_MAX (__PREFIX_MAX - 1) |
459 | 446 | ||
460 | struct prefix_cacheinfo | 447 | struct prefix_cacheinfo { |
461 | { | ||
462 | __u32 preferred_time; | 448 | __u32 preferred_time; |
463 | __u32 valid_time; | 449 | __u32 valid_time; |
464 | }; | 450 | }; |
@@ -468,8 +454,7 @@ struct prefix_cacheinfo | |||
468 | * Traffic control messages. | 454 | * Traffic control messages. |
469 | ****/ | 455 | ****/ |
470 | 456 | ||
471 | struct tcmsg | 457 | struct tcmsg { |
472 | { | ||
473 | unsigned char tcm_family; | 458 | unsigned char tcm_family; |
474 | unsigned char tcm__pad1; | 459 | unsigned char tcm__pad1; |
475 | unsigned short tcm__pad2; | 460 | unsigned short tcm__pad2; |
@@ -479,8 +464,7 @@ struct tcmsg | |||
479 | __u32 tcm_info; | 464 | __u32 tcm_info; |
480 | }; | 465 | }; |
481 | 466 | ||
482 | enum | 467 | enum { |
483 | { | ||
484 | TCA_UNSPEC, | 468 | TCA_UNSPEC, |
485 | TCA_KIND, | 469 | TCA_KIND, |
486 | TCA_OPTIONS, | 470 | TCA_OPTIONS, |
@@ -502,8 +486,7 @@ enum | |||
502 | * Neighbor Discovery userland options | 486 | * Neighbor Discovery userland options |
503 | ****/ | 487 | ****/ |
504 | 488 | ||
505 | struct nduseroptmsg | 489 | struct nduseroptmsg { |
506 | { | ||
507 | unsigned char nduseropt_family; | 490 | unsigned char nduseropt_family; |
508 | unsigned char nduseropt_pad1; | 491 | unsigned char nduseropt_pad1; |
509 | unsigned short nduseropt_opts_len; /* Total length of options */ | 492 | unsigned short nduseropt_opts_len; /* Total length of options */ |
@@ -515,8 +498,7 @@ struct nduseroptmsg | |||
515 | /* Followed by one or more ND options */ | 498 | /* Followed by one or more ND options */ |
516 | }; | 499 | }; |
517 | 500 | ||
518 | enum | 501 | enum { |
519 | { | ||
520 | NDUSEROPT_UNSPEC, | 502 | NDUSEROPT_UNSPEC, |
521 | NDUSEROPT_SRCADDR, | 503 | NDUSEROPT_SRCADDR, |
522 | __NDUSEROPT_MAX | 504 | __NDUSEROPT_MAX |
@@ -598,8 +580,7 @@ enum rtnetlink_groups { | |||
598 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) | 580 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
599 | 581 | ||
600 | /* TC action piece */ | 582 | /* TC action piece */ |
601 | struct tcamsg | 583 | struct tcamsg { |
602 | { | ||
603 | unsigned char tca_family; | 584 | unsigned char tca_family; |
604 | unsigned char tca__pad1; | 585 | unsigned char tca__pad1; |
605 | unsigned short tca__pad2; | 586 | unsigned short tca__pad2; |