Now that all of the infrastructure is in place, we can add
the ipv6 shorthand for peer creation.
Signed-off-by: David S. Miller <davem@davemloft.net>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/spinlock.h>
+#include <net/ipv6.h>
#include <asm/atomic.h>
typedef struct {
return inet_getpeer(&daddr, create);
}
+static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create)
+{
+ inet_peer_address_t daddr;
+
+ ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr);
+ daddr.family = AF_INET6;
+ return inet_getpeer(&daddr, create);
+}
+
/* can be called from BH context or outside */
extern void inet_putpeer(struct inet_peer *p);