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 | |
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')
87 files changed, 351 insertions, 694 deletions
diff --git a/include/linux/dn.h b/include/linux/dn.h index fe9990823193..9c50445462d9 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -71,14 +71,12 @@ | |||
71 | /* Structures */ | 71 | /* Structures */ |
72 | 72 | ||
73 | 73 | ||
74 | struct dn_naddr | 74 | struct dn_naddr { |
75 | { | ||
76 | __le16 a_len; | 75 | __le16 a_len; |
77 | __u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */ | 76 | __u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */ |
78 | }; | 77 | }; |
79 | 78 | ||
80 | struct sockaddr_dn | 79 | struct sockaddr_dn { |
81 | { | ||
82 | __u16 sdn_family; | 80 | __u16 sdn_family; |
83 | __u8 sdn_flags; | 81 | __u8 sdn_flags; |
84 | __u8 sdn_objnum; | 82 | __u8 sdn_objnum; |
@@ -101,8 +99,7 @@ struct optdata_dn { | |||
101 | __u8 opt_data[16]; /* User data */ | 99 | __u8 opt_data[16]; /* User data */ |
102 | }; | 100 | }; |
103 | 101 | ||
104 | struct accessdata_dn | 102 | struct accessdata_dn { |
105 | { | ||
106 | __u8 acc_accl; | 103 | __u8 acc_accl; |
107 | __u8 acc_acc[DN_MAXACCL]; | 104 | __u8 acc_acc[DN_MAXACCL]; |
108 | __u8 acc_passl; | 105 | __u8 acc_passl; |
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index ec12cc74366f..034072cea853 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct sock_extended_err | 6 | struct sock_extended_err { |
7 | { | ||
8 | __u32 ee_errno; | 7 | __u32 ee_errno; |
9 | __u8 ee_origin; | 8 | __u8 ee_origin; |
10 | __u8 ee_type; | 9 | __u8 ee_type; |
@@ -31,8 +30,7 @@ struct sock_extended_err | |||
31 | 30 | ||
32 | #define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb)) | 31 | #define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb)) |
33 | 32 | ||
34 | struct sock_exterr_skb | 33 | struct sock_exterr_skb { |
35 | { | ||
36 | union { | 34 | union { |
37 | struct inet_skb_parm h4; | 35 | struct inet_skb_parm h4; |
38 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 36 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h index 87b606b63f1e..c7e5b700bb91 100644 --- a/include/linux/fib_rules.h +++ b/include/linux/fib_rules.h | |||
@@ -13,8 +13,7 @@ | |||
13 | /* try to find source address in routing lookups */ | 13 | /* try to find source address in routing lookups */ |
14 | #define FIB_RULE_FIND_SADDR 0x00010000 | 14 | #define FIB_RULE_FIND_SADDR 0x00010000 |
15 | 15 | ||
16 | struct fib_rule_hdr | 16 | struct fib_rule_hdr { |
17 | { | ||
18 | __u8 family; | 17 | __u8 family; |
19 | __u8 dst_len; | 18 | __u8 dst_len; |
20 | __u8 src_len; | 19 | __u8 src_len; |
@@ -28,8 +27,7 @@ struct fib_rule_hdr | |||
28 | __u32 flags; | 27 | __u32 flags; |
29 | }; | 28 | }; |
30 | 29 | ||
31 | enum | 30 | enum { |
32 | { | ||
33 | FRA_UNSPEC, | 31 | FRA_UNSPEC, |
34 | FRA_DST, /* destination address */ | 32 | FRA_DST, /* destination address */ |
35 | FRA_SRC, /* source address */ | 33 | FRA_SRC, /* source address */ |
@@ -52,8 +50,7 @@ enum | |||
52 | 50 | ||
53 | #define FRA_MAX (__FRA_MAX - 1) | 51 | #define FRA_MAX (__FRA_MAX - 1) |
54 | 52 | ||
55 | enum | 53 | enum { |
56 | { | ||
57 | FR_ACT_UNSPEC, | 54 | FR_ACT_UNSPEC, |
58 | FR_ACT_TO_TBL, /* Pass to fixed table */ | 55 | FR_ACT_TO_TBL, /* Pass to fixed table */ |
59 | FR_ACT_GOTO, /* Jump to another rule */ | 56 | FR_ACT_GOTO, /* Jump to another rule */ |
diff --git a/include/linux/filter.h b/include/linux/filter.h index bb3b4352978a..29a0e3db9f43 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -23,16 +23,14 @@ | |||
23 | * the BPF code definitions which need to match so you can share filters | 23 | * the BPF code definitions which need to match so you can share filters |
24 | */ | 24 | */ |
25 | 25 | ||
26 | struct sock_filter /* Filter block */ | 26 | struct sock_filter { /* Filter block */ |
27 | { | ||
28 | __u16 code; /* Actual filter code */ | 27 | __u16 code; /* Actual filter code */ |
29 | __u8 jt; /* Jump true */ | 28 | __u8 jt; /* Jump true */ |
30 | __u8 jf; /* Jump false */ | 29 | __u8 jf; /* Jump false */ |
31 | __u32 k; /* Generic multiuse field */ | 30 | __u32 k; /* Generic multiuse field */ |
32 | }; | 31 | }; |
33 | 32 | ||
34 | struct sock_fprog /* Required for SO_ATTACH_FILTER. */ | 33 | struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ |
35 | { | ||
36 | unsigned short len; /* Number of filter blocks */ | 34 | unsigned short len; /* Number of filter blocks */ |
37 | struct sock_filter __user *filter; | 35 | struct sock_filter __user *filter; |
38 | }; | 36 | }; |
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h index 710e901085d0..552c8a0a12d1 100644 --- a/include/linux/gen_stats.h +++ b/include/linux/gen_stats.h | |||
@@ -18,13 +18,11 @@ enum { | |||
18 | * @bytes: number of seen bytes | 18 | * @bytes: number of seen bytes |
19 | * @packets: number of seen packets | 19 | * @packets: number of seen packets |
20 | */ | 20 | */ |
21 | struct gnet_stats_basic | 21 | struct gnet_stats_basic { |
22 | { | ||
23 | __u64 bytes; | 22 | __u64 bytes; |
24 | __u32 packets; | 23 | __u32 packets; |
25 | }; | 24 | }; |
26 | struct gnet_stats_basic_packed | 25 | struct gnet_stats_basic_packed { |
27 | { | ||
28 | __u64 bytes; | 26 | __u64 bytes; |
29 | __u32 packets; | 27 | __u32 packets; |
30 | } __attribute__ ((packed)); | 28 | } __attribute__ ((packed)); |
@@ -34,8 +32,7 @@ struct gnet_stats_basic_packed | |||
34 | * @bps: current byte rate | 32 | * @bps: current byte rate |
35 | * @pps: current packet rate | 33 | * @pps: current packet rate |
36 | */ | 34 | */ |
37 | struct gnet_stats_rate_est | 35 | struct gnet_stats_rate_est { |
38 | { | ||
39 | __u32 bps; | 36 | __u32 bps; |
40 | __u32 pps; | 37 | __u32 pps; |
41 | }; | 38 | }; |
@@ -48,8 +45,7 @@ struct gnet_stats_rate_est | |||
48 | * @requeues: number of requeues | 45 | * @requeues: number of requeues |
49 | * @overlimits: number of enqueues over the limit | 46 | * @overlimits: number of enqueues over the limit |
50 | */ | 47 | */ |
51 | struct gnet_stats_queue | 48 | struct gnet_stats_queue { |
52 | { | ||
53 | __u32 qlen; | 49 | __u32 qlen; |
54 | __u32 backlog; | 50 | __u32 backlog; |
55 | __u32 drops; | 51 | __u32 drops; |
@@ -62,8 +58,7 @@ struct gnet_stats_queue | |||
62 | * @interval: sampling period | 58 | * @interval: sampling period |
63 | * @ewma_log: the log of measurement window weight | 59 | * @ewma_log: the log of measurement window weight |
64 | */ | 60 | */ |
65 | struct gnet_estimator | 61 | struct gnet_estimator { |
66 | { | ||
67 | signed char interval; | 62 | signed char interval; |
68 | unsigned char ewma_log; | 63 | unsigned char ewma_log; |
69 | }; | 64 | }; |
diff --git a/include/linux/if.h b/include/linux/if.h index b9a6229f3be7..3b2a46bf8f8d 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -125,8 +125,7 @@ enum { | |||
125 | * being very small might be worth keeping for clean configuration. | 125 | * being very small might be worth keeping for clean configuration. |
126 | */ | 126 | */ |
127 | 127 | ||
128 | struct ifmap | 128 | struct ifmap { |
129 | { | ||
130 | unsigned long mem_start; | 129 | unsigned long mem_start; |
131 | unsigned long mem_end; | 130 | unsigned long mem_end; |
132 | unsigned short base_addr; | 131 | unsigned short base_addr; |
@@ -136,8 +135,7 @@ struct ifmap | |||
136 | /* 3 bytes spare */ | 135 | /* 3 bytes spare */ |
137 | }; | 136 | }; |
138 | 137 | ||
139 | struct if_settings | 138 | struct if_settings { |
140 | { | ||
141 | unsigned int type; /* Type of physical device or protocol */ | 139 | unsigned int type; /* Type of physical device or protocol */ |
142 | unsigned int size; /* Size of the data allocated by the caller */ | 140 | unsigned int size; /* Size of the data allocated by the caller */ |
143 | union { | 141 | union { |
@@ -161,8 +159,7 @@ struct if_settings | |||
161 | * remainder may be interface specific. | 159 | * remainder may be interface specific. |
162 | */ | 160 | */ |
163 | 161 | ||
164 | struct ifreq | 162 | struct ifreq { |
165 | { | ||
166 | #define IFHWADDRLEN 6 | 163 | #define IFHWADDRLEN 6 |
167 | union | 164 | union |
168 | { | 165 | { |
@@ -211,11 +208,9 @@ struct ifreq | |||
211 | * must know all networks accessible). | 208 | * must know all networks accessible). |
212 | */ | 209 | */ |
213 | 210 | ||
214 | struct ifconf | 211 | struct ifconf { |
215 | { | ||
216 | int ifc_len; /* size of buffer */ | 212 | int ifc_len; /* size of buffer */ |
217 | union | 213 | union { |
218 | { | ||
219 | char __user *ifcu_buf; | 214 | char __user *ifcu_buf; |
220 | struct ifreq __user *ifcu_req; | 215 | struct ifreq __user *ifcu_req; |
221 | } ifc_ifcu; | 216 | } ifc_ifcu; |
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index fd9740466757..23357ab81a77 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
6 | 6 | ||
7 | struct ifaddrmsg | 7 | struct ifaddrmsg { |
8 | { | ||
9 | __u8 ifa_family; | 8 | __u8 ifa_family; |
10 | __u8 ifa_prefixlen; /* The prefix length */ | 9 | __u8 ifa_prefixlen; /* The prefix length */ |
11 | __u8 ifa_flags; /* Flags */ | 10 | __u8 ifa_flags; /* Flags */ |
@@ -20,8 +19,7 @@ struct ifaddrmsg | |||
20 | * but for point-to-point IFA_ADDRESS is DESTINATION address, | 19 | * but for point-to-point IFA_ADDRESS is DESTINATION address, |
21 | * local address is supplied in IFA_LOCAL attribute. | 20 | * local address is supplied in IFA_LOCAL attribute. |
22 | */ | 21 | */ |
23 | enum | 22 | enum { |
24 | { | ||
25 | IFA_UNSPEC, | 23 | IFA_UNSPEC, |
26 | IFA_ADDRESS, | 24 | IFA_ADDRESS, |
27 | IFA_LOCAL, | 25 | IFA_LOCAL, |
@@ -47,8 +45,7 @@ enum | |||
47 | #define IFA_F_TENTATIVE 0x40 | 45 | #define IFA_F_TENTATIVE 0x40 |
48 | #define IFA_F_PERMANENT 0x80 | 46 | #define IFA_F_PERMANENT 0x80 |
49 | 47 | ||
50 | struct ifa_cacheinfo | 48 | struct ifa_cacheinfo { |
51 | { | ||
52 | __u32 ifa_prefered; | 49 | __u32 ifa_prefered; |
53 | __u32 ifa_valid; | 50 | __u32 ifa_valid; |
54 | __u32 cstamp; /* created timestamp, hundredths of seconds */ | 51 | __u32 cstamp; /* created timestamp, hundredths of seconds */ |
diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h index 89571f65d6de..54580c298187 100644 --- a/include/linux/if_addrlabel.h +++ b/include/linux/if_addrlabel.h | |||
@@ -12,8 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | struct ifaddrlblmsg | 15 | struct ifaddrlblmsg { |
16 | { | ||
17 | __u8 ifal_family; /* Address family */ | 16 | __u8 ifal_family; /* Address family */ |
18 | __u8 __ifal_reserved; /* Reserved */ | 17 | __u8 __ifal_reserved; /* Reserved */ |
19 | __u8 ifal_prefixlen; /* Prefix length */ | 18 | __u8 ifal_prefixlen; /* Prefix length */ |
@@ -22,8 +21,7 @@ struct ifaddrlblmsg | |||
22 | __u32 ifal_seq; /* sequence number */ | 21 | __u32 ifal_seq; /* sequence number */ |
23 | }; | 22 | }; |
24 | 23 | ||
25 | enum | 24 | enum { |
26 | { | ||
27 | IFAL_ADDRESS = 1, | 25 | IFAL_ADDRESS = 1, |
28 | IFAL_LABEL = 2, | 26 | IFAL_LABEL = 2, |
29 | __IFAL_MAX | 27 | __IFAL_MAX |
diff --git a/include/linux/if_arcnet.h b/include/linux/if_arcnet.h index 0835debab115..46e34bd0e783 100644 --- a/include/linux/if_arcnet.h +++ b/include/linux/if_arcnet.h | |||
@@ -56,8 +56,7 @@ | |||
56 | /* | 56 | /* |
57 | * The RFC1201-specific components of an arcnet packet header. | 57 | * The RFC1201-specific components of an arcnet packet header. |
58 | */ | 58 | */ |
59 | struct arc_rfc1201 | 59 | struct arc_rfc1201 { |
60 | { | ||
61 | __u8 proto; /* protocol ID field - varies */ | 60 | __u8 proto; /* protocol ID field - varies */ |
62 | __u8 split_flag; /* for use with split packets */ | 61 | __u8 split_flag; /* for use with split packets */ |
63 | __be16 sequence; /* sequence number */ | 62 | __be16 sequence; /* sequence number */ |
@@ -69,8 +68,7 @@ struct arc_rfc1201 | |||
69 | /* | 68 | /* |
70 | * The RFC1051-specific components. | 69 | * The RFC1051-specific components. |
71 | */ | 70 | */ |
72 | struct arc_rfc1051 | 71 | struct arc_rfc1051 { |
73 | { | ||
74 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ | 72 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ |
75 | __u8 payload[0]; /* 507 bytes */ | 73 | __u8 payload[0]; /* 507 bytes */ |
76 | }; | 74 | }; |
@@ -81,8 +79,7 @@ struct arc_rfc1051 | |||
81 | * The ethernet-encap-specific components. We have a real ethernet header | 79 | * The ethernet-encap-specific components. We have a real ethernet header |
82 | * and some data. | 80 | * and some data. |
83 | */ | 81 | */ |
84 | struct arc_eth_encap | 82 | struct arc_eth_encap { |
85 | { | ||
86 | __u8 proto; /* Always ARC_P_ETHER */ | 83 | __u8 proto; /* Always ARC_P_ETHER */ |
87 | struct ethhdr eth; /* standard ethernet header (yuck!) */ | 84 | struct ethhdr eth; /* standard ethernet header (yuck!) */ |
88 | __u8 payload[0]; /* 493 bytes */ | 85 | __u8 payload[0]; /* 493 bytes */ |
@@ -90,8 +87,7 @@ struct arc_eth_encap | |||
90 | #define ETH_ENCAP_HDR_SIZE 14 | 87 | #define ETH_ENCAP_HDR_SIZE 14 |
91 | 88 | ||
92 | 89 | ||
93 | struct arc_cap | 90 | struct arc_cap { |
94 | { | ||
95 | __u8 proto; | 91 | __u8 proto; |
96 | __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */ | 92 | __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */ |
97 | union { | 93 | union { |
@@ -108,8 +104,7 @@ struct arc_cap | |||
108 | * the _end_ of the 512-byte buffer. We hide this complexity inside the | 104 | * the _end_ of the 512-byte buffer. We hide this complexity inside the |
109 | * driver. | 105 | * driver. |
110 | */ | 106 | */ |
111 | struct arc_hardware | 107 | struct arc_hardware { |
112 | { | ||
113 | __u8 source, /* source ARCnet - filled in automagically */ | 108 | __u8 source, /* source ARCnet - filled in automagically */ |
114 | dest, /* destination ARCnet - 0 for broadcast */ | 109 | dest, /* destination ARCnet - 0 for broadcast */ |
115 | offset[2]; /* offset bytes (some weird semantics) */ | 110 | offset[2]; /* offset bytes (some weird semantics) */ |
@@ -120,8 +115,7 @@ struct arc_hardware | |||
120 | * This is an ARCnet frame header, as seen by the kernel (and userspace, | 115 | * This is an ARCnet frame header, as seen by the kernel (and userspace, |
121 | * when you do a raw packet capture). | 116 | * when you do a raw packet capture). |
122 | */ | 117 | */ |
123 | struct archdr | 118 | struct archdr { |
124 | { | ||
125 | /* hardware requirements */ | 119 | /* hardware requirements */ |
126 | struct arc_hardware hard; | 120 | struct arc_hardware hard; |
127 | 121 | ||
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index 282eb37e2dec..e80b7f88f7c6 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -133,8 +133,7 @@ struct arpreq_old { | |||
133 | * This structure defines an ethernet arp header. | 133 | * This structure defines an ethernet arp header. |
134 | */ | 134 | */ |
135 | 135 | ||
136 | struct arphdr | 136 | struct arphdr { |
137 | { | ||
138 | __be16 ar_hrd; /* format of hardware address */ | 137 | __be16 ar_hrd; /* format of hardware address */ |
139 | __be16 ar_pro; /* format of protocol address */ | 138 | __be16 ar_pro; /* format of protocol address */ |
140 | unsigned char ar_hln; /* length of hardware address */ | 139 | unsigned char ar_hln; /* length of hardware address */ |
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h index 65c2d247068b..cd525fae3c98 100644 --- a/include/linux/if_bonding.h +++ b/include/linux/if_bonding.h | |||
@@ -94,8 +94,7 @@ typedef struct ifbond { | |||
94 | __s32 miimon; | 94 | __s32 miimon; |
95 | } ifbond; | 95 | } ifbond; |
96 | 96 | ||
97 | typedef struct ifslave | 97 | typedef struct ifslave { |
98 | { | ||
99 | __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */ | 98 | __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */ |
100 | char slave_name[IFNAMSIZ]; | 99 | char slave_name[IFNAMSIZ]; |
101 | __s8 link; | 100 | __s8 link; |
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 6badb3e2c4e4..938b7e81df95 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
@@ -49,8 +49,7 @@ | |||
49 | #define BR_STATE_FORWARDING 3 | 49 | #define BR_STATE_FORWARDING 3 |
50 | #define BR_STATE_BLOCKING 4 | 50 | #define BR_STATE_BLOCKING 4 |
51 | 51 | ||
52 | struct __bridge_info | 52 | struct __bridge_info { |
53 | { | ||
54 | __u64 designated_root; | 53 | __u64 designated_root; |
55 | __u64 bridge_id; | 54 | __u64 bridge_id; |
56 | __u32 root_path_cost; | 55 | __u32 root_path_cost; |
@@ -72,8 +71,7 @@ struct __bridge_info | |||
72 | __u32 gc_timer_value; | 71 | __u32 gc_timer_value; |
73 | }; | 72 | }; |
74 | 73 | ||
75 | struct __port_info | 74 | struct __port_info { |
76 | { | ||
77 | __u64 designated_root; | 75 | __u64 designated_root; |
78 | __u64 designated_bridge; | 76 | __u64 designated_bridge; |
79 | __u16 port_id; | 77 | __u16 port_id; |
@@ -89,8 +87,7 @@ struct __port_info | |||
89 | __u32 hold_timer_value; | 87 | __u32 hold_timer_value; |
90 | }; | 88 | }; |
91 | 89 | ||
92 | struct __fdb_entry | 90 | struct __fdb_entry { |
93 | { | ||
94 | __u8 mac_addr[6]; | 91 | __u8 mac_addr[6]; |
95 | __u8 port_no; | 92 | __u8 port_no; |
96 | __u8 is_local; | 93 | __u8 is_local; |
diff --git a/include/linux/if_ec.h b/include/linux/if_ec.h index e7499aa79783..d85f9f48129f 100644 --- a/include/linux/if_ec.h +++ b/include/linux/if_ec.h | |||
@@ -5,14 +5,12 @@ | |||
5 | 5 | ||
6 | /* User visible stuff. Glibc provides its own but libc5 folk will use these */ | 6 | /* User visible stuff. Glibc provides its own but libc5 folk will use these */ |
7 | 7 | ||
8 | struct ec_addr | 8 | struct ec_addr { |
9 | { | ||
10 | unsigned char station; /* Station number. */ | 9 | unsigned char station; /* Station number. */ |
11 | unsigned char net; /* Network number. */ | 10 | unsigned char net; /* Network number. */ |
12 | }; | 11 | }; |
13 | 12 | ||
14 | struct sockaddr_ec | 13 | struct sockaddr_ec { |
15 | { | ||
16 | unsigned short sec_family; | 14 | unsigned short sec_family; |
17 | unsigned char port; /* Port number. */ | 15 | unsigned char port; /* Port number. */ |
18 | unsigned char cb; /* Control/flag byte. */ | 16 | unsigned char cb; /* Control/flag byte. */ |
@@ -37,8 +35,7 @@ struct sockaddr_ec | |||
37 | #define EC_HLEN 6 | 35 | #define EC_HLEN 6 |
38 | 36 | ||
39 | /* This is what an Econet frame looks like on the wire. */ | 37 | /* This is what an Econet frame looks like on the wire. */ |
40 | struct ec_framehdr | 38 | struct ec_framehdr { |
41 | { | ||
42 | unsigned char dst_stn; | 39 | unsigned char dst_stn; |
43 | unsigned char dst_net; | 40 | unsigned char dst_net; |
44 | unsigned char src_stn; | 41 | unsigned char src_stn; |
@@ -62,8 +59,7 @@ static inline struct econet_sock *ec_sk(const struct sock *sk) | |||
62 | return (struct econet_sock *)sk; | 59 | return (struct econet_sock *)sk; |
63 | } | 60 | } |
64 | 61 | ||
65 | struct ec_device | 62 | struct ec_device { |
66 | { | ||
67 | unsigned char station, net; /* Econet protocol address */ | 63 | unsigned char station, net; /* Econet protocol address */ |
68 | }; | 64 | }; |
69 | 65 | ||
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index 45de1046dbbf..5459c5c09930 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h | |||
@@ -63,36 +63,32 @@ | |||
63 | #define FDDI_UI_CMD 0x03 | 63 | #define FDDI_UI_CMD 0x03 |
64 | 64 | ||
65 | /* Define 802.2 Type 1 header */ | 65 | /* Define 802.2 Type 1 header */ |
66 | struct fddi_8022_1_hdr | 66 | struct fddi_8022_1_hdr { |
67 | { | ||
68 | __u8 dsap; /* destination service access point */ | 67 | __u8 dsap; /* destination service access point */ |
69 | __u8 ssap; /* source service access point */ | 68 | __u8 ssap; /* source service access point */ |
70 | __u8 ctrl; /* control byte #1 */ | 69 | __u8 ctrl; /* control byte #1 */ |
71 | } __attribute__ ((packed)); | 70 | } __attribute__ ((packed)); |
72 | 71 | ||
73 | /* Define 802.2 Type 2 header */ | 72 | /* Define 802.2 Type 2 header */ |
74 | struct fddi_8022_2_hdr | 73 | struct fddi_8022_2_hdr { |
75 | { | ||
76 | __u8 dsap; /* destination service access point */ | 74 | __u8 dsap; /* destination service access point */ |
77 | __u8 ssap; /* source service access point */ | 75 | __u8 ssap; /* source service access point */ |
78 | __u8 ctrl_1; /* control byte #1 */ | 76 | __u8 ctrl_1; /* control byte #1 */ |
79 | __u8 ctrl_2; /* control byte #2 */ | 77 | __u8 ctrl_2; /* control byte #2 */ |
80 | } __attribute__ ((packed)); | 78 | } __attribute__ ((packed)); |
81 | 79 | ||
82 | /* Define 802.2 SNAP header */ | 80 | /* Define 802.2 SNAP header */ |
83 | #define FDDI_K_OUI_LEN 3 | 81 | #define FDDI_K_OUI_LEN 3 |
84 | struct fddi_snap_hdr | 82 | struct fddi_snap_hdr { |
85 | { | ||
86 | __u8 dsap; /* always 0xAA */ | 83 | __u8 dsap; /* always 0xAA */ |
87 | __u8 ssap; /* always 0xAA */ | 84 | __u8 ssap; /* always 0xAA */ |
88 | __u8 ctrl; /* always 0x03 */ | 85 | __u8 ctrl; /* always 0x03 */ |
89 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ | 86 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ |
90 | __be16 ethertype; /* packet type ID field */ | 87 | __be16 ethertype; /* packet type ID field */ |
91 | } __attribute__ ((packed)); | 88 | } __attribute__ ((packed)); |
92 | 89 | ||
93 | /* Define FDDI LLC frame header */ | 90 | /* Define FDDI LLC frame header */ |
94 | struct fddihdr | 91 | struct fddihdr { |
95 | { | ||
96 | __u8 fc; /* frame control */ | 92 | __u8 fc; /* frame control */ |
97 | __u8 daddr[FDDI_K_ALEN]; /* destination address */ | 93 | __u8 daddr[FDDI_K_ALEN]; /* destination address */ |
98 | __u8 saddr[FDDI_K_ALEN]; /* source address */ | 94 | __u8 saddr[FDDI_K_ALEN]; /* source address */ |
@@ -102,7 +98,7 @@ struct fddihdr | |||
102 | struct fddi_8022_2_hdr llc_8022_2; | 98 | struct fddi_8022_2_hdr llc_8022_2; |
103 | struct fddi_snap_hdr llc_snap; | 99 | struct fddi_snap_hdr llc_snap; |
104 | } hdr; | 100 | } hdr; |
105 | } __attribute__ ((packed)); | 101 | } __attribute__ ((packed)); |
106 | 102 | ||
107 | #ifdef __KERNEL__ | 103 | #ifdef __KERNEL__ |
108 | #include <linux/netdevice.h> | 104 | #include <linux/netdevice.h> |
@@ -197,7 +193,7 @@ struct fddi_statistics { | |||
197 | __u32 port_pc_withhold[2]; | 193 | __u32 port_pc_withhold[2]; |
198 | __u32 port_ler_flag[2]; | 194 | __u32 port_ler_flag[2]; |
199 | __u32 port_hardware_present[2]; | 195 | __u32 port_hardware_present[2]; |
200 | }; | 196 | }; |
201 | #endif /* __KERNEL__ */ | 197 | #endif /* __KERNEL__ */ |
202 | 198 | ||
203 | #endif /* _LINUX_IF_FDDI_H */ | 199 | #endif /* _LINUX_IF_FDDI_H */ |
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h index 4a7c9940b080..8d038eb8db5c 100644 --- a/include/linux/if_hippi.h +++ b/include/linux/if_hippi.h | |||
@@ -51,8 +51,7 @@ | |||
51 | * HIPPI statistics collection data. | 51 | * HIPPI statistics collection data. |
52 | */ | 52 | */ |
53 | 53 | ||
54 | struct hipnet_statistics | 54 | struct hipnet_statistics { |
55 | { | ||
56 | int rx_packets; /* total packets received */ | 55 | int rx_packets; /* total packets received */ |
57 | int tx_packets; /* total packets transmitted */ | 56 | int tx_packets; /* total packets transmitted */ |
58 | int rx_errors; /* bad packets received */ | 57 | int rx_errors; /* bad packets received */ |
@@ -77,8 +76,7 @@ struct hipnet_statistics | |||
77 | }; | 76 | }; |
78 | 77 | ||
79 | 78 | ||
80 | struct hippi_fp_hdr | 79 | struct hippi_fp_hdr { |
81 | { | ||
82 | #if 0 | 80 | #if 0 |
83 | __u8 ulp; /* must contain 4 */ | 81 | __u8 ulp; /* must contain 4 */ |
84 | #if defined (__BIG_ENDIAN_BITFIELD) | 82 | #if defined (__BIG_ENDIAN_BITFIELD) |
@@ -108,8 +106,7 @@ struct hippi_fp_hdr | |||
108 | __be32 d2_size; | 106 | __be32 d2_size; |
109 | } __attribute__ ((packed)); | 107 | } __attribute__ ((packed)); |
110 | 108 | ||
111 | struct hippi_le_hdr | 109 | struct hippi_le_hdr { |
112 | { | ||
113 | #if defined (__BIG_ENDIAN_BITFIELD) | 110 | #if defined (__BIG_ENDIAN_BITFIELD) |
114 | __u8 fc:3; | 111 | __u8 fc:3; |
115 | __u8 double_wide:1; | 112 | __u8 double_wide:1; |
@@ -139,8 +136,7 @@ struct hippi_le_hdr | |||
139 | * Looks like the dsap and ssap fields have been swapped by mistake in | 136 | * Looks like the dsap and ssap fields have been swapped by mistake in |
140 | * RFC 2067 "IP over HIPPI". | 137 | * RFC 2067 "IP over HIPPI". |
141 | */ | 138 | */ |
142 | struct hippi_snap_hdr | 139 | struct hippi_snap_hdr { |
143 | { | ||
144 | __u8 dsap; /* always 0xAA */ | 140 | __u8 dsap; /* always 0xAA */ |
145 | __u8 ssap; /* always 0xAA */ | 141 | __u8 ssap; /* always 0xAA */ |
146 | __u8 ctrl; /* always 0x03 */ | 142 | __u8 ctrl; /* always 0x03 */ |
@@ -148,8 +144,7 @@ struct hippi_snap_hdr | |||
148 | __be16 ethertype; /* packet type ID field */ | 144 | __be16 ethertype; /* packet type ID field */ |
149 | } __attribute__ ((packed)); | 145 | } __attribute__ ((packed)); |
150 | 146 | ||
151 | struct hippi_hdr | 147 | struct hippi_hdr { |
152 | { | ||
153 | struct hippi_fp_hdr fp; | 148 | struct hippi_fp_hdr fp; |
154 | struct hippi_le_hdr le; | 149 | struct hippi_le_hdr le; |
155 | struct hippi_snap_hdr snap; | 150 | struct hippi_snap_hdr snap; |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 176c5182c515..1d3b2425f661 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -5,8 +5,7 @@ | |||
5 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
6 | 6 | ||
7 | /* The struct should be in sync with struct net_device_stats */ | 7 | /* The struct should be in sync with struct net_device_stats */ |
8 | struct rtnl_link_stats | 8 | struct rtnl_link_stats { |
9 | { | ||
10 | __u32 rx_packets; /* total packets received */ | 9 | __u32 rx_packets; /* total packets received */ |
11 | __u32 tx_packets; /* total packets transmitted */ | 10 | __u32 tx_packets; /* total packets transmitted */ |
12 | __u32 rx_bytes; /* total bytes received */ | 11 | __u32 rx_bytes; /* total bytes received */ |
@@ -39,8 +38,7 @@ struct rtnl_link_stats | |||
39 | }; | 38 | }; |
40 | 39 | ||
41 | /* The struct should be in sync with struct ifmap */ | 40 | /* The struct should be in sync with struct ifmap */ |
42 | struct rtnl_link_ifmap | 41 | struct rtnl_link_ifmap { |
43 | { | ||
44 | __u64 mem_start; | 42 | __u64 mem_start; |
45 | __u64 mem_end; | 43 | __u64 mem_end; |
46 | __u64 base_addr; | 44 | __u64 base_addr; |
@@ -49,8 +47,7 @@ struct rtnl_link_ifmap | |||
49 | __u8 port; | 47 | __u8 port; |
50 | }; | 48 | }; |
51 | 49 | ||
52 | enum | 50 | enum { |
53 | { | ||
54 | IFLA_UNSPEC, | 51 | IFLA_UNSPEC, |
55 | IFLA_ADDRESS, | 52 | IFLA_ADDRESS, |
56 | IFLA_BROADCAST, | 53 | IFLA_BROADCAST, |
@@ -123,8 +120,7 @@ enum | |||
123 | */ | 120 | */ |
124 | 121 | ||
125 | /* Subtype attributes for IFLA_PROTINFO */ | 122 | /* Subtype attributes for IFLA_PROTINFO */ |
126 | enum | 123 | enum { |
127 | { | ||
128 | IFLA_INET6_UNSPEC, | 124 | IFLA_INET6_UNSPEC, |
129 | IFLA_INET6_FLAGS, /* link flags */ | 125 | IFLA_INET6_FLAGS, /* link flags */ |
130 | IFLA_INET6_CONF, /* sysctl parameters */ | 126 | IFLA_INET6_CONF, /* sysctl parameters */ |
@@ -137,16 +133,14 @@ enum | |||
137 | 133 | ||
138 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) | 134 | #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) |
139 | 135 | ||
140 | struct ifla_cacheinfo | 136 | struct ifla_cacheinfo { |
141 | { | ||
142 | __u32 max_reasm_len; | 137 | __u32 max_reasm_len; |
143 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ | 138 | __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ |
144 | __u32 reachable_time; | 139 | __u32 reachable_time; |
145 | __u32 retrans_time; | 140 | __u32 retrans_time; |
146 | }; | 141 | }; |
147 | 142 | ||
148 | enum | 143 | enum { |
149 | { | ||
150 | IFLA_INFO_UNSPEC, | 144 | IFLA_INFO_UNSPEC, |
151 | IFLA_INFO_KIND, | 145 | IFLA_INFO_KIND, |
152 | IFLA_INFO_DATA, | 146 | IFLA_INFO_DATA, |
@@ -158,8 +152,7 @@ enum | |||
158 | 152 | ||
159 | /* VLAN section */ | 153 | /* VLAN section */ |
160 | 154 | ||
161 | enum | 155 | enum { |
162 | { | ||
163 | IFLA_VLAN_UNSPEC, | 156 | IFLA_VLAN_UNSPEC, |
164 | IFLA_VLAN_ID, | 157 | IFLA_VLAN_ID, |
165 | IFLA_VLAN_FLAGS, | 158 | IFLA_VLAN_FLAGS, |
@@ -175,8 +168,7 @@ struct ifla_vlan_flags { | |||
175 | __u32 mask; | 168 | __u32 mask; |
176 | }; | 169 | }; |
177 | 170 | ||
178 | enum | 171 | enum { |
179 | { | ||
180 | IFLA_VLAN_QOS_UNSPEC, | 172 | IFLA_VLAN_QOS_UNSPEC, |
181 | IFLA_VLAN_QOS_MAPPING, | 173 | IFLA_VLAN_QOS_MAPPING, |
182 | __IFLA_VLAN_QOS_MAX | 174 | __IFLA_VLAN_QOS_MAX |
@@ -184,8 +176,7 @@ enum | |||
184 | 176 | ||
185 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) | 177 | #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) |
186 | 178 | ||
187 | struct ifla_vlan_qos_mapping | 179 | struct ifla_vlan_qos_mapping { |
188 | { | ||
189 | __u32 from; | 180 | __u32 from; |
190 | __u32 to; | 181 | __u32 to; |
191 | }; | 182 | }; |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index dea7d6b7cf98..4021d47cc437 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -3,15 +3,13 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct sockaddr_pkt | 6 | struct sockaddr_pkt { |
7 | { | ||
8 | unsigned short spkt_family; | 7 | unsigned short spkt_family; |
9 | unsigned char spkt_device[14]; | 8 | unsigned char spkt_device[14]; |
10 | __be16 spkt_protocol; | 9 | __be16 spkt_protocol; |
11 | }; | 10 | }; |
12 | 11 | ||
13 | struct sockaddr_ll | 12 | struct sockaddr_ll { |
14 | { | ||
15 | unsigned short sll_family; | 13 | unsigned short sll_family; |
16 | __be16 sll_protocol; | 14 | __be16 sll_protocol; |
17 | int sll_ifindex; | 15 | int sll_ifindex; |
@@ -49,14 +47,12 @@ struct sockaddr_ll | |||
49 | #define PACKET_TX_RING 13 | 47 | #define PACKET_TX_RING 13 |
50 | #define PACKET_LOSS 14 | 48 | #define PACKET_LOSS 14 |
51 | 49 | ||
52 | struct tpacket_stats | 50 | struct tpacket_stats { |
53 | { | ||
54 | unsigned int tp_packets; | 51 | unsigned int tp_packets; |
55 | unsigned int tp_drops; | 52 | unsigned int tp_drops; |
56 | }; | 53 | }; |
57 | 54 | ||
58 | struct tpacket_auxdata | 55 | struct tpacket_auxdata { |
59 | { | ||
60 | __u32 tp_status; | 56 | __u32 tp_status; |
61 | __u32 tp_len; | 57 | __u32 tp_len; |
62 | __u32 tp_snaplen; | 58 | __u32 tp_snaplen; |
@@ -78,8 +74,7 @@ struct tpacket_auxdata | |||
78 | #define TP_STATUS_SENDING 0x2 | 74 | #define TP_STATUS_SENDING 0x2 |
79 | #define TP_STATUS_WRONG_FORMAT 0x4 | 75 | #define TP_STATUS_WRONG_FORMAT 0x4 |
80 | 76 | ||
81 | struct tpacket_hdr | 77 | struct tpacket_hdr { |
82 | { | ||
83 | unsigned long tp_status; | 78 | unsigned long tp_status; |
84 | unsigned int tp_len; | 79 | unsigned int tp_len; |
85 | unsigned int tp_snaplen; | 80 | unsigned int tp_snaplen; |
@@ -93,8 +88,7 @@ struct tpacket_hdr | |||
93 | #define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) | 88 | #define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) |
94 | #define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) | 89 | #define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) |
95 | 90 | ||
96 | struct tpacket2_hdr | 91 | struct tpacket2_hdr { |
97 | { | ||
98 | __u32 tp_status; | 92 | __u32 tp_status; |
99 | __u32 tp_len; | 93 | __u32 tp_len; |
100 | __u32 tp_snaplen; | 94 | __u32 tp_snaplen; |
@@ -107,8 +101,7 @@ struct tpacket2_hdr | |||
107 | 101 | ||
108 | #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) | 102 | #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) |
109 | 103 | ||
110 | enum tpacket_versions | 104 | enum tpacket_versions { |
111 | { | ||
112 | TPACKET_V1, | 105 | TPACKET_V1, |
113 | TPACKET_V2, | 106 | TPACKET_V2, |
114 | }; | 107 | }; |
@@ -126,16 +119,14 @@ enum tpacket_versions | |||
126 | - Pad to align to TPACKET_ALIGNMENT=16 | 119 | - Pad to align to TPACKET_ALIGNMENT=16 |
127 | */ | 120 | */ |
128 | 121 | ||
129 | struct tpacket_req | 122 | struct tpacket_req { |
130 | { | ||
131 | unsigned int tp_block_size; /* Minimal size of contiguous block */ | 123 | unsigned int tp_block_size; /* Minimal size of contiguous block */ |
132 | unsigned int tp_block_nr; /* Number of blocks */ | 124 | unsigned int tp_block_nr; /* Number of blocks */ |
133 | unsigned int tp_frame_size; /* Size of frame */ | 125 | unsigned int tp_frame_size; /* Size of frame */ |
134 | unsigned int tp_frame_nr; /* Total number of frames */ | 126 | unsigned int tp_frame_nr; /* Total number of frames */ |
135 | }; | 127 | }; |
136 | 128 | ||
137 | struct packet_mreq | 129 | struct packet_mreq { |
138 | { | ||
139 | int mr_ifindex; | 130 | int mr_ifindex; |
140 | unsigned short mr_type; | 131 | unsigned short mr_type; |
141 | unsigned short mr_alen; | 132 | unsigned short mr_alen; |
diff --git a/include/linux/if_plip.h b/include/linux/if_plip.h index 153a649915a2..6298c7e88b2b 100644 --- a/include/linux/if_plip.h +++ b/include/linux/if_plip.h | |||
@@ -15,8 +15,7 @@ | |||
15 | 15 | ||
16 | #define SIOCDEVPLIP SIOCDEVPRIVATE | 16 | #define SIOCDEVPLIP SIOCDEVPRIVATE |
17 | 17 | ||
18 | struct plipconf | 18 | struct plipconf { |
19 | { | ||
20 | unsigned short pcmd; | 19 | unsigned short pcmd; |
21 | unsigned long nibble; | 20 | unsigned long nibble; |
22 | unsigned long trigger; | 21 | unsigned long trigger; |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index 3a14b088c8ec..c58baea4a25b 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
@@ -24,8 +24,7 @@ | |||
24 | /* Structure used to connect() the socket to a particular tunnel UDP | 24 | /* Structure used to connect() the socket to a particular tunnel UDP |
25 | * socket. | 25 | * socket. |
26 | */ | 26 | */ |
27 | struct pppol2tp_addr | 27 | struct pppol2tp_addr { |
28 | { | ||
29 | __kernel_pid_t pid; /* pid that owns the fd. | 28 | __kernel_pid_t pid; /* pid that owns the fd. |
30 | * 0 => current */ | 29 | * 0 => current */ |
31 | int fd; /* FD of UDP socket to use */ | 30 | int fd; /* FD of UDP socket to use */ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 8d76cb4c86fa..1822d635be6b 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -30,8 +30,7 @@ | |||
30 | #define GRE_FLAGS __cpu_to_be16(0x00F8) | 30 | #define GRE_FLAGS __cpu_to_be16(0x00F8) |
31 | #define GRE_VERSION __cpu_to_be16(0x0007) | 31 | #define GRE_VERSION __cpu_to_be16(0x0007) |
32 | 32 | ||
33 | struct ip_tunnel_parm | 33 | struct ip_tunnel_parm { |
34 | { | ||
35 | char name[IFNAMSIZ]; | 34 | char name[IFNAMSIZ]; |
36 | int link; | 35 | int link; |
37 | __be16 i_flags; | 36 | __be16 i_flags; |
@@ -63,8 +62,7 @@ struct ip_tunnel_6rd { | |||
63 | __u16 relay_prefixlen; | 62 | __u16 relay_prefixlen; |
64 | }; | 63 | }; |
65 | 64 | ||
66 | enum | 65 | enum { |
67 | { | ||
68 | IFLA_GRE_UNSPEC, | 66 | IFLA_GRE_UNSPEC, |
69 | IFLA_GRE_LINK, | 67 | IFLA_GRE_LINK, |
70 | IFLA_GRE_IFLAGS, | 68 | IFLA_GRE_IFLAGS, |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index fe158e0e20e6..724c27e5d173 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -27,8 +27,7 @@ | |||
27 | * Header in on cable format | 27 | * Header in on cable format |
28 | */ | 28 | */ |
29 | 29 | ||
30 | struct igmphdr | 30 | struct igmphdr { |
31 | { | ||
32 | __u8 type; | 31 | __u8 type; |
33 | __u8 code; /* For newer IGMP */ | 32 | __u8 code; /* For newer IGMP */ |
34 | __sum16 csum; | 33 | __sum16 csum; |
@@ -151,8 +150,7 @@ static inline struct igmpv3_query * | |||
151 | extern int sysctl_igmp_max_memberships; | 150 | extern int sysctl_igmp_max_memberships; |
152 | extern int sysctl_igmp_max_msf; | 151 | extern int sysctl_igmp_max_msf; |
153 | 152 | ||
154 | struct ip_sf_socklist | 153 | struct ip_sf_socklist { |
155 | { | ||
156 | unsigned int sl_max; | 154 | unsigned int sl_max; |
157 | unsigned int sl_count; | 155 | unsigned int sl_count; |
158 | __be32 sl_addr[0]; | 156 | __be32 sl_addr[0]; |
@@ -167,16 +165,14 @@ struct ip_sf_socklist | |||
167 | this list never used in fast path code | 165 | this list never used in fast path code |
168 | */ | 166 | */ |
169 | 167 | ||
170 | struct ip_mc_socklist | 168 | struct ip_mc_socklist { |
171 | { | ||
172 | struct ip_mc_socklist *next; | 169 | struct ip_mc_socklist *next; |
173 | struct ip_mreqn multi; | 170 | struct ip_mreqn multi; |
174 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 171 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
175 | struct ip_sf_socklist *sflist; | 172 | struct ip_sf_socklist *sflist; |
176 | }; | 173 | }; |
177 | 174 | ||
178 | struct ip_sf_list | 175 | struct ip_sf_list { |
179 | { | ||
180 | struct ip_sf_list *sf_next; | 176 | struct ip_sf_list *sf_next; |
181 | __be32 sf_inaddr; | 177 | __be32 sf_inaddr; |
182 | unsigned long sf_count[2]; /* include/exclude counts */ | 178 | unsigned long sf_count[2]; /* include/exclude counts */ |
@@ -185,8 +181,7 @@ struct ip_sf_list | |||
185 | unsigned char sf_crcount; /* retrans. left to send */ | 181 | unsigned char sf_crcount; /* retrans. left to send */ |
186 | }; | 182 | }; |
187 | 183 | ||
188 | struct ip_mc_list | 184 | struct ip_mc_list { |
189 | { | ||
190 | struct in_device *interface; | 185 | struct in_device *interface; |
191 | __be32 multiaddr; | 186 | __be32 multiaddr; |
192 | struct ip_sf_list *sources; | 187 | struct ip_sf_list *sources; |
diff --git a/include/linux/in.h b/include/linux/in.h index cf196da04ec9..b615649db129 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -118,14 +118,12 @@ struct in_addr { | |||
118 | 118 | ||
119 | /* Request struct for multicast socket ops */ | 119 | /* Request struct for multicast socket ops */ |
120 | 120 | ||
121 | struct ip_mreq | 121 | struct ip_mreq { |
122 | { | ||
123 | struct in_addr imr_multiaddr; /* IP multicast address of group */ | 122 | struct in_addr imr_multiaddr; /* IP multicast address of group */ |
124 | struct in_addr imr_interface; /* local IP address of interface */ | 123 | struct in_addr imr_interface; /* local IP address of interface */ |
125 | }; | 124 | }; |
126 | 125 | ||
127 | struct ip_mreqn | 126 | struct ip_mreqn { |
128 | { | ||
129 | struct in_addr imr_multiaddr; /* IP multicast address of group */ | 127 | struct in_addr imr_multiaddr; /* IP multicast address of group */ |
130 | struct in_addr imr_address; /* local IP address of interface */ | 128 | struct in_addr imr_address; /* local IP address of interface */ |
131 | int imr_ifindex; /* Interface index */ | 129 | int imr_ifindex; /* Interface index */ |
@@ -149,21 +147,18 @@ struct ip_msfilter { | |||
149 | (sizeof(struct ip_msfilter) - sizeof(__u32) \ | 147 | (sizeof(struct ip_msfilter) - sizeof(__u32) \ |
150 | + (numsrc) * sizeof(__u32)) | 148 | + (numsrc) * sizeof(__u32)) |
151 | 149 | ||
152 | struct group_req | 150 | struct group_req { |
153 | { | ||
154 | __u32 gr_interface; /* interface index */ | 151 | __u32 gr_interface; /* interface index */ |
155 | struct __kernel_sockaddr_storage gr_group; /* group address */ | 152 | struct __kernel_sockaddr_storage gr_group; /* group address */ |
156 | }; | 153 | }; |
157 | 154 | ||
158 | struct group_source_req | 155 | struct group_source_req { |
159 | { | ||
160 | __u32 gsr_interface; /* interface index */ | 156 | __u32 gsr_interface; /* interface index */ |
161 | struct __kernel_sockaddr_storage gsr_group; /* group address */ | 157 | struct __kernel_sockaddr_storage gsr_group; /* group address */ |
162 | struct __kernel_sockaddr_storage gsr_source; /* source address */ | 158 | struct __kernel_sockaddr_storage gsr_source; /* source address */ |
163 | }; | 159 | }; |
164 | 160 | ||
165 | struct group_filter | 161 | struct group_filter { |
166 | { | ||
167 | __u32 gf_interface; /* interface index */ | 162 | __u32 gf_interface; /* interface index */ |
168 | struct __kernel_sockaddr_storage gf_group; /* multicast address */ | 163 | struct __kernel_sockaddr_storage gf_group; /* multicast address */ |
169 | __u32 gf_fmode; /* filter mode */ | 164 | __u32 gf_fmode; /* filter mode */ |
@@ -175,8 +170,7 @@ struct group_filter | |||
175 | (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \ | 170 | (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \ |
176 | + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) | 171 | + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) |
177 | 172 | ||
178 | struct in_pktinfo | 173 | struct in_pktinfo { |
179 | { | ||
180 | int ipi_ifindex; | 174 | int ipi_ifindex; |
181 | struct in_addr ipi_spec_dst; | 175 | struct in_addr ipi_spec_dst; |
182 | struct in_addr ipi_addr; | 176 | struct in_addr ipi_addr; |
diff --git a/include/linux/in6.h b/include/linux/in6.h index 718bf21c5754..dfa29168e6ab 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -27,10 +27,8 @@ | |||
27 | * IPv6 address structure | 27 | * IPv6 address structure |
28 | */ | 28 | */ |
29 | 29 | ||
30 | struct in6_addr | 30 | struct in6_addr { |
31 | { | 31 | union { |
32 | union | ||
33 | { | ||
34 | __u8 u6_addr8[16]; | 32 | __u8 u6_addr8[16]; |
35 | __be16 u6_addr16[8]; | 33 | __be16 u6_addr16[8]; |
36 | __be32 u6_addr32[4]; | 34 | __be32 u6_addr32[4]; |
@@ -75,8 +73,7 @@ struct ipv6_mreq { | |||
75 | 73 | ||
76 | #define ipv6mr_acaddr ipv6mr_multiaddr | 74 | #define ipv6mr_acaddr ipv6mr_multiaddr |
77 | 75 | ||
78 | struct in6_flowlabel_req | 76 | struct in6_flowlabel_req { |
79 | { | ||
80 | struct in6_addr flr_dst; | 77 | struct in6_addr flr_dst; |
81 | __be32 flr_label; | 78 | __be32 flr_label; |
82 | __u8 flr_action; | 79 | __u8 flr_action; |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ad27c7da8798..eecfa559bfb4 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -10,15 +10,13 @@ | |||
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | 11 | #include <linux/sysctl.h> |
12 | 12 | ||
13 | struct ipv4_devconf | 13 | struct ipv4_devconf { |
14 | { | ||
15 | void *sysctl; | 14 | void *sysctl; |
16 | int data[__NET_IPV4_CONF_MAX - 1]; | 15 | int data[__NET_IPV4_CONF_MAX - 1]; |
17 | DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1); | 16 | DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1); |
18 | }; | 17 | }; |
19 | 18 | ||
20 | struct in_device | 19 | struct in_device { |
21 | { | ||
22 | struct net_device *dev; | 20 | struct net_device *dev; |
23 | atomic_t refcnt; | 21 | atomic_t refcnt; |
24 | int dead; | 22 | int dead; |
@@ -110,8 +108,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) | 108 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) |
111 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) | 109 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) |
112 | 110 | ||
113 | struct in_ifaddr | 111 | struct in_ifaddr { |
114 | { | ||
115 | struct in_ifaddr *ifa_next; | 112 | struct in_ifaddr *ifa_next; |
116 | struct in_device *ifa_dev; | 113 | struct in_device *ifa_dev; |
117 | struct rcu_head rcu_head; | 114 | struct rcu_head rcu_head; |
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index 148265e63e8d..dfc170362842 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
@@ -127,8 +127,7 @@ struct ip_vs_dest_user { | |||
127 | /* | 127 | /* |
128 | * IPVS statistics object (for user space) | 128 | * IPVS statistics object (for user space) |
129 | */ | 129 | */ |
130 | struct ip_vs_stats_user | 130 | struct ip_vs_stats_user { |
131 | { | ||
132 | __u32 conns; /* connections scheduled */ | 131 | __u32 conns; /* connections scheduled */ |
133 | __u32 inpkts; /* incoming packets */ | 132 | __u32 inpkts; /* incoming packets */ |
134 | __u32 outpkts; /* outgoing packets */ | 133 | __u32 outpkts; /* outgoing packets */ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index d5f69151f692..c5f3d53548e2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -76,8 +76,7 @@ struct vifctl { | |||
76 | * Cache manipulation structures for mrouted and PIMd | 76 | * Cache manipulation structures for mrouted and PIMd |
77 | */ | 77 | */ |
78 | 78 | ||
79 | struct mfcctl | 79 | struct mfcctl { |
80 | { | ||
81 | struct in_addr mfcc_origin; /* Origin of mcast */ | 80 | struct in_addr mfcc_origin; /* Origin of mcast */ |
82 | struct in_addr mfcc_mcastgrp; /* Group in question */ | 81 | struct in_addr mfcc_mcastgrp; /* Group in question */ |
83 | vifi_t mfcc_parent; /* Where it arrived */ | 82 | vifi_t mfcc_parent; /* Where it arrived */ |
@@ -92,8 +91,7 @@ struct mfcctl | |||
92 | * Group count retrieval for mrouted | 91 | * Group count retrieval for mrouted |
93 | */ | 92 | */ |
94 | 93 | ||
95 | struct sioc_sg_req | 94 | struct sioc_sg_req { |
96 | { | ||
97 | struct in_addr src; | 95 | struct in_addr src; |
98 | struct in_addr grp; | 96 | struct in_addr grp; |
99 | unsigned long pktcnt; | 97 | unsigned long pktcnt; |
@@ -105,8 +103,7 @@ struct sioc_sg_req | |||
105 | * To get vif packet counts | 103 | * To get vif packet counts |
106 | */ | 104 | */ |
107 | 105 | ||
108 | struct sioc_vif_req | 106 | struct sioc_vif_req { |
109 | { | ||
110 | vifi_t vifi; /* Which iface */ | 107 | vifi_t vifi; /* Which iface */ |
111 | unsigned long icount; /* In packets */ | 108 | unsigned long icount; /* In packets */ |
112 | unsigned long ocount; /* Out packets */ | 109 | unsigned long ocount; /* Out packets */ |
@@ -119,8 +116,7 @@ struct sioc_vif_req | |||
119 | * data. Magically happens to be like an IP packet as per the original | 116 | * data. Magically happens to be like an IP packet as per the original |
120 | */ | 117 | */ |
121 | 118 | ||
122 | struct igmpmsg | 119 | struct igmpmsg { |
123 | { | ||
124 | __u32 unused1,unused2; | 120 | __u32 unused1,unused2; |
125 | unsigned char im_msgtype; /* What is this */ | 121 | unsigned char im_msgtype; /* What is this */ |
126 | unsigned char im_mbz; /* Must be zero */ | 122 | unsigned char im_mbz; /* Must be zero */ |
@@ -181,8 +177,7 @@ static inline int ip_mr_init(void) | |||
181 | } | 177 | } |
182 | #endif | 178 | #endif |
183 | 179 | ||
184 | struct vif_device | 180 | struct vif_device { |
185 | { | ||
186 | struct net_device *dev; /* Device we are using */ | 181 | struct net_device *dev; /* Device we are using */ |
187 | unsigned long bytes_in,bytes_out; | 182 | unsigned long bytes_in,bytes_out; |
188 | unsigned long pkt_in,pkt_out; /* Statistics */ | 183 | unsigned long pkt_in,pkt_out; /* Statistics */ |
@@ -195,8 +190,7 @@ struct vif_device | |||
195 | 190 | ||
196 | #define VIFF_STATIC 0x8000 | 191 | #define VIFF_STATIC 0x8000 |
197 | 192 | ||
198 | struct mfc_cache | 193 | struct mfc_cache { |
199 | { | ||
200 | struct mfc_cache *next; /* Next entry on cache line */ | 194 | struct mfc_cache *next; /* Next entry on cache line */ |
201 | #ifdef CONFIG_NET_NS | 195 | #ifdef CONFIG_NET_NS |
202 | struct net *mfc_net; | 196 | struct net *mfc_net; |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index b191865a6ca3..2caa1a8e525d 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -75,8 +75,7 @@ struct mif6ctl { | |||
75 | * Cache manipulation structures for mrouted and PIMd | 75 | * Cache manipulation structures for mrouted and PIMd |
76 | */ | 76 | */ |
77 | 77 | ||
78 | struct mf6cctl | 78 | struct mf6cctl { |
79 | { | ||
80 | struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */ | 79 | struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */ |
81 | struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */ | 80 | struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */ |
82 | mifi_t mf6cc_parent; /* Where it arrived */ | 81 | mifi_t mf6cc_parent; /* Where it arrived */ |
@@ -87,8 +86,7 @@ struct mf6cctl | |||
87 | * Group count retrieval for pim6sd | 86 | * Group count retrieval for pim6sd |
88 | */ | 87 | */ |
89 | 88 | ||
90 | struct sioc_sg_req6 | 89 | struct sioc_sg_req6 { |
91 | { | ||
92 | struct sockaddr_in6 src; | 90 | struct sockaddr_in6 src; |
93 | struct sockaddr_in6 grp; | 91 | struct sockaddr_in6 grp; |
94 | unsigned long pktcnt; | 92 | unsigned long pktcnt; |
@@ -100,8 +98,7 @@ struct sioc_sg_req6 | |||
100 | * To get vif packet counts | 98 | * To get vif packet counts |
101 | */ | 99 | */ |
102 | 100 | ||
103 | struct sioc_mif_req6 | 101 | struct sioc_mif_req6 { |
104 | { | ||
105 | mifi_t mifi; /* Which iface */ | 102 | mifi_t mifi; /* Which iface */ |
106 | unsigned long icount; /* In packets */ | 103 | unsigned long icount; /* In packets */ |
107 | unsigned long ocount; /* Out packets */ | 104 | unsigned long ocount; /* Out packets */ |
@@ -172,8 +169,7 @@ static inline void ip6_mr_cleanup(void) | |||
172 | } | 169 | } |
173 | #endif | 170 | #endif |
174 | 171 | ||
175 | struct mif_device | 172 | struct mif_device { |
176 | { | ||
177 | struct net_device *dev; /* Device we are using */ | 173 | struct net_device *dev; /* Device we are using */ |
178 | unsigned long bytes_in,bytes_out; | 174 | unsigned long bytes_in,bytes_out; |
179 | unsigned long pkt_in,pkt_out; /* Statistics */ | 175 | unsigned long pkt_in,pkt_out; /* Statistics */ |
@@ -185,8 +181,7 @@ struct mif_device | |||
185 | 181 | ||
186 | #define VIFF_STATIC 0x8000 | 182 | #define VIFF_STATIC 0x8000 |
187 | 183 | ||
188 | struct mfc6_cache | 184 | struct mfc6_cache { |
189 | { | ||
190 | struct mfc6_cache *next; /* Next entry on cache line */ | 185 | struct mfc6_cache *next; /* Next entry on cache line */ |
191 | #ifdef CONFIG_NET_NS | 186 | #ifdef CONFIG_NET_NS |
192 | struct net *mfc6_net; | 187 | struct net *mfc6_net; |
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h index 12c9de138451..a7003b7a695d 100644 --- a/include/linux/neighbour.h +++ b/include/linux/neighbour.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
6 | 6 | ||
7 | struct ndmsg | 7 | struct ndmsg { |
8 | { | ||
9 | __u8 ndm_family; | 8 | __u8 ndm_family; |
10 | __u8 ndm_pad1; | 9 | __u8 ndm_pad1; |
11 | __u16 ndm_pad2; | 10 | __u16 ndm_pad2; |
@@ -15,8 +14,7 @@ struct ndmsg | |||
15 | __u8 ndm_type; | 14 | __u8 ndm_type; |
16 | }; | 15 | }; |
17 | 16 | ||
18 | enum | 17 | enum { |
19 | { | ||
20 | NDA_UNSPEC, | 18 | NDA_UNSPEC, |
21 | NDA_DST, | 19 | NDA_DST, |
22 | NDA_LLADDR, | 20 | NDA_LLADDR, |
@@ -56,8 +54,7 @@ enum | |||
56 | NUD_PERMANENT is also cannot be deleted by garbage collectors. | 54 | NUD_PERMANENT is also cannot be deleted by garbage collectors. |
57 | */ | 55 | */ |
58 | 56 | ||
59 | struct nda_cacheinfo | 57 | struct nda_cacheinfo { |
60 | { | ||
61 | __u32 ndm_confirmed; | 58 | __u32 ndm_confirmed; |
62 | __u32 ndm_used; | 59 | __u32 ndm_used; |
63 | __u32 ndm_updated; | 60 | __u32 ndm_updated; |
@@ -89,8 +86,7 @@ struct nda_cacheinfo | |||
89 | * device. | 86 | * device. |
90 | ****/ | 87 | ****/ |
91 | 88 | ||
92 | struct ndt_stats | 89 | struct ndt_stats { |
93 | { | ||
94 | __u64 ndts_allocs; | 90 | __u64 ndts_allocs; |
95 | __u64 ndts_destroys; | 91 | __u64 ndts_destroys; |
96 | __u64 ndts_hash_grows; | 92 | __u64 ndts_hash_grows; |
@@ -124,15 +120,13 @@ enum { | |||
124 | }; | 120 | }; |
125 | #define NDTPA_MAX (__NDTPA_MAX - 1) | 121 | #define NDTPA_MAX (__NDTPA_MAX - 1) |
126 | 122 | ||
127 | struct ndtmsg | 123 | struct ndtmsg { |
128 | { | ||
129 | __u8 ndtm_family; | 124 | __u8 ndtm_family; |
130 | __u8 ndtm_pad1; | 125 | __u8 ndtm_pad1; |
131 | __u16 ndtm_pad2; | 126 | __u16 ndtm_pad2; |
132 | }; | 127 | }; |
133 | 128 | ||
134 | struct ndt_config | 129 | struct ndt_config { |
135 | { | ||
136 | __u16 ndtc_key_len; | 130 | __u16 ndtc_key_len; |
137 | __u16 ndtc_entry_size; | 131 | __u16 ndtc_entry_size; |
138 | __u32 ndtc_entries; | 132 | __u32 ndtc_entries; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5077de028317..465add6c43e3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -125,8 +125,7 @@ typedef enum netdev_tx netdev_tx_t; | |||
125 | * with byte counters. | 125 | * with byte counters. |
126 | */ | 126 | */ |
127 | 127 | ||
128 | struct net_device_stats | 128 | struct net_device_stats { |
129 | { | ||
130 | unsigned long rx_packets; /* total packets received */ | 129 | unsigned long rx_packets; /* total packets received */ |
131 | unsigned long tx_packets; /* total packets transmitted */ | 130 | unsigned long tx_packets; /* total packets transmitted */ |
132 | unsigned long rx_bytes; /* total bytes received */ | 131 | unsigned long rx_bytes; /* total bytes received */ |
@@ -179,8 +178,7 @@ struct neighbour; | |||
179 | struct neigh_parms; | 178 | struct neigh_parms; |
180 | struct sk_buff; | 179 | struct sk_buff; |
181 | 180 | ||
182 | struct netif_rx_stats | 181 | struct netif_rx_stats { |
183 | { | ||
184 | unsigned total; | 182 | unsigned total; |
185 | unsigned dropped; | 183 | unsigned dropped; |
186 | unsigned time_squeeze; | 184 | unsigned time_squeeze; |
@@ -189,8 +187,7 @@ struct netif_rx_stats | |||
189 | 187 | ||
190 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 188 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
191 | 189 | ||
192 | struct dev_addr_list | 190 | struct dev_addr_list { |
193 | { | ||
194 | struct dev_addr_list *next; | 191 | struct dev_addr_list *next; |
195 | u8 da_addr[MAX_ADDR_LEN]; | 192 | u8 da_addr[MAX_ADDR_LEN]; |
196 | u8 da_addrlen; | 193 | u8 da_addrlen; |
@@ -227,8 +224,7 @@ struct netdev_hw_addr_list { | |||
227 | int count; | 224 | int count; |
228 | }; | 225 | }; |
229 | 226 | ||
230 | struct hh_cache | 227 | struct hh_cache { |
231 | { | ||
232 | struct hh_cache *hh_next; /* Next entry */ | 228 | struct hh_cache *hh_next; /* Next entry */ |
233 | atomic_t hh_refcnt; /* number of users */ | 229 | atomic_t hh_refcnt; /* number of users */ |
234 | /* | 230 | /* |
@@ -291,8 +287,7 @@ struct header_ops { | |||
291 | * code. | 287 | * code. |
292 | */ | 288 | */ |
293 | 289 | ||
294 | enum netdev_state_t | 290 | enum netdev_state_t { |
295 | { | ||
296 | __LINK_STATE_START, | 291 | __LINK_STATE_START, |
297 | __LINK_STATE_PRESENT, | 292 | __LINK_STATE_PRESENT, |
298 | __LINK_STATE_NOCARRIER, | 293 | __LINK_STATE_NOCARRIER, |
@@ -341,8 +336,7 @@ struct napi_struct { | |||
341 | struct sk_buff *skb; | 336 | struct sk_buff *skb; |
342 | }; | 337 | }; |
343 | 338 | ||
344 | enum | 339 | enum { |
345 | { | ||
346 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 340 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
347 | NAPI_STATE_DISABLE, /* Disable pending */ | 341 | NAPI_STATE_DISABLE, /* Disable pending */ |
348 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 342 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
@@ -458,8 +452,7 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
458 | # define napi_synchronize(n) barrier() | 452 | # define napi_synchronize(n) barrier() |
459 | #endif | 453 | #endif |
460 | 454 | ||
461 | enum netdev_queue_state_t | 455 | enum netdev_queue_state_t { |
462 | { | ||
463 | __QUEUE_STATE_XOFF, | 456 | __QUEUE_STATE_XOFF, |
464 | __QUEUE_STATE_FROZEN, | 457 | __QUEUE_STATE_FROZEN, |
465 | }; | 458 | }; |
@@ -653,8 +646,7 @@ struct net_device_ops { | |||
653 | * moves out. | 646 | * moves out. |
654 | */ | 647 | */ |
655 | 648 | ||
656 | struct net_device | 649 | struct net_device { |
657 | { | ||
658 | 650 | ||
659 | /* | 651 | /* |
660 | * This is the first field of the "visible" part of this structure | 652 | * This is the first field of the "visible" part of this structure |
@@ -1229,8 +1221,7 @@ static inline int unregister_gifconf(unsigned int family) | |||
1229 | * Incoming packets are placed on per-cpu queues so that | 1221 | * Incoming packets are placed on per-cpu queues so that |
1230 | * no locking is needed. | 1222 | * no locking is needed. |
1231 | */ | 1223 | */ |
1232 | struct softnet_data | 1224 | struct softnet_data { |
1233 | { | ||
1234 | struct Qdisc *output_queue; | 1225 | struct Qdisc *output_queue; |
1235 | struct sk_buff_head input_pkt_queue; | 1226 | struct sk_buff_head input_pkt_queue; |
1236 | struct list_head poll_list; | 1227 | struct list_head poll_list; |
@@ -1627,7 +1618,8 @@ static inline int netif_dormant(const struct net_device *dev) | |||
1627 | * | 1618 | * |
1628 | * Check if carrier is operational | 1619 | * Check if carrier is operational |
1629 | */ | 1620 | */ |
1630 | static inline int netif_oper_up(const struct net_device *dev) { | 1621 | static inline int netif_oper_up(const struct net_device *dev) |
1622 | { | ||
1631 | return (dev->operstate == IF_OPER_UP || | 1623 | return (dev->operstate == IF_OPER_UP || |
1632 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); | 1624 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); |
1633 | } | 1625 | } |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 6132b5e6d9d3..48c54960773c 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -93,8 +93,7 @@ typedef unsigned int nf_hookfn(unsigned int hooknum, | |||
93 | const struct net_device *out, | 93 | const struct net_device *out, |
94 | int (*okfn)(struct sk_buff *)); | 94 | int (*okfn)(struct sk_buff *)); |
95 | 95 | ||
96 | struct nf_hook_ops | 96 | struct nf_hook_ops { |
97 | { | ||
98 | struct list_head list; | 97 | struct list_head list; |
99 | 98 | ||
100 | /* User fills in from here down. */ | 99 | /* User fills in from here down. */ |
@@ -106,8 +105,7 @@ struct nf_hook_ops | |||
106 | int priority; | 105 | int priority; |
107 | }; | 106 | }; |
108 | 107 | ||
109 | struct nf_sockopt_ops | 108 | struct nf_sockopt_ops { |
110 | { | ||
111 | struct list_head list; | 109 | struct list_head list; |
112 | 110 | ||
113 | u_int8_t pf; | 111 | u_int8_t pf; |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index a8248ee422b7..a374787ed9b0 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -3,8 +3,7 @@ | |||
3 | /* Connection state tracking for netfilter. This is separated from, | 3 | /* Connection state tracking for netfilter. This is separated from, |
4 | but required by, the NAT layer; it can also be used by an iptables | 4 | but required by, the NAT layer; it can also be used by an iptables |
5 | extension. */ | 5 | extension. */ |
6 | enum ip_conntrack_info | 6 | enum ip_conntrack_info { |
7 | { | ||
8 | /* Part of an established connection (either direction). */ | 7 | /* Part of an established connection (either direction). */ |
9 | IP_CT_ESTABLISHED, | 8 | IP_CT_ESTABLISHED, |
10 | 9 | ||
@@ -76,8 +75,7 @@ enum ip_conntrack_status { | |||
76 | }; | 75 | }; |
77 | 76 | ||
78 | #ifdef __KERNEL__ | 77 | #ifdef __KERNEL__ |
79 | struct ip_conntrack_stat | 78 | struct ip_conntrack_stat { |
80 | { | ||
81 | unsigned int searched; | 79 | unsigned int searched; |
82 | unsigned int found; | 80 | unsigned int found; |
83 | unsigned int new; | 81 | unsigned int new; |
diff --git a/include/linux/netfilter/nf_conntrack_ftp.h b/include/linux/netfilter/nf_conntrack_ftp.h index 47727d7546ea..3e3aa08980c3 100644 --- a/include/linux/netfilter/nf_conntrack_ftp.h +++ b/include/linux/netfilter/nf_conntrack_ftp.h | |||
@@ -3,8 +3,7 @@ | |||
3 | /* FTP tracking. */ | 3 | /* FTP tracking. */ |
4 | 4 | ||
5 | /* This enum is exposed to userspace */ | 5 | /* This enum is exposed to userspace */ |
6 | enum nf_ct_ftp_type | 6 | enum nf_ct_ftp_type { |
7 | { | ||
8 | /* PORT command from client */ | 7 | /* PORT command from client */ |
9 | NF_CT_FTP_PORT, | 8 | NF_CT_FTP_PORT, |
10 | /* PASV response from server */ | 9 | /* PASV response from server */ |
diff --git a/include/linux/netfilter/nf_conntrack_sctp.h b/include/linux/netfilter/nf_conntrack_sctp.h index 768f78c4ac53..ceeefe6681b5 100644 --- a/include/linux/netfilter/nf_conntrack_sctp.h +++ b/include/linux/netfilter/nf_conntrack_sctp.h | |||
@@ -16,8 +16,7 @@ enum sctp_conntrack { | |||
16 | SCTP_CONNTRACK_MAX | 16 | SCTP_CONNTRACK_MAX |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct ip_ct_sctp | 19 | struct ip_ct_sctp { |
20 | { | ||
21 | enum sctp_conntrack state; | 20 | enum sctp_conntrack state; |
22 | 21 | ||
23 | __be32 vtag[IP_CT_DIR_MAX]; | 22 | __be32 vtag[IP_CT_DIR_MAX]; |
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 4352feed2377..f6d97f64d7a0 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -55,8 +55,7 @@ struct ip_ct_tcp_state { | |||
55 | u_int8_t flags; /* per direction options */ | 55 | u_int8_t flags; /* per direction options */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct ip_ct_tcp | 58 | struct ip_ct_tcp { |
59 | { | ||
60 | struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ | 59 | struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ |
61 | u_int8_t state; /* state of the connection (enum tcp_conntrack) */ | 60 | u_int8_t state; /* state of the connection (enum tcp_conntrack) */ |
62 | /* For detecting stale connections */ | 61 | /* For detecting stale connections */ |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 9f00da287f2c..49d321f3ccd2 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -55,8 +55,7 @@ struct nfgenmsg { | |||
55 | #include <linux/capability.h> | 55 | #include <linux/capability.h> |
56 | #include <net/netlink.h> | 56 | #include <net/netlink.h> |
57 | 57 | ||
58 | struct nfnl_callback | 58 | struct nfnl_callback { |
59 | { | ||
60 | int (*call)(struct sock *nl, struct sk_buff *skb, | 59 | int (*call)(struct sock *nl, struct sk_buff *skb, |
61 | const struct nlmsghdr *nlh, | 60 | const struct nlmsghdr *nlh, |
62 | const struct nlattr * const cda[]); | 61 | const struct nlattr * const cda[]); |
@@ -64,8 +63,7 @@ struct nfnl_callback | |||
64 | const u_int16_t attr_count; /* number of nlattr's */ | 63 | const u_int16_t attr_count; /* number of nlattr's */ |
65 | }; | 64 | }; |
66 | 65 | ||
67 | struct nfnetlink_subsystem | 66 | struct nfnetlink_subsystem { |
68 | { | ||
69 | const char *name; | 67 | const char *name; |
70 | __u8 subsys_id; /* nfnetlink subsystem ID */ | 68 | __u8 subsys_id; /* nfnetlink subsystem ID */ |
71 | __u8 cb_count; /* number of callbacks */ | 69 | __u8 cb_count; /* number of callbacks */ |
diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h index eda55cabceec..ffb95036bbd4 100644 --- a/include/linux/netfilter/nfnetlink_compat.h +++ b/include/linux/netfilter/nfnetlink_compat.h | |||
@@ -21,8 +21,7 @@ | |||
21 | * ! nfnetlink use the same attributes methods. - J. Schulist. | 21 | * ! nfnetlink use the same attributes methods. - J. Schulist. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | struct nfattr | 24 | struct nfattr { |
25 | { | ||
26 | __u16 nfa_len; | 25 | __u16 nfa_len; |
27 | __u16 nfa_type; /* we use 15 bits for the type, and the highest | 26 | __u16 nfa_type; /* we use 15 bits for the type, and the highest |
28 | * bit to indicate whether the payload is nested */ | 27 | * bit to indicate whether the payload is nested */ |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 812cb153cabb..378f27ae7772 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -6,8 +6,7 @@ | |||
6 | #define XT_FUNCTION_MAXNAMELEN 30 | 6 | #define XT_FUNCTION_MAXNAMELEN 30 |
7 | #define XT_TABLE_MAXNAMELEN 32 | 7 | #define XT_TABLE_MAXNAMELEN 32 |
8 | 8 | ||
9 | struct xt_entry_match | 9 | struct xt_entry_match { |
10 | { | ||
11 | union { | 10 | union { |
12 | struct { | 11 | struct { |
13 | __u16 match_size; | 12 | __u16 match_size; |
@@ -31,8 +30,7 @@ struct xt_entry_match | |||
31 | unsigned char data[0]; | 30 | unsigned char data[0]; |
32 | }; | 31 | }; |
33 | 32 | ||
34 | struct xt_entry_target | 33 | struct xt_entry_target { |
35 | { | ||
36 | union { | 34 | union { |
37 | struct { | 35 | struct { |
38 | __u16 target_size; | 36 | __u16 target_size; |
@@ -64,16 +62,14 @@ struct xt_entry_target | |||
64 | }, \ | 62 | }, \ |
65 | } | 63 | } |
66 | 64 | ||
67 | struct xt_standard_target | 65 | struct xt_standard_target { |
68 | { | ||
69 | struct xt_entry_target target; | 66 | struct xt_entry_target target; |
70 | int verdict; | 67 | int verdict; |
71 | }; | 68 | }; |
72 | 69 | ||
73 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision | 70 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision |
74 | * kernel supports, if >= revision. */ | 71 | * kernel supports, if >= revision. */ |
75 | struct xt_get_revision | 72 | struct xt_get_revision { |
76 | { | ||
77 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 73 | char name[XT_FUNCTION_MAXNAMELEN-1]; |
78 | 74 | ||
79 | __u8 revision; | 75 | __u8 revision; |
@@ -90,8 +86,7 @@ struct xt_get_revision | |||
90 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my | 86 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my |
91 | * personal pleasure to remove it -HW | 87 | * personal pleasure to remove it -HW |
92 | */ | 88 | */ |
93 | struct _xt_align | 89 | struct _xt_align { |
94 | { | ||
95 | __u8 u8; | 90 | __u8 u8; |
96 | __u16 u16; | 91 | __u16 u16; |
97 | __u32 u32; | 92 | __u32 u32; |
@@ -109,14 +104,12 @@ struct _xt_align | |||
109 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) | 104 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) |
110 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) | 105 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) |
111 | 106 | ||
112 | struct xt_counters | 107 | struct xt_counters { |
113 | { | ||
114 | __u64 pcnt, bcnt; /* Packet and byte counters */ | 108 | __u64 pcnt, bcnt; /* Packet and byte counters */ |
115 | }; | 109 | }; |
116 | 110 | ||
117 | /* The argument to IPT_SO_ADD_COUNTERS. */ | 111 | /* The argument to IPT_SO_ADD_COUNTERS. */ |
118 | struct xt_counters_info | 112 | struct xt_counters_info { |
119 | { | ||
120 | /* Which table. */ | 113 | /* Which table. */ |
121 | char name[XT_TABLE_MAXNAMELEN]; | 114 | char name[XT_TABLE_MAXNAMELEN]; |
122 | 115 | ||
@@ -269,8 +262,7 @@ struct xt_tgdtor_param { | |||
269 | u_int8_t family; | 262 | u_int8_t family; |
270 | }; | 263 | }; |
271 | 264 | ||
272 | struct xt_match | 265 | struct xt_match { |
273 | { | ||
274 | struct list_head list; | 266 | struct list_head list; |
275 | 267 | ||
276 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 268 | const char name[XT_FUNCTION_MAXNAMELEN-1]; |
@@ -310,8 +302,7 @@ struct xt_match | |||
310 | }; | 302 | }; |
311 | 303 | ||
312 | /* Registration hooks for targets. */ | 304 | /* Registration hooks for targets. */ |
313 | struct xt_target | 305 | struct xt_target { |
314 | { | ||
315 | struct list_head list; | 306 | struct list_head list; |
316 | 307 | ||
317 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 308 | const char name[XT_FUNCTION_MAXNAMELEN-1]; |
@@ -349,8 +340,7 @@ struct xt_target | |||
349 | }; | 340 | }; |
350 | 341 | ||
351 | /* Furniture shopping... */ | 342 | /* Furniture shopping... */ |
352 | struct xt_table | 343 | struct xt_table { |
353 | { | ||
354 | struct list_head list; | 344 | struct list_head list; |
355 | 345 | ||
356 | /* What hooks you will enter on */ | 346 | /* What hooks you will enter on */ |
@@ -371,8 +361,7 @@ struct xt_table | |||
371 | #include <linux/netfilter_ipv4.h> | 361 | #include <linux/netfilter_ipv4.h> |
372 | 362 | ||
373 | /* The table itself */ | 363 | /* The table itself */ |
374 | struct xt_table_info | 364 | struct xt_table_info { |
375 | { | ||
376 | /* Size per table */ | 365 | /* Size per table */ |
377 | unsigned int size; | 366 | unsigned int size; |
378 | /* Number of entries: FIXME. --RR */ | 367 | /* Number of entries: FIXME. --RR */ |
@@ -528,8 +517,7 @@ static inline unsigned long ifname_compare_aligned(const char *_a, | |||
528 | #ifdef CONFIG_COMPAT | 517 | #ifdef CONFIG_COMPAT |
529 | #include <net/compat.h> | 518 | #include <net/compat.h> |
530 | 519 | ||
531 | struct compat_xt_entry_match | 520 | struct compat_xt_entry_match { |
532 | { | ||
533 | union { | 521 | union { |
534 | struct { | 522 | struct { |
535 | u_int16_t match_size; | 523 | u_int16_t match_size; |
@@ -545,8 +533,7 @@ struct compat_xt_entry_match | |||
545 | unsigned char data[0]; | 533 | unsigned char data[0]; |
546 | }; | 534 | }; |
547 | 535 | ||
548 | struct compat_xt_entry_target | 536 | struct compat_xt_entry_target { |
549 | { | ||
550 | union { | 537 | union { |
551 | struct { | 538 | struct { |
552 | u_int16_t target_size; | 539 | u_int16_t target_size; |
@@ -566,8 +553,7 @@ struct compat_xt_entry_target | |||
566 | * need to change whole approach in order to calculate align as function of | 553 | * need to change whole approach in order to calculate align as function of |
567 | * current task alignment */ | 554 | * current task alignment */ |
568 | 555 | ||
569 | struct compat_xt_counters | 556 | struct compat_xt_counters { |
570 | { | ||
571 | #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) | 557 | #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) |
572 | u_int32_t cnt[4]; | 558 | u_int32_t cnt[4]; |
573 | #else | 559 | #else |
@@ -575,8 +561,7 @@ struct compat_xt_counters | |||
575 | #endif | 561 | #endif |
576 | }; | 562 | }; |
577 | 563 | ||
578 | struct compat_xt_counters_info | 564 | struct compat_xt_counters_info { |
579 | { | ||
580 | char name[XT_TABLE_MAXNAMELEN]; | 565 | char name[XT_TABLE_MAXNAMELEN]; |
581 | compat_uint_t num_counters; | 566 | compat_uint_t num_counters; |
582 | struct compat_xt_counters counters[0]; | 567 | struct compat_xt_counters counters[0]; |
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h index 52bd6153b996..92fcbb0d193e 100644 --- a/include/linux/netfilter/xt_connbytes.h +++ b/include/linux/netfilter/xt_connbytes.h | |||
@@ -15,8 +15,7 @@ enum xt_connbytes_direction { | |||
15 | XT_CONNBYTES_DIR_BOTH, | 15 | XT_CONNBYTES_DIR_BOTH, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | struct xt_connbytes_info | 18 | struct xt_connbytes_info { |
19 | { | ||
20 | struct { | 19 | struct { |
21 | aligned_u64 from; /* count to be matched */ | 20 | aligned_u64 from; /* count to be matched */ |
22 | aligned_u64 to; /* count to be matched */ | 21 | aligned_u64 to; /* count to be matched */ |
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h index ef6fa4747d0a..ee6882408000 100644 --- a/include/linux/netfilter/xt_esp.h +++ b/include/linux/netfilter/xt_esp.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct xt_esp | 6 | struct xt_esp { |
7 | { | ||
8 | __u32 spis[2]; /* Security Parameter Index */ | 7 | __u32 spis[2]; /* Security Parameter Index */ |
9 | __u8 invflags; /* Inverse flags */ | 8 | __u8 invflags; /* Inverse flags */ |
10 | }; | 9 | }; |
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h index 185db499fcbc..5b7e72dfffc5 100644 --- a/include/linux/netfilter/xt_multiport.h +++ b/include/linux/netfilter/xt_multiport.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | enum xt_multiport_flags | 6 | enum xt_multiport_flags { |
7 | { | ||
8 | XT_MULTIPORT_SOURCE, | 7 | XT_MULTIPORT_SOURCE, |
9 | XT_MULTIPORT_DESTINATION, | 8 | XT_MULTIPORT_DESTINATION, |
10 | XT_MULTIPORT_EITHER | 9 | XT_MULTIPORT_EITHER |
@@ -13,15 +12,13 @@ enum xt_multiport_flags | |||
13 | #define XT_MULTI_PORTS 15 | 12 | #define XT_MULTI_PORTS 15 |
14 | 13 | ||
15 | /* Must fit inside union xt_matchinfo: 16 bytes */ | 14 | /* Must fit inside union xt_matchinfo: 16 bytes */ |
16 | struct xt_multiport | 15 | struct xt_multiport { |
17 | { | ||
18 | __u8 flags; /* Type of comparison */ | 16 | __u8 flags; /* Type of comparison */ |
19 | __u8 count; /* Number of ports */ | 17 | __u8 count; /* Number of ports */ |
20 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ | 18 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ |
21 | }; | 19 | }; |
22 | 20 | ||
23 | struct xt_multiport_v1 | 21 | struct xt_multiport_v1 { |
24 | { | ||
25 | __u8 flags; /* Type of comparison */ | 22 | __u8 flags; /* Type of comparison */ |
26 | __u8 count; /* Number of ports */ | 23 | __u8 count; /* Number of ports */ |
27 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ | 24 | __u16 ports[XT_MULTI_PORTS]; /* Ports */ |
diff --git a/include/linux/netfilter/xt_policy.h b/include/linux/netfilter/xt_policy.h index 7bb64e7c853d..be8ead05c316 100644 --- a/include/linux/netfilter/xt_policy.h +++ b/include/linux/netfilter/xt_policy.h | |||
@@ -5,22 +5,19 @@ | |||
5 | 5 | ||
6 | #define XT_POLICY_MAX_ELEM 4 | 6 | #define XT_POLICY_MAX_ELEM 4 |
7 | 7 | ||
8 | enum xt_policy_flags | 8 | enum xt_policy_flags { |
9 | { | ||
10 | XT_POLICY_MATCH_IN = 0x1, | 9 | XT_POLICY_MATCH_IN = 0x1, |
11 | XT_POLICY_MATCH_OUT = 0x2, | 10 | XT_POLICY_MATCH_OUT = 0x2, |
12 | XT_POLICY_MATCH_NONE = 0x4, | 11 | XT_POLICY_MATCH_NONE = 0x4, |
13 | XT_POLICY_MATCH_STRICT = 0x8, | 12 | XT_POLICY_MATCH_STRICT = 0x8, |
14 | }; | 13 | }; |
15 | 14 | ||
16 | enum xt_policy_modes | 15 | enum xt_policy_modes { |
17 | { | ||
18 | XT_POLICY_MODE_TRANSPORT, | 16 | XT_POLICY_MODE_TRANSPORT, |
19 | XT_POLICY_MODE_TUNNEL | 17 | XT_POLICY_MODE_TUNNEL |
20 | }; | 18 | }; |
21 | 19 | ||
22 | struct xt_policy_spec | 20 | struct xt_policy_spec { |
23 | { | ||
24 | __u8 saddr:1, | 21 | __u8 saddr:1, |
25 | daddr:1, | 22 | daddr:1, |
26 | proto:1, | 23 | proto:1, |
@@ -30,15 +27,13 @@ struct xt_policy_spec | |||
30 | }; | 27 | }; |
31 | 28 | ||
32 | #ifndef __KERNEL__ | 29 | #ifndef __KERNEL__ |
33 | union xt_policy_addr | 30 | union xt_policy_addr { |
34 | { | ||
35 | struct in_addr a4; | 31 | struct in_addr a4; |
36 | struct in6_addr a6; | 32 | struct in6_addr a6; |
37 | }; | 33 | }; |
38 | #endif | 34 | #endif |
39 | 35 | ||
40 | struct xt_policy_elem | 36 | struct xt_policy_elem { |
41 | { | ||
42 | union { | 37 | union { |
43 | #ifdef __KERNEL__ | 38 | #ifdef __KERNEL__ |
44 | struct { | 39 | struct { |
@@ -65,8 +60,7 @@ struct xt_policy_elem | |||
65 | struct xt_policy_spec invert; | 60 | struct xt_policy_spec invert; |
66 | }; | 61 | }; |
67 | 62 | ||
68 | struct xt_policy_info | 63 | struct xt_policy_info { |
69 | { | ||
70 | struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; | 64 | struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; |
71 | __u16 flags; | 65 | __u16 flags; |
72 | __u16 len; | 66 | __u16 len; |
diff --git a/include/linux/netfilter/xt_state.h b/include/linux/netfilter/xt_state.h index c06f32edee07..7b32de886613 100644 --- a/include/linux/netfilter/xt_state.h +++ b/include/linux/netfilter/xt_state.h | |||
@@ -6,8 +6,7 @@ | |||
6 | 6 | ||
7 | #define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1)) | 7 | #define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1)) |
8 | 8 | ||
9 | struct xt_state_info | 9 | struct xt_state_info { |
10 | { | ||
11 | unsigned int statemask; | 10 | unsigned int statemask; |
12 | }; | 11 | }; |
13 | #endif /*_XT_STATE_H*/ | 12 | #endif /*_XT_STATE_H*/ |
diff --git a/include/linux/netfilter/xt_string.h b/include/linux/netfilter/xt_string.h index ecbb95fc89ed..235347c02eab 100644 --- a/include/linux/netfilter/xt_string.h +++ b/include/linux/netfilter/xt_string.h | |||
@@ -11,8 +11,7 @@ enum { | |||
11 | XT_STRING_FLAG_IGNORECASE = 0x02 | 11 | XT_STRING_FLAG_IGNORECASE = 0x02 |
12 | }; | 12 | }; |
13 | 13 | ||
14 | struct xt_string_info | 14 | struct xt_string_info { |
15 | { | ||
16 | __u16 from_offset; | 15 | __u16 from_offset; |
17 | __u16 to_offset; | 16 | __u16 to_offset; |
18 | char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; | 17 | char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; |
diff --git a/include/linux/netfilter/xt_tcpudp.h b/include/linux/netfilter/xt_tcpudp.h index a490a0bc1d29..38aa7b399021 100644 --- a/include/linux/netfilter/xt_tcpudp.h +++ b/include/linux/netfilter/xt_tcpudp.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | /* TCP matching stuff */ | 6 | /* TCP matching stuff */ |
7 | struct xt_tcp | 7 | struct xt_tcp { |
8 | { | ||
9 | __u16 spts[2]; /* Source port range. */ | 8 | __u16 spts[2]; /* Source port range. */ |
10 | __u16 dpts[2]; /* Destination port range. */ | 9 | __u16 dpts[2]; /* Destination port range. */ |
11 | __u8 option; /* TCP Option iff non-zero*/ | 10 | __u8 option; /* TCP Option iff non-zero*/ |
@@ -22,8 +21,7 @@ struct xt_tcp | |||
22 | #define XT_TCP_INV_MASK 0x0F /* All possible flags. */ | 21 | #define XT_TCP_INV_MASK 0x0F /* All possible flags. */ |
23 | 22 | ||
24 | /* UDP matching stuff */ | 23 | /* UDP matching stuff */ |
25 | struct xt_udp | 24 | struct xt_udp { |
26 | { | ||
27 | __u16 spts[2]; /* Source port range. */ | 25 | __u16 spts[2]; /* Source port range. */ |
28 | __u16 dpts[2]; /* Destination port range. */ | 26 | __u16 dpts[2]; /* Destination port range. */ |
29 | __u8 invflags; /* Inverse flags */ | 27 | __u8 invflags; /* Inverse flags */ |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 6fe3e6aa10db..f2336523a9df 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -132,8 +132,7 @@ struct arpt_entry | |||
132 | #define ARPT_RETURN XT_RETURN | 132 | #define ARPT_RETURN XT_RETURN |
133 | 133 | ||
134 | /* The argument to ARPT_SO_GET_INFO */ | 134 | /* The argument to ARPT_SO_GET_INFO */ |
135 | struct arpt_getinfo | 135 | struct arpt_getinfo { |
136 | { | ||
137 | /* Which table: caller fills this in. */ | 136 | /* Which table: caller fills this in. */ |
138 | char name[ARPT_TABLE_MAXNAMELEN]; | 137 | char name[ARPT_TABLE_MAXNAMELEN]; |
139 | 138 | ||
@@ -155,8 +154,7 @@ struct arpt_getinfo | |||
155 | }; | 154 | }; |
156 | 155 | ||
157 | /* The argument to ARPT_SO_SET_REPLACE. */ | 156 | /* The argument to ARPT_SO_SET_REPLACE. */ |
158 | struct arpt_replace | 157 | struct arpt_replace { |
159 | { | ||
160 | /* Which table. */ | 158 | /* Which table. */ |
161 | char name[ARPT_TABLE_MAXNAMELEN]; | 159 | char name[ARPT_TABLE_MAXNAMELEN]; |
162 | 160 | ||
@@ -191,8 +189,7 @@ struct arpt_replace | |||
191 | #define arpt_counters xt_counters | 189 | #define arpt_counters xt_counters |
192 | 190 | ||
193 | /* The argument to ARPT_SO_GET_ENTRIES. */ | 191 | /* The argument to ARPT_SO_GET_ENTRIES. */ |
194 | struct arpt_get_entries | 192 | struct arpt_get_entries { |
195 | { | ||
196 | /* Which table: user fills this in. */ | 193 | /* Which table: user fills this in. */ |
197 | char name[ARPT_TABLE_MAXNAMELEN]; | 194 | char name[ARPT_TABLE_MAXNAMELEN]; |
198 | 195 | ||
@@ -224,20 +221,17 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e | |||
224 | #ifdef __KERNEL__ | 221 | #ifdef __KERNEL__ |
225 | 222 | ||
226 | /* Standard entry. */ | 223 | /* Standard entry. */ |
227 | struct arpt_standard | 224 | struct arpt_standard { |
228 | { | ||
229 | struct arpt_entry entry; | 225 | struct arpt_entry entry; |
230 | struct arpt_standard_target target; | 226 | struct arpt_standard_target target; |
231 | }; | 227 | }; |
232 | 228 | ||
233 | struct arpt_error_target | 229 | struct arpt_error_target { |
234 | { | ||
235 | struct arpt_entry_target target; | 230 | struct arpt_entry_target target; |
236 | char errorname[ARPT_FUNCTION_MAXNAMELEN]; | 231 | char errorname[ARPT_FUNCTION_MAXNAMELEN]; |
237 | }; | 232 | }; |
238 | 233 | ||
239 | struct arpt_error | 234 | struct arpt_error { |
240 | { | ||
241 | struct arpt_entry entry; | 235 | struct arpt_entry entry; |
242 | struct arpt_error_target target; | 236 | struct arpt_error_target target; |
243 | }; | 237 | }; |
@@ -279,8 +273,7 @@ extern unsigned int arpt_do_table(struct sk_buff *skb, | |||
279 | #ifdef CONFIG_COMPAT | 273 | #ifdef CONFIG_COMPAT |
280 | #include <net/compat.h> | 274 | #include <net/compat.h> |
281 | 275 | ||
282 | struct compat_arpt_entry | 276 | struct compat_arpt_entry { |
283 | { | ||
284 | struct arpt_arp arp; | 277 | struct arpt_arp arp; |
285 | u_int16_t target_offset; | 278 | u_int16_t target_offset; |
286 | u_int16_t next_offset; | 279 | u_int16_t next_offset; |
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h index a11b0c2017fd..c73ef0b18bdc 100644 --- a/include/linux/netfilter_bridge/ebt_802_3.h +++ b/include/linux/netfilter_bridge/ebt_802_3.h | |||
@@ -58,8 +58,7 @@ static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) | |||
58 | } | 58 | } |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | struct ebt_802_3_info | 61 | struct ebt_802_3_info { |
62 | { | ||
63 | uint8_t sap; | 62 | uint8_t sap; |
64 | __be16 type; | 63 | __be16 type; |
65 | uint8_t bitmask; | 64 | uint8_t bitmask; |
diff --git a/include/linux/netfilter_bridge/ebt_among.h b/include/linux/netfilter_bridge/ebt_among.h index 7654069233ca..0009558609a7 100644 --- a/include/linux/netfilter_bridge/ebt_among.h +++ b/include/linux/netfilter_bridge/ebt_among.h | |||
@@ -29,14 +29,12 @@ | |||
29 | * Yes, it is a memory overhead, but in 2003 AD, who cares? | 29 | * Yes, it is a memory overhead, but in 2003 AD, who cares? |
30 | */ | 30 | */ |
31 | 31 | ||
32 | struct ebt_mac_wormhash_tuple | 32 | struct ebt_mac_wormhash_tuple { |
33 | { | ||
34 | uint32_t cmp[2]; | 33 | uint32_t cmp[2]; |
35 | __be32 ip; | 34 | __be32 ip; |
36 | }; | 35 | }; |
37 | 36 | ||
38 | struct ebt_mac_wormhash | 37 | struct ebt_mac_wormhash { |
39 | { | ||
40 | int table[257]; | 38 | int table[257]; |
41 | int poolsize; | 39 | int poolsize; |
42 | struct ebt_mac_wormhash_tuple pool[0]; | 40 | struct ebt_mac_wormhash_tuple pool[0]; |
@@ -45,8 +43,7 @@ struct ebt_mac_wormhash | |||
45 | #define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \ | 43 | #define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \ |
46 | + (x)->poolsize * sizeof(struct ebt_mac_wormhash_tuple) : 0) | 44 | + (x)->poolsize * sizeof(struct ebt_mac_wormhash_tuple) : 0) |
47 | 45 | ||
48 | struct ebt_among_info | 46 | struct ebt_among_info { |
49 | { | ||
50 | int wh_dst_ofs; | 47 | int wh_dst_ofs; |
51 | int wh_src_ofs; | 48 | int wh_src_ofs; |
52 | int bitmask; | 49 | int bitmask; |
diff --git a/include/linux/netfilter_bridge/ebt_arpreply.h b/include/linux/netfilter_bridge/ebt_arpreply.h index 96a8339960e0..7e77896e1fbf 100644 --- a/include/linux/netfilter_bridge/ebt_arpreply.h +++ b/include/linux/netfilter_bridge/ebt_arpreply.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H | 1 | #ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H |
2 | #define __LINUX_BRIDGE_EBT_ARPREPLY_H | 2 | #define __LINUX_BRIDGE_EBT_ARPREPLY_H |
3 | 3 | ||
4 | struct ebt_arpreply_info | 4 | struct ebt_arpreply_info { |
5 | { | ||
6 | unsigned char mac[ETH_ALEN]; | 5 | unsigned char mac[ETH_ALEN]; |
7 | int target; | 6 | int target; |
8 | }; | 7 | }; |
diff --git a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h index d6847475bf2e..6a708fb92241 100644 --- a/include/linux/netfilter_bridge/ebt_ip.h +++ b/include/linux/netfilter_bridge/ebt_ip.h | |||
@@ -26,8 +26,7 @@ | |||
26 | #define EBT_IP_MATCH "ip" | 26 | #define EBT_IP_MATCH "ip" |
27 | 27 | ||
28 | /* the same values are used for the invflags */ | 28 | /* the same values are used for the invflags */ |
29 | struct ebt_ip_info | 29 | struct ebt_ip_info { |
30 | { | ||
31 | __be32 saddr; | 30 | __be32 saddr; |
32 | __be32 daddr; | 31 | __be32 daddr; |
33 | __be32 smsk; | 32 | __be32 smsk; |
diff --git a/include/linux/netfilter_bridge/ebt_ip6.h b/include/linux/netfilter_bridge/ebt_ip6.h index 2273c3ae33ca..e5de98701519 100644 --- a/include/linux/netfilter_bridge/ebt_ip6.h +++ b/include/linux/netfilter_bridge/ebt_ip6.h | |||
@@ -23,8 +23,7 @@ | |||
23 | #define EBT_IP6_MATCH "ip6" | 23 | #define EBT_IP6_MATCH "ip6" |
24 | 24 | ||
25 | /* the same values are used for the invflags */ | 25 | /* the same values are used for the invflags */ |
26 | struct ebt_ip6_info | 26 | struct ebt_ip6_info { |
27 | { | ||
28 | struct in6_addr saddr; | 27 | struct in6_addr saddr; |
29 | struct in6_addr daddr; | 28 | struct in6_addr daddr; |
30 | struct in6_addr smsk; | 29 | struct in6_addr smsk; |
diff --git a/include/linux/netfilter_bridge/ebt_limit.h b/include/linux/netfilter_bridge/ebt_limit.h index d8b65000afe4..4bf76b751676 100644 --- a/include/linux/netfilter_bridge/ebt_limit.h +++ b/include/linux/netfilter_bridge/ebt_limit.h | |||
@@ -9,8 +9,7 @@ | |||
9 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 | 9 | /* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 |
10 | seconds, or one every 59 hours. */ | 10 | seconds, or one every 59 hours. */ |
11 | 11 | ||
12 | struct ebt_limit_info | 12 | struct ebt_limit_info { |
13 | { | ||
14 | u_int32_t avg; /* Average secs between packets * scale */ | 13 | u_int32_t avg; /* Average secs between packets * scale */ |
15 | u_int32_t burst; /* Period multiplier for upper limit. */ | 14 | u_int32_t burst; /* Period multiplier for upper limit. */ |
16 | 15 | ||
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h index b76e653157e5..cc2cdfb764bc 100644 --- a/include/linux/netfilter_bridge/ebt_log.h +++ b/include/linux/netfilter_bridge/ebt_log.h | |||
@@ -9,8 +9,7 @@ | |||
9 | #define EBT_LOG_PREFIX_SIZE 30 | 9 | #define EBT_LOG_PREFIX_SIZE 30 |
10 | #define EBT_LOG_WATCHER "log" | 10 | #define EBT_LOG_WATCHER "log" |
11 | 11 | ||
12 | struct ebt_log_info | 12 | struct ebt_log_info { |
13 | { | ||
14 | uint8_t loglevel; | 13 | uint8_t loglevel; |
15 | uint8_t prefix[EBT_LOG_PREFIX_SIZE]; | 14 | uint8_t prefix[EBT_LOG_PREFIX_SIZE]; |
16 | uint32_t bitmask; | 15 | uint32_t bitmask; |
diff --git a/include/linux/netfilter_bridge/ebt_mark_m.h b/include/linux/netfilter_bridge/ebt_mark_m.h index 301524ff1065..9ceb10ec0ed6 100644 --- a/include/linux/netfilter_bridge/ebt_mark_m.h +++ b/include/linux/netfilter_bridge/ebt_mark_m.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #define EBT_MARK_AND 0x01 | 4 | #define EBT_MARK_AND 0x01 |
5 | #define EBT_MARK_OR 0x02 | 5 | #define EBT_MARK_OR 0x02 |
6 | #define EBT_MARK_MASK (EBT_MARK_AND | EBT_MARK_OR) | 6 | #define EBT_MARK_MASK (EBT_MARK_AND | EBT_MARK_OR) |
7 | struct ebt_mark_m_info | 7 | struct ebt_mark_m_info { |
8 | { | ||
9 | unsigned long mark, mask; | 8 | unsigned long mark, mask; |
10 | uint8_t invert; | 9 | uint8_t invert; |
11 | uint8_t bitmask; | 10 | uint8_t bitmask; |
diff --git a/include/linux/netfilter_bridge/ebt_mark_t.h b/include/linux/netfilter_bridge/ebt_mark_t.h index 6270f6f33693..7d5a268a4311 100644 --- a/include/linux/netfilter_bridge/ebt_mark_t.h +++ b/include/linux/netfilter_bridge/ebt_mark_t.h | |||
@@ -13,8 +13,7 @@ | |||
13 | #define MARK_AND_VALUE (0xffffffd0) | 13 | #define MARK_AND_VALUE (0xffffffd0) |
14 | #define MARK_XOR_VALUE (0xffffffc0) | 14 | #define MARK_XOR_VALUE (0xffffffc0) |
15 | 15 | ||
16 | struct ebt_mark_t_info | 16 | struct ebt_mark_t_info { |
17 | { | ||
18 | unsigned long mark; | 17 | unsigned long mark; |
19 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ | 18 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ |
20 | int target; | 19 | int target; |
diff --git a/include/linux/netfilter_bridge/ebt_nat.h b/include/linux/netfilter_bridge/ebt_nat.h index 435b886a51aa..5e74e3b03bd6 100644 --- a/include/linux/netfilter_bridge/ebt_nat.h +++ b/include/linux/netfilter_bridge/ebt_nat.h | |||
@@ -2,8 +2,7 @@ | |||
2 | #define __LINUX_BRIDGE_EBT_NAT_H | 2 | #define __LINUX_BRIDGE_EBT_NAT_H |
3 | 3 | ||
4 | #define NAT_ARP_BIT (0x00000010) | 4 | #define NAT_ARP_BIT (0x00000010) |
5 | struct ebt_nat_info | 5 | struct ebt_nat_info { |
6 | { | ||
7 | unsigned char mac[ETH_ALEN]; | 6 | unsigned char mac[ETH_ALEN]; |
8 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ | 7 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ |
9 | int target; | 8 | int target; |
diff --git a/include/linux/netfilter_bridge/ebt_pkttype.h b/include/linux/netfilter_bridge/ebt_pkttype.h index 0d64bbb29c66..51a799840931 100644 --- a/include/linux/netfilter_bridge/ebt_pkttype.h +++ b/include/linux/netfilter_bridge/ebt_pkttype.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H | 1 | #ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H |
2 | #define __LINUX_BRIDGE_EBT_PKTTYPE_H | 2 | #define __LINUX_BRIDGE_EBT_PKTTYPE_H |
3 | 3 | ||
4 | struct ebt_pkttype_info | 4 | struct ebt_pkttype_info { |
5 | { | ||
6 | uint8_t pkt_type; | 5 | uint8_t pkt_type; |
7 | uint8_t invert; | 6 | uint8_t invert; |
8 | }; | 7 | }; |
diff --git a/include/linux/netfilter_bridge/ebt_redirect.h b/include/linux/netfilter_bridge/ebt_redirect.h index 5c67990fce39..dd9622ce8488 100644 --- a/include/linux/netfilter_bridge/ebt_redirect.h +++ b/include/linux/netfilter_bridge/ebt_redirect.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __LINUX_BRIDGE_EBT_REDIRECT_H | 1 | #ifndef __LINUX_BRIDGE_EBT_REDIRECT_H |
2 | #define __LINUX_BRIDGE_EBT_REDIRECT_H | 2 | #define __LINUX_BRIDGE_EBT_REDIRECT_H |
3 | 3 | ||
4 | struct ebt_redirect_info | 4 | struct ebt_redirect_info { |
5 | { | ||
6 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ | 5 | /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ |
7 | int target; | 6 | int target; |
8 | }; | 7 | }; |
diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h index e5fd67850f4d..e503a0aa2728 100644 --- a/include/linux/netfilter_bridge/ebt_stp.h +++ b/include/linux/netfilter_bridge/ebt_stp.h | |||
@@ -20,8 +20,7 @@ | |||
20 | 20 | ||
21 | #define EBT_STP_MATCH "stp" | 21 | #define EBT_STP_MATCH "stp" |
22 | 22 | ||
23 | struct ebt_stp_config_info | 23 | struct ebt_stp_config_info { |
24 | { | ||
25 | uint8_t flags; | 24 | uint8_t flags; |
26 | uint16_t root_priol, root_priou; | 25 | uint16_t root_priol, root_priou; |
27 | char root_addr[6], root_addrmsk[6]; | 26 | char root_addr[6], root_addrmsk[6]; |
@@ -35,8 +34,7 @@ struct ebt_stp_config_info | |||
35 | uint16_t forward_delayl, forward_delayu; | 34 | uint16_t forward_delayl, forward_delayu; |
36 | }; | 35 | }; |
37 | 36 | ||
38 | struct ebt_stp_info | 37 | struct ebt_stp_info { |
39 | { | ||
40 | uint8_t type; | 38 | uint8_t type; |
41 | struct ebt_stp_config_info config; | 39 | struct ebt_stp_config_info config; |
42 | uint16_t bitmask; | 40 | uint16_t bitmask; |
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index ea281e6a2048..3cc40c131cc3 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -34,14 +34,12 @@ | |||
34 | struct xt_match; | 34 | struct xt_match; |
35 | struct xt_target; | 35 | struct xt_target; |
36 | 36 | ||
37 | struct ebt_counter | 37 | struct ebt_counter { |
38 | { | ||
39 | uint64_t pcnt; | 38 | uint64_t pcnt; |
40 | uint64_t bcnt; | 39 | uint64_t bcnt; |
41 | }; | 40 | }; |
42 | 41 | ||
43 | struct ebt_replace | 42 | struct ebt_replace { |
44 | { | ||
45 | char name[EBT_TABLE_MAXNAMELEN]; | 43 | char name[EBT_TABLE_MAXNAMELEN]; |
46 | unsigned int valid_hooks; | 44 | unsigned int valid_hooks; |
47 | /* nr of rules in the table */ | 45 | /* nr of rules in the table */ |
@@ -57,8 +55,7 @@ struct ebt_replace | |||
57 | char __user *entries; | 55 | char __user *entries; |
58 | }; | 56 | }; |
59 | 57 | ||
60 | struct ebt_replace_kernel | 58 | struct ebt_replace_kernel { |
61 | { | ||
62 | char name[EBT_TABLE_MAXNAMELEN]; | 59 | char name[EBT_TABLE_MAXNAMELEN]; |
63 | unsigned int valid_hooks; | 60 | unsigned int valid_hooks; |
64 | /* nr of rules in the table */ | 61 | /* nr of rules in the table */ |
@@ -120,8 +117,7 @@ struct ebt_entries { | |||
120 | #define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN \ | 117 | #define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN \ |
121 | | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST) | 118 | | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST) |
122 | 119 | ||
123 | struct ebt_entry_match | 120 | struct ebt_entry_match { |
124 | { | ||
125 | union { | 121 | union { |
126 | char name[EBT_FUNCTION_MAXNAMELEN]; | 122 | char name[EBT_FUNCTION_MAXNAMELEN]; |
127 | struct xt_match *match; | 123 | struct xt_match *match; |
@@ -131,8 +127,7 @@ struct ebt_entry_match | |||
131 | unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 127 | unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); |
132 | }; | 128 | }; |
133 | 129 | ||
134 | struct ebt_entry_watcher | 130 | struct ebt_entry_watcher { |
135 | { | ||
136 | union { | 131 | union { |
137 | char name[EBT_FUNCTION_MAXNAMELEN]; | 132 | char name[EBT_FUNCTION_MAXNAMELEN]; |
138 | struct xt_target *watcher; | 133 | struct xt_target *watcher; |
@@ -142,8 +137,7 @@ struct ebt_entry_watcher | |||
142 | unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); | 137 | unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); |
143 | }; | 138 | }; |
144 | 139 | ||
145 | struct ebt_entry_target | 140 | struct ebt_entry_target { |
146 | { | ||
147 | union { | 141 | union { |
148 | char name[EBT_FUNCTION_MAXNAMELEN]; | 142 | char name[EBT_FUNCTION_MAXNAMELEN]; |
149 | struct xt_target *target; | 143 | struct xt_target *target; |
@@ -154,8 +148,7 @@ struct ebt_entry_target | |||
154 | }; | 148 | }; |
155 | 149 | ||
156 | #define EBT_STANDARD_TARGET "standard" | 150 | #define EBT_STANDARD_TARGET "standard" |
157 | struct ebt_standard_target | 151 | struct ebt_standard_target { |
158 | { | ||
159 | struct ebt_entry_target target; | 152 | struct ebt_entry_target target; |
160 | int verdict; | 153 | int verdict; |
161 | }; | 154 | }; |
@@ -206,8 +199,7 @@ struct ebt_entry { | |||
206 | #define EBT_MATCH 0 | 199 | #define EBT_MATCH 0 |
207 | #define EBT_NOMATCH 1 | 200 | #define EBT_NOMATCH 1 |
208 | 201 | ||
209 | struct ebt_match | 202 | struct ebt_match { |
210 | { | ||
211 | struct list_head list; | 203 | struct list_head list; |
212 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 204 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
213 | bool (*match)(const struct sk_buff *skb, const struct net_device *in, | 205 | bool (*match)(const struct sk_buff *skb, const struct net_device *in, |
@@ -224,8 +216,7 @@ struct ebt_match | |||
224 | struct module *me; | 216 | struct module *me; |
225 | }; | 217 | }; |
226 | 218 | ||
227 | struct ebt_watcher | 219 | struct ebt_watcher { |
228 | { | ||
229 | struct list_head list; | 220 | struct list_head list; |
230 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 221 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
231 | unsigned int (*target)(struct sk_buff *skb, | 222 | unsigned int (*target)(struct sk_buff *skb, |
@@ -242,8 +233,7 @@ struct ebt_watcher | |||
242 | struct module *me; | 233 | struct module *me; |
243 | }; | 234 | }; |
244 | 235 | ||
245 | struct ebt_target | 236 | struct ebt_target { |
246 | { | ||
247 | struct list_head list; | 237 | struct list_head list; |
248 | const char name[EBT_FUNCTION_MAXNAMELEN]; | 238 | const char name[EBT_FUNCTION_MAXNAMELEN]; |
249 | /* returns one of the standard EBT_* verdicts */ | 239 | /* returns one of the standard EBT_* verdicts */ |
@@ -262,15 +252,13 @@ struct ebt_target | |||
262 | }; | 252 | }; |
263 | 253 | ||
264 | /* used for jumping from and into user defined chains (udc) */ | 254 | /* used for jumping from and into user defined chains (udc) */ |
265 | struct ebt_chainstack | 255 | struct ebt_chainstack { |
266 | { | ||
267 | struct ebt_entries *chaininfo; /* pointer to chain data */ | 256 | struct ebt_entries *chaininfo; /* pointer to chain data */ |
268 | struct ebt_entry *e; /* pointer to entry data */ | 257 | struct ebt_entry *e; /* pointer to entry data */ |
269 | unsigned int n; /* n'th entry */ | 258 | unsigned int n; /* n'th entry */ |
270 | }; | 259 | }; |
271 | 260 | ||
272 | struct ebt_table_info | 261 | struct ebt_table_info { |
273 | { | ||
274 | /* total size of the entries */ | 262 | /* total size of the entries */ |
275 | unsigned int entries_size; | 263 | unsigned int entries_size; |
276 | unsigned int nentries; | 264 | unsigned int nentries; |
@@ -282,8 +270,7 @@ struct ebt_table_info | |||
282 | struct ebt_counter counters[0] ____cacheline_aligned; | 270 | struct ebt_counter counters[0] ____cacheline_aligned; |
283 | }; | 271 | }; |
284 | 272 | ||
285 | struct ebt_table | 273 | struct ebt_table { |
286 | { | ||
287 | struct list_head list; | 274 | struct list_head list; |
288 | char name[EBT_TABLE_MAXNAMELEN]; | 275 | char name[EBT_TABLE_MAXNAMELEN]; |
289 | struct ebt_replace_kernel *table; | 276 | struct ebt_replace_kernel *table; |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 61fafc868a7b..27b3f5807305 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -76,8 +76,7 @@ struct ipt_ip { | |||
76 | /* This structure defines each of the firewall rules. Consists of 3 | 76 | /* This structure defines each of the firewall rules. Consists of 3 |
77 | parts which are 1) general IP header stuff 2) match specific | 77 | parts which are 1) general IP header stuff 2) match specific |
78 | stuff 3) the target to perform if the rule matches */ | 78 | stuff 3) the target to perform if the rule matches */ |
79 | struct ipt_entry | 79 | struct ipt_entry { |
80 | { | ||
81 | struct ipt_ip ip; | 80 | struct ipt_ip ip; |
82 | 81 | ||
83 | /* Mark with fields that we care about. */ | 82 | /* Mark with fields that we care about. */ |
@@ -135,8 +134,7 @@ struct ipt_entry | |||
135 | #define IPT_UDP_INV_MASK XT_UDP_INV_MASK | 134 | #define IPT_UDP_INV_MASK XT_UDP_INV_MASK |
136 | 135 | ||
137 | /* ICMP matching stuff */ | 136 | /* ICMP matching stuff */ |
138 | struct ipt_icmp | 137 | struct ipt_icmp { |
139 | { | ||
140 | u_int8_t type; /* type to match */ | 138 | u_int8_t type; /* type to match */ |
141 | u_int8_t code[2]; /* range of code */ | 139 | u_int8_t code[2]; /* range of code */ |
142 | u_int8_t invflags; /* Inverse flags */ | 140 | u_int8_t invflags; /* Inverse flags */ |
@@ -146,8 +144,7 @@ struct ipt_icmp | |||
146 | #define IPT_ICMP_INV 0x01 /* Invert the sense of type/code test */ | 144 | #define IPT_ICMP_INV 0x01 /* Invert the sense of type/code test */ |
147 | 145 | ||
148 | /* The argument to IPT_SO_GET_INFO */ | 146 | /* The argument to IPT_SO_GET_INFO */ |
149 | struct ipt_getinfo | 147 | struct ipt_getinfo { |
150 | { | ||
151 | /* Which table: caller fills this in. */ | 148 | /* Which table: caller fills this in. */ |
152 | char name[IPT_TABLE_MAXNAMELEN]; | 149 | char name[IPT_TABLE_MAXNAMELEN]; |
153 | 150 | ||
@@ -169,8 +166,7 @@ struct ipt_getinfo | |||
169 | }; | 166 | }; |
170 | 167 | ||
171 | /* The argument to IPT_SO_SET_REPLACE. */ | 168 | /* The argument to IPT_SO_SET_REPLACE. */ |
172 | struct ipt_replace | 169 | struct ipt_replace { |
173 | { | ||
174 | /* Which table. */ | 170 | /* Which table. */ |
175 | char name[IPT_TABLE_MAXNAMELEN]; | 171 | char name[IPT_TABLE_MAXNAMELEN]; |
176 | 172 | ||
@@ -204,8 +200,7 @@ struct ipt_replace | |||
204 | #define ipt_counters_info xt_counters_info | 200 | #define ipt_counters_info xt_counters_info |
205 | 201 | ||
206 | /* The argument to IPT_SO_GET_ENTRIES. */ | 202 | /* The argument to IPT_SO_GET_ENTRIES. */ |
207 | struct ipt_get_entries | 203 | struct ipt_get_entries { |
208 | { | ||
209 | /* Which table: user fills this in. */ | 204 | /* Which table: user fills this in. */ |
210 | char name[IPT_TABLE_MAXNAMELEN]; | 205 | char name[IPT_TABLE_MAXNAMELEN]; |
211 | 206 | ||
@@ -250,20 +245,17 @@ extern struct xt_table *ipt_register_table(struct net *net, | |||
250 | extern void ipt_unregister_table(struct xt_table *table); | 245 | extern void ipt_unregister_table(struct xt_table *table); |
251 | 246 | ||
252 | /* Standard entry. */ | 247 | /* Standard entry. */ |
253 | struct ipt_standard | 248 | struct ipt_standard { |
254 | { | ||
255 | struct ipt_entry entry; | 249 | struct ipt_entry entry; |
256 | struct ipt_standard_target target; | 250 | struct ipt_standard_target target; |
257 | }; | 251 | }; |
258 | 252 | ||
259 | struct ipt_error_target | 253 | struct ipt_error_target { |
260 | { | ||
261 | struct ipt_entry_target target; | 254 | struct ipt_entry_target target; |
262 | char errorname[IPT_FUNCTION_MAXNAMELEN]; | 255 | char errorname[IPT_FUNCTION_MAXNAMELEN]; |
263 | }; | 256 | }; |
264 | 257 | ||
265 | struct ipt_error | 258 | struct ipt_error { |
266 | { | ||
267 | struct ipt_entry entry; | 259 | struct ipt_entry entry; |
268 | struct ipt_error_target target; | 260 | struct ipt_error_target target; |
269 | }; | 261 | }; |
@@ -301,8 +293,7 @@ extern unsigned int ipt_do_table(struct sk_buff *skb, | |||
301 | #ifdef CONFIG_COMPAT | 293 | #ifdef CONFIG_COMPAT |
302 | #include <net/compat.h> | 294 | #include <net/compat.h> |
303 | 295 | ||
304 | struct compat_ipt_entry | 296 | struct compat_ipt_entry { |
305 | { | ||
306 | struct ipt_ip ip; | 297 | struct ipt_ip ip; |
307 | compat_uint_t nfcache; | 298 | compat_uint_t nfcache; |
308 | u_int16_t target_offset; | 299 | u_int16_t target_offset; |
diff --git a/include/linux/netfilter_ipv4/ipt_SAME.h b/include/linux/netfilter_ipv4/ipt_SAME.h index be6e682a85ec..2529660c5b38 100644 --- a/include/linux/netfilter_ipv4/ipt_SAME.h +++ b/include/linux/netfilter_ipv4/ipt_SAME.h | |||
@@ -5,8 +5,7 @@ | |||
5 | 5 | ||
6 | #define IPT_SAME_NODST 0x01 | 6 | #define IPT_SAME_NODST 0x01 |
7 | 7 | ||
8 | struct ipt_same_info | 8 | struct ipt_same_info { |
9 | { | ||
10 | unsigned char info; | 9 | unsigned char info; |
11 | u_int32_t rangesize; | 10 | u_int32_t rangesize; |
12 | u_int32_t ipnum; | 11 | u_int32_t ipnum; |
diff --git a/include/linux/netfilter_ipv4/ipt_ah.h b/include/linux/netfilter_ipv4/ipt_ah.h index 7b9a2ac7adb9..2e555b4d05e3 100644 --- a/include/linux/netfilter_ipv4/ipt_ah.h +++ b/include/linux/netfilter_ipv4/ipt_ah.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _IPT_AH_H | 1 | #ifndef _IPT_AH_H |
2 | #define _IPT_AH_H | 2 | #define _IPT_AH_H |
3 | 3 | ||
4 | struct ipt_ah | 4 | struct ipt_ah { |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | 5 | u_int32_t spis[2]; /* Security Parameter Index */ |
7 | u_int8_t invflags; /* Inverse flags */ | 6 | u_int8_t invflags; /* Inverse flags */ |
8 | }; | 7 | }; |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index a64e1451ac38..b31050d20ae4 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -88,8 +88,7 @@ struct ip6t_ip6 { | |||
88 | /* This structure defines each of the firewall rules. Consists of 3 | 88 | /* This structure defines each of the firewall rules. Consists of 3 |
89 | parts which are 1) general IP header stuff 2) match specific | 89 | parts which are 1) general IP header stuff 2) match specific |
90 | stuff 3) the target to perform if the rule matches */ | 90 | stuff 3) the target to perform if the rule matches */ |
91 | struct ip6t_entry | 91 | struct ip6t_entry { |
92 | { | ||
93 | struct ip6t_ip6 ipv6; | 92 | struct ip6t_ip6 ipv6; |
94 | 93 | ||
95 | /* Mark with fields that we care about. */ | 94 | /* Mark with fields that we care about. */ |
@@ -111,20 +110,17 @@ struct ip6t_entry | |||
111 | }; | 110 | }; |
112 | 111 | ||
113 | /* Standard entry */ | 112 | /* Standard entry */ |
114 | struct ip6t_standard | 113 | struct ip6t_standard { |
115 | { | ||
116 | struct ip6t_entry entry; | 114 | struct ip6t_entry entry; |
117 | struct ip6t_standard_target target; | 115 | struct ip6t_standard_target target; |
118 | }; | 116 | }; |
119 | 117 | ||
120 | struct ip6t_error_target | 118 | struct ip6t_error_target { |
121 | { | ||
122 | struct ip6t_entry_target target; | 119 | struct ip6t_entry_target target; |
123 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; | 120 | char errorname[IP6T_FUNCTION_MAXNAMELEN]; |
124 | }; | 121 | }; |
125 | 122 | ||
126 | struct ip6t_error | 123 | struct ip6t_error { |
127 | { | ||
128 | struct ip6t_entry entry; | 124 | struct ip6t_entry entry; |
129 | struct ip6t_error_target target; | 125 | struct ip6t_error_target target; |
130 | }; | 126 | }; |
@@ -195,8 +191,7 @@ struct ip6t_error | |||
195 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK | 191 | #define IP6T_UDP_INV_MASK XT_UDP_INV_MASK |
196 | 192 | ||
197 | /* ICMP matching stuff */ | 193 | /* ICMP matching stuff */ |
198 | struct ip6t_icmp | 194 | struct ip6t_icmp { |
199 | { | ||
200 | u_int8_t type; /* type to match */ | 195 | u_int8_t type; /* type to match */ |
201 | u_int8_t code[2]; /* range of code */ | 196 | u_int8_t code[2]; /* range of code */ |
202 | u_int8_t invflags; /* Inverse flags */ | 197 | u_int8_t invflags; /* Inverse flags */ |
@@ -206,8 +201,7 @@ struct ip6t_icmp | |||
206 | #define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */ | 201 | #define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */ |
207 | 202 | ||
208 | /* The argument to IP6T_SO_GET_INFO */ | 203 | /* The argument to IP6T_SO_GET_INFO */ |
209 | struct ip6t_getinfo | 204 | struct ip6t_getinfo { |
210 | { | ||
211 | /* Which table: caller fills this in. */ | 205 | /* Which table: caller fills this in. */ |
212 | char name[IP6T_TABLE_MAXNAMELEN]; | 206 | char name[IP6T_TABLE_MAXNAMELEN]; |
213 | 207 | ||
@@ -229,8 +223,7 @@ struct ip6t_getinfo | |||
229 | }; | 223 | }; |
230 | 224 | ||
231 | /* The argument to IP6T_SO_SET_REPLACE. */ | 225 | /* The argument to IP6T_SO_SET_REPLACE. */ |
232 | struct ip6t_replace | 226 | struct ip6t_replace { |
233 | { | ||
234 | /* Which table. */ | 227 | /* Which table. */ |
235 | char name[IP6T_TABLE_MAXNAMELEN]; | 228 | char name[IP6T_TABLE_MAXNAMELEN]; |
236 | 229 | ||
@@ -264,8 +257,7 @@ struct ip6t_replace | |||
264 | #define ip6t_counters_info xt_counters_info | 257 | #define ip6t_counters_info xt_counters_info |
265 | 258 | ||
266 | /* The argument to IP6T_SO_GET_ENTRIES. */ | 259 | /* The argument to IP6T_SO_GET_ENTRIES. */ |
267 | struct ip6t_get_entries | 260 | struct ip6t_get_entries { |
268 | { | ||
269 | /* Which table: user fills this in. */ | 261 | /* Which table: user fills this in. */ |
270 | char name[IP6T_TABLE_MAXNAMELEN]; | 262 | char name[IP6T_TABLE_MAXNAMELEN]; |
271 | 263 | ||
@@ -330,8 +322,7 @@ extern int ip6_masked_addrcmp(const struct in6_addr *addr1, | |||
330 | #ifdef CONFIG_COMPAT | 322 | #ifdef CONFIG_COMPAT |
331 | #include <net/compat.h> | 323 | #include <net/compat.h> |
332 | 324 | ||
333 | struct compat_ip6t_entry | 325 | struct compat_ip6t_entry { |
334 | { | ||
335 | struct ip6t_ip6 ipv6; | 326 | struct ip6t_ip6 ipv6; |
336 | compat_uint_t nfcache; | 327 | compat_uint_t nfcache; |
337 | u_int16_t target_offset; | 328 | u_int16_t target_offset; |
diff --git a/include/linux/netfilter_ipv6/ip6t_ah.h b/include/linux/netfilter_ipv6/ip6t_ah.h index 8531879eb464..17a745cfb2c7 100644 --- a/include/linux/netfilter_ipv6/ip6t_ah.h +++ b/include/linux/netfilter_ipv6/ip6t_ah.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _IP6T_AH_H | 1 | #ifndef _IP6T_AH_H |
2 | #define _IP6T_AH_H | 2 | #define _IP6T_AH_H |
3 | 3 | ||
4 | struct ip6t_ah | 4 | struct ip6t_ah { |
5 | { | ||
6 | u_int32_t spis[2]; /* Security Parameter Index */ | 5 | u_int32_t spis[2]; /* Security Parameter Index */ |
7 | u_int32_t hdrlen; /* Header Length */ | 6 | u_int32_t hdrlen; /* Header Length */ |
8 | u_int8_t hdrres; /* Test of the Reserved Filed */ | 7 | u_int8_t hdrres; /* Test of the Reserved Filed */ |
diff --git a/include/linux/netfilter_ipv6/ip6t_frag.h b/include/linux/netfilter_ipv6/ip6t_frag.h index 66070a0d6dfc..3724d0850920 100644 --- a/include/linux/netfilter_ipv6/ip6t_frag.h +++ b/include/linux/netfilter_ipv6/ip6t_frag.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _IP6T_FRAG_H | 1 | #ifndef _IP6T_FRAG_H |
2 | #define _IP6T_FRAG_H | 2 | #define _IP6T_FRAG_H |
3 | 3 | ||
4 | struct ip6t_frag | 4 | struct ip6t_frag { |
5 | { | ||
6 | u_int32_t ids[2]; /* Security Parameter Index */ | 5 | u_int32_t ids[2]; /* Security Parameter Index */ |
7 | u_int32_t hdrlen; /* Header Length */ | 6 | u_int32_t hdrlen; /* Header Length */ |
8 | u_int8_t flags; /* */ | 7 | u_int8_t flags; /* */ |
diff --git a/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/include/linux/netfilter_ipv6/ip6t_ipv6header.h index 51c53fc9c44a..01dfd445596a 100644 --- a/include/linux/netfilter_ipv6/ip6t_ipv6header.h +++ b/include/linux/netfilter_ipv6/ip6t_ipv6header.h | |||
@@ -8,8 +8,7 @@ on whether they contain certain headers */ | |||
8 | #ifndef __IPV6HEADER_H | 8 | #ifndef __IPV6HEADER_H |
9 | #define __IPV6HEADER_H | 9 | #define __IPV6HEADER_H |
10 | 10 | ||
11 | struct ip6t_ipv6header_info | 11 | struct ip6t_ipv6header_info { |
12 | { | ||
13 | u_int8_t matchflags; | 12 | u_int8_t matchflags; |
14 | u_int8_t invflags; | 13 | u_int8_t invflags; |
15 | u_int8_t modeflag; | 14 | u_int8_t modeflag; |
diff --git a/include/linux/netfilter_ipv6/ip6t_mh.h b/include/linux/netfilter_ipv6/ip6t_mh.h index b9ca9a5f74d0..18549bca2d1f 100644 --- a/include/linux/netfilter_ipv6/ip6t_mh.h +++ b/include/linux/netfilter_ipv6/ip6t_mh.h | |||
@@ -2,8 +2,7 @@ | |||
2 | #define _IP6T_MH_H | 2 | #define _IP6T_MH_H |
3 | 3 | ||
4 | /* MH matching stuff */ | 4 | /* MH matching stuff */ |
5 | struct ip6t_mh | 5 | struct ip6t_mh { |
6 | { | ||
7 | u_int8_t types[2]; /* MH type range */ | 6 | u_int8_t types[2]; /* MH type range */ |
8 | u_int8_t invflags; /* Inverse flags */ | 7 | u_int8_t invflags; /* Inverse flags */ |
9 | }; | 8 | }; |
diff --git a/include/linux/netfilter_ipv6/ip6t_opts.h b/include/linux/netfilter_ipv6/ip6t_opts.h index a07e36380ae8..62d89bcd9f9c 100644 --- a/include/linux/netfilter_ipv6/ip6t_opts.h +++ b/include/linux/netfilter_ipv6/ip6t_opts.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #define IP6T_OPTS_OPTSNR 16 | 4 | #define IP6T_OPTS_OPTSNR 16 |
5 | 5 | ||
6 | struct ip6t_opts | 6 | struct ip6t_opts { |
7 | { | ||
8 | u_int32_t hdrlen; /* Header Length */ | 7 | u_int32_t hdrlen; /* Header Length */ |
9 | u_int8_t flags; /* */ | 8 | u_int8_t flags; /* */ |
10 | u_int8_t invflags; /* Inverse flags */ | 9 | u_int8_t invflags; /* Inverse flags */ |
diff --git a/include/linux/netfilter_ipv6/ip6t_rt.h b/include/linux/netfilter_ipv6/ip6t_rt.h index 52156023e8db..ab91bfd2cd00 100644 --- a/include/linux/netfilter_ipv6/ip6t_rt.h +++ b/include/linux/netfilter_ipv6/ip6t_rt.h | |||
@@ -5,8 +5,7 @@ | |||
5 | 5 | ||
6 | #define IP6T_RT_HOPS 16 | 6 | #define IP6T_RT_HOPS 16 |
7 | 7 | ||
8 | struct ip6t_rt | 8 | struct ip6t_rt { |
9 | { | ||
10 | u_int32_t rt_type; /* Routing Type */ | 9 | u_int32_t rt_type; /* Routing Type */ |
11 | u_int32_t segsleft[2]; /* Segments Left */ | 10 | u_int32_t segsleft[2]; /* Segments Left */ |
12 | u_int32_t hdrlen; /* Header Length */ | 11 | u_int32_t hdrlen; /* Header Length */ |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index ab5d3126831f..fde27c017326 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -29,16 +29,14 @@ | |||
29 | 29 | ||
30 | struct net; | 30 | struct net; |
31 | 31 | ||
32 | struct sockaddr_nl | 32 | struct sockaddr_nl { |
33 | { | ||
34 | sa_family_t nl_family; /* AF_NETLINK */ | 33 | sa_family_t nl_family; /* AF_NETLINK */ |
35 | unsigned short nl_pad; /* zero */ | 34 | unsigned short nl_pad; /* zero */ |
36 | __u32 nl_pid; /* port ID */ | 35 | __u32 nl_pid; /* port ID */ |
37 | __u32 nl_groups; /* multicast groups mask */ | 36 | __u32 nl_groups; /* multicast groups mask */ |
38 | }; | 37 | }; |
39 | 38 | ||
40 | struct nlmsghdr | 39 | struct nlmsghdr { |
41 | { | ||
42 | __u32 nlmsg_len; /* Length of message including header */ | 40 | __u32 nlmsg_len; /* Length of message including header */ |
43 | __u16 nlmsg_type; /* Message content */ | 41 | __u16 nlmsg_type; /* Message content */ |
44 | __u16 nlmsg_flags; /* Additional flags */ | 42 | __u16 nlmsg_flags; /* Additional flags */ |
@@ -94,8 +92,7 @@ struct nlmsghdr | |||
94 | 92 | ||
95 | #define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */ | 93 | #define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */ |
96 | 94 | ||
97 | struct nlmsgerr | 95 | struct nlmsgerr { |
98 | { | ||
99 | int error; | 96 | int error; |
100 | struct nlmsghdr msg; | 97 | struct nlmsghdr msg; |
101 | }; | 98 | }; |
@@ -106,8 +103,7 @@ struct nlmsgerr | |||
106 | #define NETLINK_BROADCAST_ERROR 4 | 103 | #define NETLINK_BROADCAST_ERROR 4 |
107 | #define NETLINK_NO_ENOBUFS 5 | 104 | #define NETLINK_NO_ENOBUFS 5 |
108 | 105 | ||
109 | struct nl_pktinfo | 106 | struct nl_pktinfo { |
110 | { | ||
111 | __u32 group; | 107 | __u32 group; |
112 | }; | 108 | }; |
113 | 109 | ||
@@ -127,8 +123,7 @@ enum { | |||
127 | * <-------------- nlattr->nla_len --------------> | 123 | * <-------------- nlattr->nla_len --------------> |
128 | */ | 124 | */ |
129 | 125 | ||
130 | struct nlattr | 126 | struct nlattr { |
131 | { | ||
132 | __u16 nla_len; | 127 | __u16 nla_len; |
133 | __u16 nla_type; | 128 | __u16 nla_type; |
134 | }; | 129 | }; |
@@ -161,8 +156,7 @@ static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) | |||
161 | return (struct nlmsghdr *)skb->data; | 156 | return (struct nlmsghdr *)skb->data; |
162 | } | 157 | } |
163 | 158 | ||
164 | struct netlink_skb_parms | 159 | struct netlink_skb_parms { |
165 | { | ||
166 | struct ucred creds; /* Skb credentials */ | 160 | struct ucred creds; /* Skb credentials */ |
167 | __u32 pid; | 161 | __u32 pid; |
168 | __u32 dst_group; | 162 | __u32 dst_group; |
@@ -220,8 +214,7 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | |||
220 | #define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) | 214 | #define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) |
221 | 215 | ||
222 | 216 | ||
223 | struct netlink_callback | 217 | struct netlink_callback { |
224 | { | ||
225 | struct sk_buff *skb; | 218 | struct sk_buff *skb; |
226 | const struct nlmsghdr *nlh; | 219 | const struct nlmsghdr *nlh; |
227 | int (*dump)(struct sk_buff * skb, | 220 | int (*dump)(struct sk_buff * skb, |
@@ -231,8 +224,7 @@ struct netlink_callback | |||
231 | long args[6]; | 224 | long args[6]; |
232 | }; | 225 | }; |
233 | 226 | ||
234 | struct netlink_notify | 227 | struct netlink_notify { |
235 | { | ||
236 | struct net *net; | 228 | struct net *net; |
237 | int pid; | 229 | int pid; |
238 | int protocol; | 230 | int protocol; |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 3c842edff388..7f6ba8658abe 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -75,8 +75,7 @@ bits 9,10,11: redirect counter - redirect TTL. Loop avoidance | |||
75 | #define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) | 75 | #define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) |
76 | 76 | ||
77 | /* Action attributes */ | 77 | /* Action attributes */ |
78 | enum | 78 | enum { |
79 | { | ||
80 | TCA_ACT_UNSPEC, | 79 | TCA_ACT_UNSPEC, |
81 | TCA_ACT_KIND, | 80 | TCA_ACT_KIND, |
82 | TCA_ACT_OPTIONS, | 81 | TCA_ACT_OPTIONS, |
@@ -108,8 +107,7 @@ enum | |||
108 | #define TC_ACT_JUMP 0x10000000 | 107 | #define TC_ACT_JUMP 0x10000000 |
109 | 108 | ||
110 | /* Action type identifiers*/ | 109 | /* Action type identifiers*/ |
111 | enum | 110 | enum { |
112 | { | ||
113 | TCA_ID_UNSPEC=0, | 111 | TCA_ID_UNSPEC=0, |
114 | TCA_ID_POLICE=1, | 112 | TCA_ID_POLICE=1, |
115 | /* other actions go here */ | 113 | /* other actions go here */ |
@@ -118,8 +116,7 @@ enum | |||
118 | 116 | ||
119 | #define TCA_ID_MAX __TCA_ID_MAX | 117 | #define TCA_ID_MAX __TCA_ID_MAX |
120 | 118 | ||
121 | struct tc_police | 119 | struct tc_police { |
122 | { | ||
123 | __u32 index; | 120 | __u32 index; |
124 | int action; | 121 | int action; |
125 | #define TC_POLICE_UNSPEC TC_ACT_UNSPEC | 122 | #define TC_POLICE_UNSPEC TC_ACT_UNSPEC |
@@ -138,15 +135,13 @@ struct tc_police | |||
138 | __u32 capab; | 135 | __u32 capab; |
139 | }; | 136 | }; |
140 | 137 | ||
141 | struct tcf_t | 138 | struct tcf_t { |
142 | { | ||
143 | __u64 install; | 139 | __u64 install; |
144 | __u64 lastuse; | 140 | __u64 lastuse; |
145 | __u64 expires; | 141 | __u64 expires; |
146 | }; | 142 | }; |
147 | 143 | ||
148 | struct tc_cnt | 144 | struct tc_cnt { |
149 | { | ||
150 | int refcnt; | 145 | int refcnt; |
151 | int bindcnt; | 146 | int bindcnt; |
152 | }; | 147 | }; |
@@ -158,8 +153,7 @@ struct tc_cnt | |||
158 | int refcnt; \ | 153 | int refcnt; \ |
159 | int bindcnt | 154 | int bindcnt |
160 | 155 | ||
161 | enum | 156 | enum { |
162 | { | ||
163 | TCA_POLICE_UNSPEC, | 157 | TCA_POLICE_UNSPEC, |
164 | TCA_POLICE_TBF, | 158 | TCA_POLICE_TBF, |
165 | TCA_POLICE_RATE, | 159 | TCA_POLICE_RATE, |
@@ -182,8 +176,7 @@ enum | |||
182 | #define TC_U32_UNSPEC 0 | 176 | #define TC_U32_UNSPEC 0 |
183 | #define TC_U32_ROOT (0xFFF00000) | 177 | #define TC_U32_ROOT (0xFFF00000) |
184 | 178 | ||
185 | enum | 179 | enum { |
186 | { | ||
187 | TCA_U32_UNSPEC, | 180 | TCA_U32_UNSPEC, |
188 | TCA_U32_CLASSID, | 181 | TCA_U32_CLASSID, |
189 | TCA_U32_HASH, | 182 | TCA_U32_HASH, |
@@ -200,16 +193,14 @@ enum | |||
200 | 193 | ||
201 | #define TCA_U32_MAX (__TCA_U32_MAX - 1) | 194 | #define TCA_U32_MAX (__TCA_U32_MAX - 1) |
202 | 195 | ||
203 | struct tc_u32_key | 196 | struct tc_u32_key { |
204 | { | ||
205 | __be32 mask; | 197 | __be32 mask; |
206 | __be32 val; | 198 | __be32 val; |
207 | int off; | 199 | int off; |
208 | int offmask; | 200 | int offmask; |
209 | }; | 201 | }; |
210 | 202 | ||
211 | struct tc_u32_sel | 203 | struct tc_u32_sel { |
212 | { | ||
213 | unsigned char flags; | 204 | unsigned char flags; |
214 | unsigned char offshift; | 205 | unsigned char offshift; |
215 | unsigned char nkeys; | 206 | unsigned char nkeys; |
@@ -223,15 +214,13 @@ struct tc_u32_sel | |||
223 | struct tc_u32_key keys[0]; | 214 | struct tc_u32_key keys[0]; |
224 | }; | 215 | }; |
225 | 216 | ||
226 | struct tc_u32_mark | 217 | struct tc_u32_mark { |
227 | { | ||
228 | __u32 val; | 218 | __u32 val; |
229 | __u32 mask; | 219 | __u32 mask; |
230 | __u32 success; | 220 | __u32 success; |
231 | }; | 221 | }; |
232 | 222 | ||
233 | struct tc_u32_pcnt | 223 | struct tc_u32_pcnt { |
234 | { | ||
235 | __u64 rcnt; | 224 | __u64 rcnt; |
236 | __u64 rhit; | 225 | __u64 rhit; |
237 | __u64 kcnts[0]; | 226 | __u64 kcnts[0]; |
@@ -249,8 +238,7 @@ struct tc_u32_pcnt | |||
249 | 238 | ||
250 | /* RSVP filter */ | 239 | /* RSVP filter */ |
251 | 240 | ||
252 | enum | 241 | enum { |
253 | { | ||
254 | TCA_RSVP_UNSPEC, | 242 | TCA_RSVP_UNSPEC, |
255 | TCA_RSVP_CLASSID, | 243 | TCA_RSVP_CLASSID, |
256 | TCA_RSVP_DST, | 244 | TCA_RSVP_DST, |
@@ -263,15 +251,13 @@ enum | |||
263 | 251 | ||
264 | #define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) | 252 | #define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) |
265 | 253 | ||
266 | struct tc_rsvp_gpi | 254 | struct tc_rsvp_gpi { |
267 | { | ||
268 | __u32 key; | 255 | __u32 key; |
269 | __u32 mask; | 256 | __u32 mask; |
270 | int offset; | 257 | int offset; |
271 | }; | 258 | }; |
272 | 259 | ||
273 | struct tc_rsvp_pinfo | 260 | struct tc_rsvp_pinfo { |
274 | { | ||
275 | struct tc_rsvp_gpi dpi; | 261 | struct tc_rsvp_gpi dpi; |
276 | struct tc_rsvp_gpi spi; | 262 | struct tc_rsvp_gpi spi; |
277 | __u8 protocol; | 263 | __u8 protocol; |
@@ -282,8 +268,7 @@ struct tc_rsvp_pinfo | |||
282 | 268 | ||
283 | /* ROUTE filter */ | 269 | /* ROUTE filter */ |
284 | 270 | ||
285 | enum | 271 | enum { |
286 | { | ||
287 | TCA_ROUTE4_UNSPEC, | 272 | TCA_ROUTE4_UNSPEC, |
288 | TCA_ROUTE4_CLASSID, | 273 | TCA_ROUTE4_CLASSID, |
289 | TCA_ROUTE4_TO, | 274 | TCA_ROUTE4_TO, |
@@ -299,8 +284,7 @@ enum | |||
299 | 284 | ||
300 | /* FW filter */ | 285 | /* FW filter */ |
301 | 286 | ||
302 | enum | 287 | enum { |
303 | { | ||
304 | TCA_FW_UNSPEC, | 288 | TCA_FW_UNSPEC, |
305 | TCA_FW_CLASSID, | 289 | TCA_FW_CLASSID, |
306 | TCA_FW_POLICE, | 290 | TCA_FW_POLICE, |
@@ -314,8 +298,7 @@ enum | |||
314 | 298 | ||
315 | /* TC index filter */ | 299 | /* TC index filter */ |
316 | 300 | ||
317 | enum | 301 | enum { |
318 | { | ||
319 | TCA_TCINDEX_UNSPEC, | 302 | TCA_TCINDEX_UNSPEC, |
320 | TCA_TCINDEX_HASH, | 303 | TCA_TCINDEX_HASH, |
321 | TCA_TCINDEX_MASK, | 304 | TCA_TCINDEX_MASK, |
@@ -331,8 +314,7 @@ enum | |||
331 | 314 | ||
332 | /* Flow filter */ | 315 | /* Flow filter */ |
333 | 316 | ||
334 | enum | 317 | enum { |
335 | { | ||
336 | FLOW_KEY_SRC, | 318 | FLOW_KEY_SRC, |
337 | FLOW_KEY_DST, | 319 | FLOW_KEY_DST, |
338 | FLOW_KEY_PROTO, | 320 | FLOW_KEY_PROTO, |
@@ -355,14 +337,12 @@ enum | |||
355 | 337 | ||
356 | #define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1) | 338 | #define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1) |
357 | 339 | ||
358 | enum | 340 | enum { |
359 | { | ||
360 | FLOW_MODE_MAP, | 341 | FLOW_MODE_MAP, |
361 | FLOW_MODE_HASH, | 342 | FLOW_MODE_HASH, |
362 | }; | 343 | }; |
363 | 344 | ||
364 | enum | 345 | enum { |
365 | { | ||
366 | TCA_FLOW_UNSPEC, | 346 | TCA_FLOW_UNSPEC, |
367 | TCA_FLOW_KEYS, | 347 | TCA_FLOW_KEYS, |
368 | TCA_FLOW_MODE, | 348 | TCA_FLOW_MODE, |
@@ -383,8 +363,7 @@ enum | |||
383 | 363 | ||
384 | /* Basic filter */ | 364 | /* Basic filter */ |
385 | 365 | ||
386 | enum | 366 | enum { |
387 | { | ||
388 | TCA_BASIC_UNSPEC, | 367 | TCA_BASIC_UNSPEC, |
389 | TCA_BASIC_CLASSID, | 368 | TCA_BASIC_CLASSID, |
390 | TCA_BASIC_EMATCHES, | 369 | TCA_BASIC_EMATCHES, |
@@ -398,8 +377,7 @@ enum | |||
398 | 377 | ||
399 | /* Cgroup classifier */ | 378 | /* Cgroup classifier */ |
400 | 379 | ||
401 | enum | 380 | enum { |
402 | { | ||
403 | TCA_CGROUP_UNSPEC, | 381 | TCA_CGROUP_UNSPEC, |
404 | TCA_CGROUP_ACT, | 382 | TCA_CGROUP_ACT, |
405 | TCA_CGROUP_POLICE, | 383 | TCA_CGROUP_POLICE, |
@@ -411,14 +389,12 @@ enum | |||
411 | 389 | ||
412 | /* Extended Matches */ | 390 | /* Extended Matches */ |
413 | 391 | ||
414 | struct tcf_ematch_tree_hdr | 392 | struct tcf_ematch_tree_hdr { |
415 | { | ||
416 | __u16 nmatches; | 393 | __u16 nmatches; |
417 | __u16 progid; | 394 | __u16 progid; |
418 | }; | 395 | }; |
419 | 396 | ||
420 | enum | 397 | enum { |
421 | { | ||
422 | TCA_EMATCH_TREE_UNSPEC, | 398 | TCA_EMATCH_TREE_UNSPEC, |
423 | TCA_EMATCH_TREE_HDR, | 399 | TCA_EMATCH_TREE_HDR, |
424 | TCA_EMATCH_TREE_LIST, | 400 | TCA_EMATCH_TREE_LIST, |
@@ -426,8 +402,7 @@ enum | |||
426 | }; | 402 | }; |
427 | #define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) | 403 | #define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) |
428 | 404 | ||
429 | struct tcf_ematch_hdr | 405 | struct tcf_ematch_hdr { |
430 | { | ||
431 | __u16 matchid; | 406 | __u16 matchid; |
432 | __u16 kind; | 407 | __u16 kind; |
433 | __u16 flags; | 408 | __u16 flags; |
@@ -457,8 +432,7 @@ struct tcf_ematch_hdr | |||
457 | #define TCF_EM_REL_MASK 3 | 432 | #define TCF_EM_REL_MASK 3 |
458 | #define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) | 433 | #define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) |
459 | 434 | ||
460 | enum | 435 | enum { |
461 | { | ||
462 | TCF_LAYER_LINK, | 436 | TCF_LAYER_LINK, |
463 | TCF_LAYER_NETWORK, | 437 | TCF_LAYER_NETWORK, |
464 | TCF_LAYER_TRANSPORT, | 438 | TCF_LAYER_TRANSPORT, |
@@ -479,13 +453,11 @@ enum | |||
479 | #define TCF_EM_VLAN 6 | 453 | #define TCF_EM_VLAN 6 |
480 | #define TCF_EM_MAX 6 | 454 | #define TCF_EM_MAX 6 |
481 | 455 | ||
482 | enum | 456 | enum { |
483 | { | ||
484 | TCF_EM_PROG_TC | 457 | TCF_EM_PROG_TC |
485 | }; | 458 | }; |
486 | 459 | ||
487 | enum | 460 | enum { |
488 | { | ||
489 | TCF_EM_OPND_EQ, | 461 | TCF_EM_OPND_EQ, |
490 | TCF_EM_OPND_GT, | 462 | TCF_EM_OPND_GT, |
491 | TCF_EM_OPND_LT | 463 | TCF_EM_OPND_LT |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index d51a2b3e221e..2cfa4bc8dea6 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -29,8 +29,7 @@ | |||
29 | Particular schedulers may have also their private records. | 29 | Particular schedulers may have also their private records. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | struct tc_stats | 32 | struct tc_stats { |
33 | { | ||
34 | __u64 bytes; /* NUmber of enqueues bytes */ | 33 | __u64 bytes; /* NUmber of enqueues bytes */ |
35 | __u32 packets; /* Number of enqueued packets */ | 34 | __u32 packets; /* Number of enqueued packets */ |
36 | __u32 drops; /* Packets dropped because of lack of resources */ | 35 | __u32 drops; /* Packets dropped because of lack of resources */ |
@@ -42,8 +41,7 @@ struct tc_stats | |||
42 | __u32 backlog; | 41 | __u32 backlog; |
43 | }; | 42 | }; |
44 | 43 | ||
45 | struct tc_estimator | 44 | struct tc_estimator { |
46 | { | ||
47 | signed char interval; | 45 | signed char interval; |
48 | unsigned char ewma_log; | 46 | unsigned char ewma_log; |
49 | }; | 47 | }; |
@@ -75,8 +73,7 @@ struct tc_estimator | |||
75 | #define TC_H_ROOT (0xFFFFFFFFU) | 73 | #define TC_H_ROOT (0xFFFFFFFFU) |
76 | #define TC_H_INGRESS (0xFFFFFFF1U) | 74 | #define TC_H_INGRESS (0xFFFFFFF1U) |
77 | 75 | ||
78 | struct tc_ratespec | 76 | struct tc_ratespec { |
79 | { | ||
80 | unsigned char cell_log; | 77 | unsigned char cell_log; |
81 | unsigned char __reserved; | 78 | unsigned char __reserved; |
82 | unsigned short overhead; | 79 | unsigned short overhead; |
@@ -109,8 +106,7 @@ enum { | |||
109 | 106 | ||
110 | /* FIFO section */ | 107 | /* FIFO section */ |
111 | 108 | ||
112 | struct tc_fifo_qopt | 109 | struct tc_fifo_qopt { |
113 | { | ||
114 | __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ | 110 | __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ |
115 | }; | 111 | }; |
116 | 112 | ||
@@ -119,8 +115,7 @@ struct tc_fifo_qopt | |||
119 | #define TCQ_PRIO_BANDS 16 | 115 | #define TCQ_PRIO_BANDS 16 |
120 | #define TCQ_MIN_PRIO_BANDS 2 | 116 | #define TCQ_MIN_PRIO_BANDS 2 |
121 | 117 | ||
122 | struct tc_prio_qopt | 118 | struct tc_prio_qopt { |
123 | { | ||
124 | int bands; /* Number of bands */ | 119 | int bands; /* Number of bands */ |
125 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ | 120 | __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ |
126 | }; | 121 | }; |
@@ -134,8 +129,7 @@ struct tc_multiq_qopt { | |||
134 | 129 | ||
135 | /* TBF section */ | 130 | /* TBF section */ |
136 | 131 | ||
137 | struct tc_tbf_qopt | 132 | struct tc_tbf_qopt { |
138 | { | ||
139 | struct tc_ratespec rate; | 133 | struct tc_ratespec rate; |
140 | struct tc_ratespec peakrate; | 134 | struct tc_ratespec peakrate; |
141 | __u32 limit; | 135 | __u32 limit; |
@@ -143,8 +137,7 @@ struct tc_tbf_qopt | |||
143 | __u32 mtu; | 137 | __u32 mtu; |
144 | }; | 138 | }; |
145 | 139 | ||
146 | enum | 140 | enum { |
147 | { | ||
148 | TCA_TBF_UNSPEC, | 141 | TCA_TBF_UNSPEC, |
149 | TCA_TBF_PARMS, | 142 | TCA_TBF_PARMS, |
150 | TCA_TBF_RTAB, | 143 | TCA_TBF_RTAB, |
@@ -161,8 +154,7 @@ enum | |||
161 | 154 | ||
162 | /* SFQ section */ | 155 | /* SFQ section */ |
163 | 156 | ||
164 | struct tc_sfq_qopt | 157 | struct tc_sfq_qopt { |
165 | { | ||
166 | unsigned quantum; /* Bytes per round allocated to flow */ | 158 | unsigned quantum; /* Bytes per round allocated to flow */ |
167 | int perturb_period; /* Period of hash perturbation */ | 159 | int perturb_period; /* Period of hash perturbation */ |
168 | __u32 limit; /* Maximal packets in queue */ | 160 | __u32 limit; /* Maximal packets in queue */ |
@@ -170,8 +162,7 @@ struct tc_sfq_qopt | |||
170 | unsigned flows; /* Maximal number of flows */ | 162 | unsigned flows; /* Maximal number of flows */ |
171 | }; | 163 | }; |
172 | 164 | ||
173 | struct tc_sfq_xstats | 165 | struct tc_sfq_xstats { |
174 | { | ||
175 | __s32 allot; | 166 | __s32 allot; |
176 | }; | 167 | }; |
177 | 168 | ||
@@ -186,8 +177,7 @@ struct tc_sfq_xstats | |||
186 | 177 | ||
187 | /* RED section */ | 178 | /* RED section */ |
188 | 179 | ||
189 | enum | 180 | enum { |
190 | { | ||
191 | TCA_RED_UNSPEC, | 181 | TCA_RED_UNSPEC, |
192 | TCA_RED_PARMS, | 182 | TCA_RED_PARMS, |
193 | TCA_RED_STAB, | 183 | TCA_RED_STAB, |
@@ -196,8 +186,7 @@ enum | |||
196 | 186 | ||
197 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) | 187 | #define TCA_RED_MAX (__TCA_RED_MAX - 1) |
198 | 188 | ||
199 | struct tc_red_qopt | 189 | struct tc_red_qopt { |
200 | { | ||
201 | __u32 limit; /* HARD maximal queue length (bytes) */ | 190 | __u32 limit; /* HARD maximal queue length (bytes) */ |
202 | __u32 qth_min; /* Min average length threshold (bytes) */ | 191 | __u32 qth_min; /* Min average length threshold (bytes) */ |
203 | __u32 qth_max; /* Max average length threshold (bytes) */ | 192 | __u32 qth_max; /* Max average length threshold (bytes) */ |
@@ -209,8 +198,7 @@ struct tc_red_qopt | |||
209 | #define TC_RED_HARDDROP 2 | 198 | #define TC_RED_HARDDROP 2 |
210 | }; | 199 | }; |
211 | 200 | ||
212 | struct tc_red_xstats | 201 | struct tc_red_xstats { |
213 | { | ||
214 | __u32 early; /* Early drops */ | 202 | __u32 early; /* Early drops */ |
215 | __u32 pdrop; /* Drops due to queue limits */ | 203 | __u32 pdrop; /* Drops due to queue limits */ |
216 | __u32 other; /* Drops due to drop() calls */ | 204 | __u32 other; /* Drops due to drop() calls */ |
@@ -221,8 +209,7 @@ struct tc_red_xstats | |||
221 | 209 | ||
222 | #define MAX_DPs 16 | 210 | #define MAX_DPs 16 |
223 | 211 | ||
224 | enum | 212 | enum { |
225 | { | ||
226 | TCA_GRED_UNSPEC, | 213 | TCA_GRED_UNSPEC, |
227 | TCA_GRED_PARMS, | 214 | TCA_GRED_PARMS, |
228 | TCA_GRED_STAB, | 215 | TCA_GRED_STAB, |
@@ -232,8 +219,7 @@ enum | |||
232 | 219 | ||
233 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) | 220 | #define TCA_GRED_MAX (__TCA_GRED_MAX - 1) |
234 | 221 | ||
235 | struct tc_gred_qopt | 222 | struct tc_gred_qopt { |
236 | { | ||
237 | __u32 limit; /* HARD maximal queue length (bytes) */ | 223 | __u32 limit; /* HARD maximal queue length (bytes) */ |
238 | __u32 qth_min; /* Min average length threshold (bytes) */ | 224 | __u32 qth_min; /* Min average length threshold (bytes) */ |
239 | __u32 qth_max; /* Max average length threshold (bytes) */ | 225 | __u32 qth_max; /* Max average length threshold (bytes) */ |
@@ -253,8 +239,7 @@ struct tc_gred_qopt | |||
253 | }; | 239 | }; |
254 | 240 | ||
255 | /* gred setup */ | 241 | /* gred setup */ |
256 | struct tc_gred_sopt | 242 | struct tc_gred_sopt { |
257 | { | ||
258 | __u32 DPs; | 243 | __u32 DPs; |
259 | __u32 def_DP; | 244 | __u32 def_DP; |
260 | __u8 grio; | 245 | __u8 grio; |
@@ -267,8 +252,7 @@ struct tc_gred_sopt | |||
267 | #define TC_HTB_MAXDEPTH 8 | 252 | #define TC_HTB_MAXDEPTH 8 |
268 | #define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */ | 253 | #define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */ |
269 | 254 | ||
270 | struct tc_htb_opt | 255 | struct tc_htb_opt { |
271 | { | ||
272 | struct tc_ratespec rate; | 256 | struct tc_ratespec rate; |
273 | struct tc_ratespec ceil; | 257 | struct tc_ratespec ceil; |
274 | __u32 buffer; | 258 | __u32 buffer; |
@@ -277,8 +261,7 @@ struct tc_htb_opt | |||
277 | __u32 level; /* out only */ | 261 | __u32 level; /* out only */ |
278 | __u32 prio; | 262 | __u32 prio; |
279 | }; | 263 | }; |
280 | struct tc_htb_glob | 264 | struct tc_htb_glob { |
281 | { | ||
282 | __u32 version; /* to match HTB/TC */ | 265 | __u32 version; /* to match HTB/TC */ |
283 | __u32 rate2quantum; /* bps->quantum divisor */ | 266 | __u32 rate2quantum; /* bps->quantum divisor */ |
284 | __u32 defcls; /* default class number */ | 267 | __u32 defcls; /* default class number */ |
@@ -287,8 +270,7 @@ struct tc_htb_glob | |||
287 | /* stats */ | 270 | /* stats */ |
288 | __u32 direct_pkts; /* count of non shapped packets */ | 271 | __u32 direct_pkts; /* count of non shapped packets */ |
289 | }; | 272 | }; |
290 | enum | 273 | enum { |
291 | { | ||
292 | TCA_HTB_UNSPEC, | 274 | TCA_HTB_UNSPEC, |
293 | TCA_HTB_PARMS, | 275 | TCA_HTB_PARMS, |
294 | TCA_HTB_INIT, | 276 | TCA_HTB_INIT, |
@@ -299,8 +281,7 @@ enum | |||
299 | 281 | ||
300 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) | 282 | #define TCA_HTB_MAX (__TCA_HTB_MAX - 1) |
301 | 283 | ||
302 | struct tc_htb_xstats | 284 | struct tc_htb_xstats { |
303 | { | ||
304 | __u32 lends; | 285 | __u32 lends; |
305 | __u32 borrows; | 286 | __u32 borrows; |
306 | __u32 giants; /* too big packets (rate will not be accurate) */ | 287 | __u32 giants; /* too big packets (rate will not be accurate) */ |
@@ -310,28 +291,24 @@ struct tc_htb_xstats | |||
310 | 291 | ||
311 | /* HFSC section */ | 292 | /* HFSC section */ |
312 | 293 | ||
313 | struct tc_hfsc_qopt | 294 | struct tc_hfsc_qopt { |
314 | { | ||
315 | __u16 defcls; /* default class */ | 295 | __u16 defcls; /* default class */ |
316 | }; | 296 | }; |
317 | 297 | ||
318 | struct tc_service_curve | 298 | struct tc_service_curve { |
319 | { | ||
320 | __u32 m1; /* slope of the first segment in bps */ | 299 | __u32 m1; /* slope of the first segment in bps */ |
321 | __u32 d; /* x-projection of the first segment in us */ | 300 | __u32 d; /* x-projection of the first segment in us */ |
322 | __u32 m2; /* slope of the second segment in bps */ | 301 | __u32 m2; /* slope of the second segment in bps */ |
323 | }; | 302 | }; |
324 | 303 | ||
325 | struct tc_hfsc_stats | 304 | struct tc_hfsc_stats { |
326 | { | ||
327 | __u64 work; /* total work done */ | 305 | __u64 work; /* total work done */ |
328 | __u64 rtwork; /* work done by real-time criteria */ | 306 | __u64 rtwork; /* work done by real-time criteria */ |
329 | __u32 period; /* current period */ | 307 | __u32 period; /* current period */ |
330 | __u32 level; /* class level in hierarchy */ | 308 | __u32 level; /* class level in hierarchy */ |
331 | }; | 309 | }; |
332 | 310 | ||
333 | enum | 311 | enum { |
334 | { | ||
335 | TCA_HFSC_UNSPEC, | 312 | TCA_HFSC_UNSPEC, |
336 | TCA_HFSC_RSC, | 313 | TCA_HFSC_RSC, |
337 | TCA_HFSC_FSC, | 314 | TCA_HFSC_FSC, |
@@ -348,8 +325,7 @@ enum | |||
348 | #define TC_CBQ_MAXLEVEL 8 | 325 | #define TC_CBQ_MAXLEVEL 8 |
349 | #define TC_CBQ_DEF_EWMA 5 | 326 | #define TC_CBQ_DEF_EWMA 5 |
350 | 327 | ||
351 | struct tc_cbq_lssopt | 328 | struct tc_cbq_lssopt { |
352 | { | ||
353 | unsigned char change; | 329 | unsigned char change; |
354 | unsigned char flags; | 330 | unsigned char flags; |
355 | #define TCF_CBQ_LSS_BOUNDED 1 | 331 | #define TCF_CBQ_LSS_BOUNDED 1 |
@@ -368,8 +344,7 @@ struct tc_cbq_lssopt | |||
368 | __u32 avpkt; | 344 | __u32 avpkt; |
369 | }; | 345 | }; |
370 | 346 | ||
371 | struct tc_cbq_wrropt | 347 | struct tc_cbq_wrropt { |
372 | { | ||
373 | unsigned char flags; | 348 | unsigned char flags; |
374 | unsigned char priority; | 349 | unsigned char priority; |
375 | unsigned char cpriority; | 350 | unsigned char cpriority; |
@@ -378,8 +353,7 @@ struct tc_cbq_wrropt | |||
378 | __u32 weight; | 353 | __u32 weight; |
379 | }; | 354 | }; |
380 | 355 | ||
381 | struct tc_cbq_ovl | 356 | struct tc_cbq_ovl { |
382 | { | ||
383 | unsigned char strategy; | 357 | unsigned char strategy; |
384 | #define TC_CBQ_OVL_CLASSIC 0 | 358 | #define TC_CBQ_OVL_CLASSIC 0 |
385 | #define TC_CBQ_OVL_DELAY 1 | 359 | #define TC_CBQ_OVL_DELAY 1 |
@@ -391,30 +365,26 @@ struct tc_cbq_ovl | |||
391 | __u32 penalty; | 365 | __u32 penalty; |
392 | }; | 366 | }; |
393 | 367 | ||
394 | struct tc_cbq_police | 368 | struct tc_cbq_police { |
395 | { | ||
396 | unsigned char police; | 369 | unsigned char police; |
397 | unsigned char __res1; | 370 | unsigned char __res1; |
398 | unsigned short __res2; | 371 | unsigned short __res2; |
399 | }; | 372 | }; |
400 | 373 | ||
401 | struct tc_cbq_fopt | 374 | struct tc_cbq_fopt { |
402 | { | ||
403 | __u32 split; | 375 | __u32 split; |
404 | __u32 defmap; | 376 | __u32 defmap; |
405 | __u32 defchange; | 377 | __u32 defchange; |
406 | }; | 378 | }; |
407 | 379 | ||
408 | struct tc_cbq_xstats | 380 | struct tc_cbq_xstats { |
409 | { | ||
410 | __u32 borrows; | 381 | __u32 borrows; |
411 | __u32 overactions; | 382 | __u32 overactions; |
412 | __s32 avgidle; | 383 | __s32 avgidle; |
413 | __s32 undertime; | 384 | __s32 undertime; |
414 | }; | 385 | }; |
415 | 386 | ||
416 | enum | 387 | enum { |
417 | { | ||
418 | TCA_CBQ_UNSPEC, | 388 | TCA_CBQ_UNSPEC, |
419 | TCA_CBQ_LSSOPT, | 389 | TCA_CBQ_LSSOPT, |
420 | TCA_CBQ_WRROPT, | 390 | TCA_CBQ_WRROPT, |
@@ -459,8 +429,7 @@ enum { | |||
459 | 429 | ||
460 | /* Network emulator */ | 430 | /* Network emulator */ |
461 | 431 | ||
462 | enum | 432 | enum { |
463 | { | ||
464 | TCA_NETEM_UNSPEC, | 433 | TCA_NETEM_UNSPEC, |
465 | TCA_NETEM_CORR, | 434 | TCA_NETEM_CORR, |
466 | TCA_NETEM_DELAY_DIST, | 435 | TCA_NETEM_DELAY_DIST, |
@@ -471,8 +440,7 @@ enum | |||
471 | 440 | ||
472 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) | 441 | #define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) |
473 | 442 | ||
474 | struct tc_netem_qopt | 443 | struct tc_netem_qopt { |
475 | { | ||
476 | __u32 latency; /* added delay (us) */ | 444 | __u32 latency; /* added delay (us) */ |
477 | __u32 limit; /* fifo limit (packets) */ | 445 | __u32 limit; /* fifo limit (packets) */ |
478 | __u32 loss; /* random packet loss (0=none ~0=100%) */ | 446 | __u32 loss; /* random packet loss (0=none ~0=100%) */ |
@@ -481,21 +449,18 @@ struct tc_netem_qopt | |||
481 | __u32 jitter; /* random jitter in latency (us) */ | 449 | __u32 jitter; /* random jitter in latency (us) */ |
482 | }; | 450 | }; |
483 | 451 | ||
484 | struct tc_netem_corr | 452 | struct tc_netem_corr { |
485 | { | ||
486 | __u32 delay_corr; /* delay correlation */ | 453 | __u32 delay_corr; /* delay correlation */ |
487 | __u32 loss_corr; /* packet loss correlation */ | 454 | __u32 loss_corr; /* packet loss correlation */ |
488 | __u32 dup_corr; /* duplicate correlation */ | 455 | __u32 dup_corr; /* duplicate correlation */ |
489 | }; | 456 | }; |
490 | 457 | ||
491 | struct tc_netem_reorder | 458 | struct tc_netem_reorder { |
492 | { | ||
493 | __u32 probability; | 459 | __u32 probability; |
494 | __u32 correlation; | 460 | __u32 correlation; |
495 | }; | 461 | }; |
496 | 462 | ||
497 | struct tc_netem_corrupt | 463 | struct tc_netem_corrupt { |
498 | { | ||
499 | __u32 probability; | 464 | __u32 probability; |
500 | __u32 correlation; | 465 | __u32 correlation; |
501 | }; | 466 | }; |
@@ -504,8 +469,7 @@ struct tc_netem_corrupt | |||
504 | 469 | ||
505 | /* DRR */ | 470 | /* DRR */ |
506 | 471 | ||
507 | enum | 472 | enum { |
508 | { | ||
509 | TCA_DRR_UNSPEC, | 473 | TCA_DRR_UNSPEC, |
510 | TCA_DRR_QUANTUM, | 474 | TCA_DRR_QUANTUM, |
511 | __TCA_DRR_MAX | 475 | __TCA_DRR_MAX |
@@ -513,8 +477,7 @@ enum | |||
513 | 477 | ||
514 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) | 478 | #define TCA_DRR_MAX (__TCA_DRR_MAX - 1) |
515 | 479 | ||
516 | struct tc_drr_stats | 480 | struct tc_drr_stats { |
517 | { | ||
518 | __u32 deficit; | 481 | __u32 deficit; |
519 | }; | 482 | }; |
520 | 483 | ||
diff --git a/include/linux/route.h b/include/linux/route.h index f7ed35d5e653..6600708311c8 100644 --- a/include/linux/route.h +++ b/include/linux/route.h | |||
@@ -27,8 +27,7 @@ | |||
27 | #include <linux/compiler.h> | 27 | #include <linux/compiler.h> |
28 | 28 | ||
29 | /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ | 29 | /* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ |
30 | struct rtentry | 30 | struct rtentry { |
31 | { | ||
32 | unsigned long rt_pad1; | 31 | unsigned long rt_pad1; |
33 | struct sockaddr rt_dst; /* target address */ | 32 | struct sockaddr rt_dst; /* target address */ |
34 | struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ | 33 | struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ |
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; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0c68fbd6faac..d0448c5d1ffc 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -491,8 +491,7 @@ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | |||
491 | int len,int odd, struct sk_buff *skb), | 491 | int len,int odd, struct sk_buff *skb), |
492 | void *from, int length); | 492 | void *from, int length); |
493 | 493 | ||
494 | struct skb_seq_state | 494 | struct skb_seq_state { |
495 | { | ||
496 | __u32 lower_offset; | 495 | __u32 lower_offset; |
497 | __u32 upper_offset; | 496 | __u32 upper_offset; |
498 | __u32 frag_idx; | 497 | __u32 frag_idx; |
diff --git a/include/linux/tc_act/tc_defact.h b/include/linux/tc_act/tc_defact.h index 964f473af0f0..6f65d07c7ce2 100644 --- a/include/linux/tc_act/tc_defact.h +++ b/include/linux/tc_act/tc_defact.h | |||
@@ -3,13 +3,11 @@ | |||
3 | 3 | ||
4 | #include <linux/pkt_cls.h> | 4 | #include <linux/pkt_cls.h> |
5 | 5 | ||
6 | struct tc_defact | 6 | struct tc_defact { |
7 | { | ||
8 | tc_gen; | 7 | tc_gen; |
9 | }; | 8 | }; |
10 | 9 | ||
11 | enum | 10 | enum { |
12 | { | ||
13 | TCA_DEF_UNSPEC, | 11 | TCA_DEF_UNSPEC, |
14 | TCA_DEF_TM, | 12 | TCA_DEF_TM, |
15 | TCA_DEF_PARMS, | 13 | TCA_DEF_PARMS, |
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h index e895c0a39629..f7bf94eed510 100644 --- a/include/linux/tc_act/tc_gact.h +++ b/include/linux/tc_act/tc_gact.h | |||
@@ -5,14 +5,12 @@ | |||
5 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
6 | 6 | ||
7 | #define TCA_ACT_GACT 5 | 7 | #define TCA_ACT_GACT 5 |
8 | struct tc_gact | 8 | struct tc_gact { |
9 | { | ||
10 | tc_gen; | 9 | tc_gen; |
11 | 10 | ||
12 | }; | 11 | }; |
13 | 12 | ||
14 | struct tc_gact_p | 13 | struct tc_gact_p { |
15 | { | ||
16 | #define PGACT_NONE 0 | 14 | #define PGACT_NONE 0 |
17 | #define PGACT_NETRAND 1 | 15 | #define PGACT_NETRAND 1 |
18 | #define PGACT_DETERM 2 | 16 | #define PGACT_DETERM 2 |
@@ -22,8 +20,7 @@ struct tc_gact_p | |||
22 | int paction; | 20 | int paction; |
23 | }; | 21 | }; |
24 | 22 | ||
25 | enum | 23 | enum { |
26 | { | ||
27 | TCA_GACT_UNSPEC, | 24 | TCA_GACT_UNSPEC, |
28 | TCA_GACT_TM, | 25 | TCA_GACT_TM, |
29 | TCA_GACT_PARMS, | 26 | TCA_GACT_PARMS, |
diff --git a/include/linux/tc_act/tc_ipt.h b/include/linux/tc_act/tc_ipt.h index 4b6f7b6c7a79..a2335563d21f 100644 --- a/include/linux/tc_act/tc_ipt.h +++ b/include/linux/tc_act/tc_ipt.h | |||
@@ -5,8 +5,7 @@ | |||
5 | 5 | ||
6 | #define TCA_ACT_IPT 6 | 6 | #define TCA_ACT_IPT 6 |
7 | 7 | ||
8 | enum | 8 | enum { |
9 | { | ||
10 | TCA_IPT_UNSPEC, | 9 | TCA_IPT_UNSPEC, |
11 | TCA_IPT_TABLE, | 10 | TCA_IPT_TABLE, |
12 | TCA_IPT_HOOK, | 11 | TCA_IPT_HOOK, |
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h index 0a99ab60d610..7561750e8fd6 100644 --- a/include/linux/tc_act/tc_mirred.h +++ b/include/linux/tc_act/tc_mirred.h | |||
@@ -10,15 +10,13 @@ | |||
10 | #define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ | 10 | #define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ |
11 | #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ | 11 | #define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ |
12 | 12 | ||
13 | struct tc_mirred | 13 | struct tc_mirred { |
14 | { | ||
15 | tc_gen; | 14 | tc_gen; |
16 | int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ | 15 | int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ |
17 | __u32 ifindex; /* ifindex of egress port */ | 16 | __u32 ifindex; /* ifindex of egress port */ |
18 | }; | 17 | }; |
19 | 18 | ||
20 | enum | 19 | enum { |
21 | { | ||
22 | TCA_MIRRED_UNSPEC, | 20 | TCA_MIRRED_UNSPEC, |
23 | TCA_MIRRED_TM, | 21 | TCA_MIRRED_TM, |
24 | TCA_MIRRED_PARMS, | 22 | TCA_MIRRED_PARMS, |
diff --git a/include/linux/tc_act/tc_nat.h b/include/linux/tc_act/tc_nat.h index e7cf31e8ba79..6663aeba0b9a 100644 --- a/include/linux/tc_act/tc_nat.h +++ b/include/linux/tc_act/tc_nat.h | |||
@@ -6,8 +6,7 @@ | |||
6 | 6 | ||
7 | #define TCA_ACT_NAT 9 | 7 | #define TCA_ACT_NAT 9 |
8 | 8 | ||
9 | enum | 9 | enum { |
10 | { | ||
11 | TCA_NAT_UNSPEC, | 10 | TCA_NAT_UNSPEC, |
12 | TCA_NAT_PARMS, | 11 | TCA_NAT_PARMS, |
13 | TCA_NAT_TM, | 12 | TCA_NAT_TM, |
@@ -17,8 +16,7 @@ enum | |||
17 | 16 | ||
18 | #define TCA_NAT_FLAG_EGRESS 1 | 17 | #define TCA_NAT_FLAG_EGRESS 1 |
19 | 18 | ||
20 | struct tc_nat | 19 | struct tc_nat { |
21 | { | ||
22 | tc_gen; | 20 | tc_gen; |
23 | __be32 old_addr; | 21 | __be32 old_addr; |
24 | __be32 new_addr; | 22 | __be32 new_addr; |
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h index 54ce9064115a..716cfabcd5b2 100644 --- a/include/linux/tc_act/tc_pedit.h +++ b/include/linux/tc_act/tc_pedit.h | |||
@@ -6,8 +6,7 @@ | |||
6 | 6 | ||
7 | #define TCA_ACT_PEDIT 7 | 7 | #define TCA_ACT_PEDIT 7 |
8 | 8 | ||
9 | enum | 9 | enum { |
10 | { | ||
11 | TCA_PEDIT_UNSPEC, | 10 | TCA_PEDIT_UNSPEC, |
12 | TCA_PEDIT_TM, | 11 | TCA_PEDIT_TM, |
13 | TCA_PEDIT_PARMS, | 12 | TCA_PEDIT_PARMS, |
@@ -15,8 +14,7 @@ enum | |||
15 | }; | 14 | }; |
16 | #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1) | 15 | #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1) |
17 | 16 | ||
18 | struct tc_pedit_key | 17 | struct tc_pedit_key { |
19 | { | ||
20 | __u32 mask; /* AND */ | 18 | __u32 mask; /* AND */ |
21 | __u32 val; /*XOR */ | 19 | __u32 val; /*XOR */ |
22 | __u32 off; /*offset */ | 20 | __u32 off; /*offset */ |
@@ -25,8 +23,7 @@ struct tc_pedit_key | |||
25 | __u32 shift; | 23 | __u32 shift; |
26 | }; | 24 | }; |
27 | 25 | ||
28 | struct tc_pedit_sel | 26 | struct tc_pedit_sel { |
29 | { | ||
30 | tc_gen; | 27 | tc_gen; |
31 | unsigned char nkeys; | 28 | unsigned char nkeys; |
32 | unsigned char flags; | 29 | unsigned char flags; |
diff --git a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h index 38e7f7b25ec2..f34bb1bae083 100644 --- a/include/linux/tc_ematch/tc_em_cmp.h +++ b/include/linux/tc_ematch/tc_em_cmp.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
6 | 6 | ||
7 | struct tcf_em_cmp | 7 | struct tcf_em_cmp { |
8 | { | ||
9 | __u32 val; | 8 | __u32 val; |
10 | __u32 mask; | 9 | __u32 mask; |
11 | __u16 off; | 10 | __u16 off; |
@@ -15,8 +14,7 @@ struct tcf_em_cmp | |||
15 | __u8 opnd:4; | 14 | __u8 opnd:4; |
16 | }; | 15 | }; |
17 | 16 | ||
18 | enum | 17 | enum { |
19 | { | ||
20 | TCF_EM_ALIGN_U8 = 1, | 18 | TCF_EM_ALIGN_U8 = 1, |
21 | TCF_EM_ALIGN_U16 = 2, | 19 | TCF_EM_ALIGN_U16 = 2, |
22 | TCF_EM_ALIGN_U32 = 4 | 20 | TCF_EM_ALIGN_U32 = 4 |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index dcfb733fa1f6..0864206ec1a3 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
6 | 6 | ||
7 | enum | 7 | enum { |
8 | { | ||
9 | TCA_EM_META_UNSPEC, | 8 | TCA_EM_META_UNSPEC, |
10 | TCA_EM_META_HDR, | 9 | TCA_EM_META_HDR, |
11 | TCA_EM_META_LVALUE, | 10 | TCA_EM_META_LVALUE, |
@@ -14,8 +13,7 @@ enum | |||
14 | }; | 13 | }; |
15 | #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1) | 14 | #define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1) |
16 | 15 | ||
17 | struct tcf_meta_val | 16 | struct tcf_meta_val { |
18 | { | ||
19 | __u16 kind; | 17 | __u16 kind; |
20 | __u8 shift; | 18 | __u8 shift; |
21 | __u8 op; | 19 | __u8 op; |
@@ -26,16 +24,14 @@ struct tcf_meta_val | |||
26 | #define TCF_META_ID_MASK 0x7ff | 24 | #define TCF_META_ID_MASK 0x7ff |
27 | #define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK) | 25 | #define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK) |
28 | 26 | ||
29 | enum | 27 | enum { |
30 | { | ||
31 | TCF_META_TYPE_VAR, | 28 | TCF_META_TYPE_VAR, |
32 | TCF_META_TYPE_INT, | 29 | TCF_META_TYPE_INT, |
33 | __TCF_META_TYPE_MAX | 30 | __TCF_META_TYPE_MAX |
34 | }; | 31 | }; |
35 | #define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1) | 32 | #define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1) |
36 | 33 | ||
37 | enum | 34 | enum { |
38 | { | ||
39 | TCF_META_ID_VALUE, | 35 | TCF_META_ID_VALUE, |
40 | TCF_META_ID_RANDOM, | 36 | TCF_META_ID_RANDOM, |
41 | TCF_META_ID_LOADAVG_0, | 37 | TCF_META_ID_LOADAVG_0, |
@@ -87,8 +83,7 @@ enum | |||
87 | }; | 83 | }; |
88 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) | 84 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) |
89 | 85 | ||
90 | struct tcf_meta_hdr | 86 | struct tcf_meta_hdr { |
91 | { | ||
92 | struct tcf_meta_val left; | 87 | struct tcf_meta_val left; |
93 | struct tcf_meta_val right; | 88 | struct tcf_meta_val right; |
94 | }; | 89 | }; |
diff --git a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h index 9ed8c2e58488..7172cfb999c1 100644 --- a/include/linux/tc_ematch/tc_em_nbyte.h +++ b/include/linux/tc_ematch/tc_em_nbyte.h | |||
@@ -4,8 +4,7 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
6 | 6 | ||
7 | struct tcf_em_nbyte | 7 | struct tcf_em_nbyte { |
8 | { | ||
9 | __u16 off; | 8 | __u16 off; |
10 | __u16 len:12; | 9 | __u16 len:12; |
11 | __u8 layer:4; | 10 | __u8 layer:4; |
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h index d12a73a225fc..5aac4045ba88 100644 --- a/include/linux/tc_ematch/tc_em_text.h +++ b/include/linux/tc_ematch/tc_em_text.h | |||
@@ -6,8 +6,7 @@ | |||
6 | 6 | ||
7 | #define TC_EM_TEXT_ALGOSIZ 16 | 7 | #define TC_EM_TEXT_ALGOSIZ 16 |
8 | 8 | ||
9 | struct tcf_em_text | 9 | struct tcf_em_text { |
10 | { | ||
11 | char algo[TC_EM_TEXT_ALGOSIZ]; | 10 | char algo[TC_EM_TEXT_ALGOSIZ]; |
12 | __u16 from_offset; | 11 | __u16 from_offset; |
13 | __u16 to_offset; | 12 | __u16 to_offset; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 61723a7c21fe..eeecb8547a2a 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -102,8 +102,7 @@ enum { | |||
102 | #define TCPI_OPT_WSCALE 4 | 102 | #define TCPI_OPT_WSCALE 4 |
103 | #define TCPI_OPT_ECN 8 | 103 | #define TCPI_OPT_ECN 8 |
104 | 104 | ||
105 | enum tcp_ca_state | 105 | enum tcp_ca_state { |
106 | { | ||
107 | TCP_CA_Open = 0, | 106 | TCP_CA_Open = 0, |
108 | #define TCPF_CA_Open (1<<TCP_CA_Open) | 107 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
109 | TCP_CA_Disorder = 1, | 108 | TCP_CA_Disorder = 1, |
@@ -116,8 +115,7 @@ enum tcp_ca_state | |||
116 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) | 115 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
117 | }; | 116 | }; |
118 | 117 | ||
119 | struct tcp_info | 118 | struct tcp_info { |
120 | { | ||
121 | __u8 tcpi_state; | 119 | __u8 tcpi_state; |
122 | __u8 tcpi_ca_state; | 120 | __u8 tcpi_ca_state; |
123 | __u8 tcpi_retransmits; | 121 | __u8 tcpi_retransmits; |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 2d4ec15abaca..3246f0e66bcc 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -10,8 +10,7 @@ | |||
10 | /* Structure to encapsulate addresses. I do not want to use | 10 | /* Structure to encapsulate addresses. I do not want to use |
11 | * "standard" structure. My apologies. | 11 | * "standard" structure. My apologies. |
12 | */ | 12 | */ |
13 | typedef union | 13 | typedef union { |
14 | { | ||
15 | __be32 a4; | 14 | __be32 a4; |
16 | __be32 a6[4]; | 15 | __be32 a6[4]; |
17 | } xfrm_address_t; | 16 | } xfrm_address_t; |
@@ -20,8 +19,7 @@ typedef union | |||
20 | * the state by (spi,daddr,ah/esp) or to store information about | 19 | * the state by (spi,daddr,ah/esp) or to store information about |
21 | * spi, protocol and tunnel address on output. | 20 | * spi, protocol and tunnel address on output. |
22 | */ | 21 | */ |
23 | struct xfrm_id | 22 | struct xfrm_id { |
24 | { | ||
25 | xfrm_address_t daddr; | 23 | xfrm_address_t daddr; |
26 | __be32 spi; | 24 | __be32 spi; |
27 | __u8 proto; | 25 | __u8 proto; |
@@ -45,8 +43,7 @@ struct xfrm_sec_ctx { | |||
45 | 43 | ||
46 | /* Selector, used as selector both on policy rules (SPD) and SAs. */ | 44 | /* Selector, used as selector both on policy rules (SPD) and SAs. */ |
47 | 45 | ||
48 | struct xfrm_selector | 46 | struct xfrm_selector { |
49 | { | ||
50 | xfrm_address_t daddr; | 47 | xfrm_address_t daddr; |
51 | xfrm_address_t saddr; | 48 | xfrm_address_t saddr; |
52 | __be16 dport; | 49 | __be16 dport; |
@@ -63,8 +60,7 @@ struct xfrm_selector | |||
63 | 60 | ||
64 | #define XFRM_INF (~(__u64)0) | 61 | #define XFRM_INF (~(__u64)0) |
65 | 62 | ||
66 | struct xfrm_lifetime_cfg | 63 | struct xfrm_lifetime_cfg { |
67 | { | ||
68 | __u64 soft_byte_limit; | 64 | __u64 soft_byte_limit; |
69 | __u64 hard_byte_limit; | 65 | __u64 hard_byte_limit; |
70 | __u64 soft_packet_limit; | 66 | __u64 soft_packet_limit; |
@@ -75,16 +71,14 @@ struct xfrm_lifetime_cfg | |||
75 | __u64 hard_use_expires_seconds; | 71 | __u64 hard_use_expires_seconds; |
76 | }; | 72 | }; |
77 | 73 | ||
78 | struct xfrm_lifetime_cur | 74 | struct xfrm_lifetime_cur { |
79 | { | ||
80 | __u64 bytes; | 75 | __u64 bytes; |
81 | __u64 packets; | 76 | __u64 packets; |
82 | __u64 add_time; | 77 | __u64 add_time; |
83 | __u64 use_time; | 78 | __u64 use_time; |
84 | }; | 79 | }; |
85 | 80 | ||
86 | struct xfrm_replay_state | 81 | struct xfrm_replay_state { |
87 | { | ||
88 | __u32 oseq; | 82 | __u32 oseq; |
89 | __u32 seq; | 83 | __u32 seq; |
90 | __u32 bitmap; | 84 | __u32 bitmap; |
@@ -109,16 +103,14 @@ struct xfrm_stats { | |||
109 | __u32 integrity_failed; | 103 | __u32 integrity_failed; |
110 | }; | 104 | }; |
111 | 105 | ||
112 | enum | 106 | enum { |
113 | { | ||
114 | XFRM_POLICY_TYPE_MAIN = 0, | 107 | XFRM_POLICY_TYPE_MAIN = 0, |
115 | XFRM_POLICY_TYPE_SUB = 1, | 108 | XFRM_POLICY_TYPE_SUB = 1, |
116 | XFRM_POLICY_TYPE_MAX = 2, | 109 | XFRM_POLICY_TYPE_MAX = 2, |
117 | XFRM_POLICY_TYPE_ANY = 255 | 110 | XFRM_POLICY_TYPE_ANY = 255 |
118 | }; | 111 | }; |
119 | 112 | ||
120 | enum | 113 | enum { |
121 | { | ||
122 | XFRM_POLICY_IN = 0, | 114 | XFRM_POLICY_IN = 0, |
123 | XFRM_POLICY_OUT = 1, | 115 | XFRM_POLICY_OUT = 1, |
124 | XFRM_POLICY_FWD = 2, | 116 | XFRM_POLICY_FWD = 2, |
@@ -126,8 +118,7 @@ enum | |||
126 | XFRM_POLICY_MAX = 3 | 118 | XFRM_POLICY_MAX = 3 |
127 | }; | 119 | }; |
128 | 120 | ||
129 | enum | 121 | enum { |
130 | { | ||
131 | XFRM_SHARE_ANY, /* No limitations */ | 122 | XFRM_SHARE_ANY, /* No limitations */ |
132 | XFRM_SHARE_SESSION, /* For this session only */ | 123 | XFRM_SHARE_SESSION, /* For this session only */ |
133 | XFRM_SHARE_USER, /* For this user only */ | 124 | XFRM_SHARE_USER, /* For this user only */ |