aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inetpeer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inetpeer.h')
-rw-r--r--include/net/inetpeer.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index fb8aeb1fd23f..5161bfdf5a52 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -14,18 +14,18 @@
14#include <net/ipv6.h> 14#include <net/ipv6.h>
15#include <asm/atomic.h> 15#include <asm/atomic.h>
16 16
17typedef struct { 17struct inetpeer_addr {
18 union { 18 union {
19 __be32 a4; 19 __be32 a4;
20 __be32 a6[4]; 20 __be32 a6[4];
21 }; 21 };
22 __u16 family; 22 __u16 family;
23} inet_peer_address_t; 23};
24 24
25struct inet_peer { 25struct inet_peer {
26 /* group together avl_left,avl_right,v4daddr to speedup lookups */ 26 /* group together avl_left,avl_right,v4daddr to speedup lookups */
27 struct inet_peer __rcu *avl_left, *avl_right; 27 struct inet_peer __rcu *avl_left, *avl_right;
28 inet_peer_address_t daddr; 28 struct inetpeer_addr daddr;
29 __u32 avl_height; 29 __u32 avl_height;
30 struct list_head unused; 30 struct list_head unused;
31 __u32 dtime; /* the time of last use of not 31 __u32 dtime; /* the time of last use of not
@@ -51,11 +51,11 @@ struct inet_peer {
51void inet_initpeers(void) __init; 51void inet_initpeers(void) __init;
52 52
53/* can be called with or without local BH being disabled */ 53/* can be called with or without local BH being disabled */
54struct inet_peer *inet_getpeer(inet_peer_address_t *daddr, int create); 54struct inet_peer *inet_getpeer(struct inetpeer_addr *daddr, int create);
55 55
56static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create) 56static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
57{ 57{
58 inet_peer_address_t daddr; 58 struct inetpeer_addr daddr;
59 59
60 daddr.a4 = v4daddr; 60 daddr.a4 = v4daddr;
61 daddr.family = AF_INET; 61 daddr.family = AF_INET;
@@ -64,7 +64,7 @@ static inline struct inet_peer *inet_getpeer_v4(__be32 v4daddr, int create)
64 64
65static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create) 65static inline struct inet_peer *inet_getpeer_v6(struct in6_addr *v6daddr, int create)
66{ 66{
67 inet_peer_address_t daddr; 67 struct inetpeer_addr daddr;
68 68
69 ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr); 69 ipv6_addr_copy((struct in6_addr *)daddr.a6, v6daddr);
70 daddr.family = AF_INET6; 70 daddr.family = AF_INET6;