[TWSK]: Introduce struct timewait_sock_ops

So that we can share several timewait sockets related functions and
make the timewait mini sockets infrastructure closer to the request
mini sockets one.

Next changesets will take advantage of this, moving more code out of
TCP and DCCP v4 and v6 to common infrastructure.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Arnaldo Carvalho de Melo 2005-12-13 23:25:19 -08:00 committed by David S. Miller
parent fc44b98053
commit 6d6ee43e0b
11 changed files with 118 additions and 63 deletions

View file

@ -360,7 +360,8 @@ struct tcp6_timewait_sock {
static inline u16 inet6_tw_offset(const struct proto *prot)
{
return prot->twsk_obj_size - sizeof(struct inet6_timewait_sock);
return prot->twsk_prot->twsk_obj_size -
sizeof(struct inet6_timewait_sock);
}
static inline struct inet6_timewait_sock *inet6_twsk(const struct sock *sk)