aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/timewait_sock.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-01-14 14:12:37 +0100
committerPatrick McHardy <kaber@trash.net>2011-01-14 14:12:37 +0100
commit0134e89c7bcc9fde1da962c82a120691e185619f (patch)
tree3e03335cf001019a2687d161e956de4f73379984 /include/net/timewait_sock.h
parentnetfilter: fix Kconfig dependencies (diff)
parentnetfilter: ebt_ip6: allow matching on ipv6-icmp types/codes (diff)
downloadlinux-dev-0134e89c7bcc9fde1da962c82a120691e185619f.tar.xz
linux-dev-0134e89c7bcc9fde1da962c82a120691e185619f.zip
Merge branch 'master' of git://1984.lsi.us.es/net-next-2.6
Conflicts: net/ipv4/route.c Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net/timewait_sock.h')
-rw-r--r--include/net/timewait_sock.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/timewait_sock.h b/include/net/timewait_sock.h
index 97c3b14da55d..053b3cf2c66a 100644
--- a/include/net/timewait_sock.h
+++ b/include/net/timewait_sock.h
@@ -21,6 +21,7 @@ struct timewait_sock_ops {
int (*twsk_unique)(struct sock *sk,
struct sock *sktw, void *twp);
void (*twsk_destructor)(struct sock *sk);
+ void *(*twsk_getpeer)(struct sock *sk);
};
static inline int twsk_unique(struct sock *sk, struct sock *sktw, void *twp)
@@ -39,4 +40,11 @@ static inline void twsk_destructor(struct sock *sk)
sk->sk_prot->twsk_prot->twsk_destructor(sk);
}
+static inline void *twsk_getpeer(struct sock *sk)
+{
+ if (sk->sk_prot->twsk_prot->twsk_getpeer)
+ return sk->sk_prot->twsk_prot->twsk_getpeer(sk);
+ return NULL;
+}
+
#endif /* _TIMEWAIT_SOCK_H */