timewait_sock: Create and use getpeer op.
The only thing AF-specific about remembering the timestamp for a time-wait TCP socket is getting the peer. Abstract that behind a new timewait_sock_ops vector. Support for real IPV6 sockets is not filled in yet, but curiously this makes timewait recycling start to work for v4-mapped ipv6 sockets. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -313,6 +313,7 @@ extern void tcp_shutdown (struct sock *sk, int how);
|
||||
extern int tcp_v4_rcv(struct sk_buff *skb);
|
||||
|
||||
extern struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it);
|
||||
extern void *tcp_v4_tw_get_peer(struct sock *sk);
|
||||
extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
|
||||
extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
|
||||
size_t size);
|
||||
|
Reference in New Issue
Block a user