Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Dumazet and committed by
David S. Miller
d94d9fee b8883a65

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