Commit 9f855299 authored by Al Viro's avatar Al Viro Committed by David S. Miller

[IPV4]: inet_diag annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 82103232
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
/* Socket identity */ /* Socket identity */
struct inet_diag_sockid { struct inet_diag_sockid {
__u16 idiag_sport; __be16 idiag_sport;
__u16 idiag_dport; __be16 idiag_dport;
__u32 idiag_src[4]; __be32 idiag_src[4];
__u32 idiag_dst[4]; __be32 idiag_dst[4];
__u32 idiag_if; __u32 idiag_if;
__u32 idiag_cookie[2]; __u32 idiag_cookie[2];
#define INET_DIAG_NOCOOKIE (~0U) #define INET_DIAG_NOCOOKIE (~0U)
...@@ -67,7 +67,7 @@ struct inet_diag_hostcond { ...@@ -67,7 +67,7 @@ struct inet_diag_hostcond {
__u8 family; __u8 family;
__u8 prefix_len; __u8 prefix_len;
int port; int port;
__u32 addr[0]; __be32 addr[0];
}; };
/* Base info structure. It contains socket identity (addrs/ports/cookie) /* Base info structure. It contains socket identity (addrs/ports/cookie)
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
static const struct inet_diag_handler **inet_diag_table; static const struct inet_diag_handler **inet_diag_table;
struct inet_diag_entry { struct inet_diag_entry {
u32 *saddr; __be32 *saddr;
u32 *daddr; __be32 *daddr;
u16 sport; u16 sport;
u16 dport; u16 dport;
u16 family; u16 family;
...@@ -294,7 +294,7 @@ static int inet_diag_get_exact(struct sk_buff *in_skb, ...@@ -294,7 +294,7 @@ static int inet_diag_get_exact(struct sk_buff *in_skb,
return err; return err;
} }
static int bitstring_match(const u32 *a1, const u32 *a2, int bits) static int bitstring_match(const __be32 *a1, const __be32 *a2, int bits)
{ {
int words = bits >> 5; int words = bits >> 5;
...@@ -305,8 +305,8 @@ static int bitstring_match(const u32 *a1, const u32 *a2, int bits) ...@@ -305,8 +305,8 @@ static int bitstring_match(const u32 *a1, const u32 *a2, int bits)
return 0; return 0;
} }
if (bits) { if (bits) {
__u32 w1, w2; __be32 w1, w2;
__u32 mask; __be32 mask;
w1 = a1[words]; w1 = a1[words];
w2 = a2[words]; w2 = a2[words];
...@@ -352,7 +352,7 @@ static int inet_diag_bc_run(const void *bc, int len, ...@@ -352,7 +352,7 @@ static int inet_diag_bc_run(const void *bc, int len,
case INET_DIAG_BC_S_COND: case INET_DIAG_BC_S_COND:
case INET_DIAG_BC_D_COND: { case INET_DIAG_BC_D_COND: {
struct inet_diag_hostcond *cond; struct inet_diag_hostcond *cond;
u32 *addr; __be32 *addr;
cond = (struct inet_diag_hostcond *)(op + 1); cond = (struct inet_diag_hostcond *)(op + 1);
if (cond->port != -1 && if (cond->port != -1 &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment