diff options
author | David S. Miller <davem@davemloft.net> | 2010-11-30 11:54:19 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-30 11:54:19 -0800 |
commit | b534ecf1cd26f094497da6ae28a6ab64cdbe1617 (patch) | |
tree | bdf8a55183a38926b8f34f709cb51a4db2f5f6b8 /include/net/inetpeer.h | |
parent | 582a72da9a41be9227dc931d728ae2906880a589 (diff) |
inetpeer: Make inet_getpeer() take an inet_peer_adress_t pointer.
And make an inet_getpeer_v4() helper, update callers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inetpeer.h')
-rw-r--r-- | include/net/inetpeer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index d7e60792d76..834f0456c87 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h @@ -50,7 +50,16 @@ struct inet_peer { void inet_initpeers(void) __init; /* can be called with or without local BH being disabled */ -struct inet_peer *inet_getpeer(__be32 daddr, int create); +struct inet_peer *inet_getpeer(inet_peer_address_t *daddr, int create); + +static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create) +{ + inet_peer_address_t daddr; + + daddr.a4 = v4daddr; + daddr.family = AF_INET; + return inet_getpeer(&daddr, create); +} /* can be called from BH context or outside */ extern void inet_putpeer(struct inet_peer *p); |