diff options
author | David S. Miller <davem@davemloft.net> | 2010-11-30 14:54:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-30 14:54:19 -0500 |
commit | b534ecf1cd26f094497da6ae28a6ab64cdbe1617 (patch) | |
tree | bdf8a55183a38926b8f34f709cb51a4db2f5f6b8 /include | |
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')
-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 d7e60792d76e..834f0456c87e 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -50,7 +50,16 @@ struct inet_peer { | |||
50 | void inet_initpeers(void) __init; | 50 | void inet_initpeers(void) __init; |
51 | 51 | ||
52 | /* can be called with or without local BH being disabled */ | 52 | /* can be called with or without local BH being disabled */ |
53 | struct inet_peer *inet_getpeer(__be32 daddr, int create); | 53 | struct inet_peer *inet_getpeer(inet_peer_address_t *daddr, int create); |
54 | |||
55 | static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create) | ||
56 | { | ||
57 | inet_peer_address_t daddr; | ||
58 | |||
59 | daddr.a4 = v4daddr; | ||
60 | daddr.family = AF_INET; | ||
61 | return inet_getpeer(&daddr, create); | ||
62 | } | ||
54 | 63 | ||
55 | /* can be called from BH context or outside */ | 64 | /* can be called from BH context or outside */ |
56 | extern void inet_putpeer(struct inet_peer *p); | 65 | extern void inet_putpeer(struct inet_peer *p); |