diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 21:44:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:02:29 -0400 |
commit | 9f8552996d969f56039ec88128cf5ad35b12f141 (patch) | |
tree | a17cf32c4e661e0fd2a674534f41e35d827debb8 | |
parent | 82103232edc4b4ed48949a195aca93cfa3fe3fa8 (diff) |
[IPV4]: inet_diag annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/inet_diag.h | 10 | ||||
-rw-r--r-- | net/ipv4/inet_diag.c | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index a4606e5810e5..6e8bc548635a 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
@@ -9,10 +9,10 @@ | |||
9 | 9 | ||
10 | /* Socket identity */ | 10 | /* Socket identity */ |
11 | struct inet_diag_sockid { | 11 | struct inet_diag_sockid { |
12 | __u16 idiag_sport; | 12 | __be16 idiag_sport; |
13 | __u16 idiag_dport; | 13 | __be16 idiag_dport; |
14 | __u32 idiag_src[4]; | 14 | __be32 idiag_src[4]; |
15 | __u32 idiag_dst[4]; | 15 | __be32 idiag_dst[4]; |
16 | __u32 idiag_if; | 16 | __u32 idiag_if; |
17 | __u32 idiag_cookie[2]; | 17 | __u32 idiag_cookie[2]; |
18 | #define INET_DIAG_NOCOOKIE (~0U) | 18 | #define INET_DIAG_NOCOOKIE (~0U) |
@@ -67,7 +67,7 @@ struct inet_diag_hostcond { | |||
67 | __u8 family; | 67 | __u8 family; |
68 | __u8 prefix_len; | 68 | __u8 prefix_len; |
69 | int port; | 69 | int port; |
70 | __u32 addr[0]; | 70 | __be32 addr[0]; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* Base info structure. It contains socket identity (addrs/ports/cookie) | 73 | /* Base info structure. It contains socket identity (addrs/ports/cookie) |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 492858e6faf0..77761ac4f7bb 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -36,8 +36,8 @@ | |||
36 | static const struct inet_diag_handler **inet_diag_table; | 36 | static const struct inet_diag_handler **inet_diag_table; |
37 | 37 | ||
38 | struct inet_diag_entry { | 38 | struct inet_diag_entry { |
39 | u32 *saddr; | 39 | __be32 *saddr; |
40 | u32 *daddr; | 40 | __be32 *daddr; |
41 | u16 sport; | 41 | u16 sport; |
42 | u16 dport; | 42 | u16 dport; |
43 | u16 family; | 43 | u16 family; |
@@ -294,7 +294,7 @@ out: | |||
294 | return err; | 294 | return err; |
295 | } | 295 | } |
296 | 296 | ||
297 | static int bitstring_match(const u32 *a1, const u32 *a2, int bits) | 297 | static int bitstring_match(const __be32 *a1, const __be32 *a2, int bits) |
298 | { | 298 | { |
299 | int words = bits >> 5; | 299 | int words = bits >> 5; |
300 | 300 | ||
@@ -305,8 +305,8 @@ static int bitstring_match(const u32 *a1, const u32 *a2, int bits) | |||
305 | return 0; | 305 | return 0; |
306 | } | 306 | } |
307 | if (bits) { | 307 | if (bits) { |
308 | __u32 w1, w2; | 308 | __be32 w1, w2; |
309 | __u32 mask; | 309 | __be32 mask; |
310 | 310 | ||
311 | w1 = a1[words]; | 311 | w1 = a1[words]; |
312 | w2 = a2[words]; | 312 | w2 = a2[words]; |
@@ -352,7 +352,7 @@ static int inet_diag_bc_run(const void *bc, int len, | |||
352 | case INET_DIAG_BC_S_COND: | 352 | case INET_DIAG_BC_S_COND: |
353 | case INET_DIAG_BC_D_COND: { | 353 | case INET_DIAG_BC_D_COND: { |
354 | struct inet_diag_hostcond *cond; | 354 | struct inet_diag_hostcond *cond; |
355 | u32 *addr; | 355 | __be32 *addr; |
356 | 356 | ||
357 | cond = (struct inet_diag_hostcond *)(op + 1); | 357 | cond = (struct inet_diag_hostcond *)(op + 1); |
358 | if (cond->port != -1 && | 358 | if (cond->port != -1 && |