diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-11-04 12:50:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-04 12:50:58 -0500 |
commit | d94d9fee9fa4e66a0b91640a694b8b10177075b3 (patch) | |
tree | 330b2b19e63c92f1fef3d9dbe0733ddeb0109664 /include/linux/rtnetlink.h | |
parent | b8883a65be2d925ea82b14ca0068ce9a6c8bac1f (diff) |
net: cleanup include/linux
This cleanup patch puts struct/union/enum opening braces,
in first line to ease grep games.
struct something
{
becomes :
struct something {
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 e78b60cd65a4..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 | ||
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, |
@@ -383,8 +374,7 @@ enum | |||
383 | #define RTAX_FEATURE_NO_WSCALE 0x00000010 | 374 | #define RTAX_FEATURE_NO_WSCALE 0x00000010 |
384 | #define RTAX_FEATURE_NO_DSACK 0x00000020 | 375 | #define RTAX_FEATURE_NO_DSACK 0x00000020 |
385 | 376 | ||
386 | struct rta_session | 377 | struct rta_session { |
387 | { | ||
388 | __u8 proto; | 378 | __u8 proto; |
389 | __u8 pad1; | 379 | __u8 pad1; |
390 | __u16 pad2; | 380 | __u16 pad2; |
@@ -409,8 +399,7 @@ struct rta_session | |||
409 | * General form of address family dependent message. | 399 | * General form of address family dependent message. |
410 | ****/ | 400 | ****/ |
411 | 401 | ||
412 | struct rtgenmsg | 402 | struct rtgenmsg { |
413 | { | ||
414 | unsigned char rtgen_family; | 403 | unsigned char rtgen_family; |
415 | }; | 404 | }; |
416 | 405 | ||
@@ -423,8 +412,7 @@ struct rtgenmsg | |||
423 | * on network protocol. | 412 | * on network protocol. |
424 | */ | 413 | */ |
425 | 414 | ||
426 | struct ifinfomsg | 415 | struct ifinfomsg { |
427 | { | ||
428 | unsigned char ifi_family; | 416 | unsigned char ifi_family; |
429 | unsigned char __ifi_pad; | 417 | unsigned char __ifi_pad; |
430 | unsigned short ifi_type; /* ARPHRD_* */ | 418 | unsigned short ifi_type; /* ARPHRD_* */ |
@@ -437,8 +425,7 @@ struct ifinfomsg | |||
437 | * prefix information | 425 | * prefix information |
438 | ****/ | 426 | ****/ |
439 | 427 | ||
440 | struct prefixmsg | 428 | struct prefixmsg { |
441 | { | ||
442 | unsigned char prefix_family; | 429 | unsigned char prefix_family; |
443 | unsigned char prefix_pad1; | 430 | unsigned char prefix_pad1; |
444 | unsigned short prefix_pad2; | 431 | unsigned short prefix_pad2; |
@@ -459,8 +446,7 @@ enum | |||
459 | 446 | ||
460 | #define PREFIX_MAX (__PREFIX_MAX - 1) | 447 | #define PREFIX_MAX (__PREFIX_MAX - 1) |
461 | 448 | ||
462 | struct prefix_cacheinfo | 449 | struct prefix_cacheinfo { |
463 | { | ||
464 | __u32 preferred_time; | 450 | __u32 preferred_time; |
465 | __u32 valid_time; | 451 | __u32 valid_time; |
466 | }; | 452 | }; |
@@ -470,8 +456,7 @@ struct prefix_cacheinfo | |||
470 | * Traffic control messages. | 456 | * Traffic control messages. |
471 | ****/ | 457 | ****/ |
472 | 458 | ||
473 | struct tcmsg | 459 | struct tcmsg { |
474 | { | ||
475 | unsigned char tcm_family; | 460 | unsigned char tcm_family; |
476 | unsigned char tcm__pad1; | 461 | unsigned char tcm__pad1; |
477 | unsigned short tcm__pad2; | 462 | unsigned short tcm__pad2; |
@@ -481,8 +466,7 @@ struct tcmsg | |||
481 | __u32 tcm_info; | 466 | __u32 tcm_info; |
482 | }; | 467 | }; |
483 | 468 | ||
484 | enum | 469 | enum { |
485 | { | ||
486 | TCA_UNSPEC, | 470 | TCA_UNSPEC, |
487 | TCA_KIND, | 471 | TCA_KIND, |
488 | TCA_OPTIONS, | 472 | TCA_OPTIONS, |
@@ -504,8 +488,7 @@ enum | |||
504 | * Neighbor Discovery userland options | 488 | * Neighbor Discovery userland options |
505 | ****/ | 489 | ****/ |
506 | 490 | ||
507 | struct nduseroptmsg | 491 | struct nduseroptmsg { |
508 | { | ||
509 | unsigned char nduseropt_family; | 492 | unsigned char nduseropt_family; |
510 | unsigned char nduseropt_pad1; | 493 | unsigned char nduseropt_pad1; |
511 | unsigned short nduseropt_opts_len; /* Total length of options */ | 494 | unsigned short nduseropt_opts_len; /* Total length of options */ |
@@ -517,8 +500,7 @@ struct nduseroptmsg | |||
517 | /* Followed by one or more ND options */ | 500 | /* Followed by one or more ND options */ |
518 | }; | 501 | }; |
519 | 502 | ||
520 | enum | 503 | enum { |
521 | { | ||
522 | NDUSEROPT_UNSPEC, | 504 | NDUSEROPT_UNSPEC, |
523 | NDUSEROPT_SRCADDR, | 505 | NDUSEROPT_SRCADDR, |
524 | __NDUSEROPT_MAX | 506 | __NDUSEROPT_MAX |
@@ -600,8 +582,7 @@ enum rtnetlink_groups { | |||
600 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) | 582 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
601 | 583 | ||
602 | /* TC action piece */ | 584 | /* TC action piece */ |
603 | struct tcamsg | 585 | struct tcamsg { |
604 | { | ||
605 | unsigned char tca_family; | 586 | unsigned char tca_family; |
606 | unsigned char tca__pad1; | 587 | unsigned char tca__pad1; |
607 | unsigned short tca__pad2; | 588 | unsigned short tca__pad2; |