diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index c945fba4f543..c4132c1b63a8 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -132,6 +132,8 @@ struct net; | |||
132 | * @skc_rcv_saddr: Bound local IPv4 addr | 132 | * @skc_rcv_saddr: Bound local IPv4 addr |
133 | * @skc_hash: hash value used with various protocol lookup tables | 133 | * @skc_hash: hash value used with various protocol lookup tables |
134 | * @skc_u16hashes: two u16 hash values used by UDP lookup tables | 134 | * @skc_u16hashes: two u16 hash values used by UDP lookup tables |
135 | * @skc_dport: placeholder for inet_dport/tw_dport | ||
136 | * @skc_num: placeholder for inet_num/tw_num | ||
135 | * @skc_family: network address family | 137 | * @skc_family: network address family |
136 | * @skc_state: Connection state | 138 | * @skc_state: Connection state |
137 | * @skc_reuse: %SO_REUSEADDR setting | 139 | * @skc_reuse: %SO_REUSEADDR setting |
@@ -149,16 +151,29 @@ struct net; | |||
149 | * for struct sock and struct inet_timewait_sock. | 151 | * for struct sock and struct inet_timewait_sock. |
150 | */ | 152 | */ |
151 | struct sock_common { | 153 | struct sock_common { |
152 | /* skc_daddr and skc_rcv_saddr must be grouped : | 154 | /* skc_daddr and skc_rcv_saddr must be grouped on a 8 bytes aligned |
153 | * cf INET_MATCH() and INET_TW_MATCH() | 155 | * address on 64bit arches : cf INET_MATCH() and INET_TW_MATCH() |
154 | */ | 156 | */ |
155 | __be32 skc_daddr; | 157 | union { |
156 | __be32 skc_rcv_saddr; | 158 | unsigned long skc_addrpair; |
157 | 159 | struct { | |
160 | __be32 skc_daddr; | ||
161 | __be32 skc_rcv_saddr; | ||
162 | }; | ||
163 | }; | ||
158 | union { | 164 | union { |
159 | unsigned int skc_hash; | 165 | unsigned int skc_hash; |
160 | __u16 skc_u16hashes[2]; | 166 | __u16 skc_u16hashes[2]; |
161 | }; | 167 | }; |
168 | /* skc_dport && skc_num must be grouped as well */ | ||
169 | union { | ||
170 | u32 skc_portpair; | ||
171 | struct { | ||
172 | __be16 skc_dport; | ||
173 | __u16 skc_num; | ||
174 | }; | ||
175 | }; | ||
176 | |||
162 | unsigned short skc_family; | 177 | unsigned short skc_family; |
163 | volatile unsigned char skc_state; | 178 | volatile unsigned char skc_state; |
164 | unsigned char skc_reuse; | 179 | unsigned char skc_reuse; |