summaryrefslogtreecommitdiffstats
path: root/include/net/inetpeer.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-11-30 11:54:19 -0800
committerDavid S. Miller <davem@davemloft.net>2010-11-30 11:54:19 -0800
commitb534ecf1cd26f094497da6ae28a6ab64cdbe1617 (patch)
treebdf8a55183a38926b8f34f709cb51a4db2f5f6b8 /include/net/inetpeer.h
parent582a72da9a41be9227dc931d728ae2906880a589 (diff)
downloadlinux-b534ecf1cd26f094497da6ae28a6ab64cdbe1617.tar.bz2
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.h11
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 {
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);