[SK_BUFF]: Introduce tcp_hdr(), remove skb->h.th
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ab6a5bb6b2
commit
aa8223c7bb
@ -178,14 +178,19 @@ struct tcp_md5sig {
|
||||
#include <net/inet_connection_sock.h>
|
||||
#include <net/inet_timewait_sock.h>
|
||||
|
||||
static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
|
||||
{
|
||||
return (struct tcphdr *)skb->h.raw;
|
||||
}
|
||||
|
||||
static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
|
||||
{
|
||||
return skb->h.th->doff * 4;
|
||||
return tcp_hdr(skb)->doff * 4;
|
||||
}
|
||||
|
||||
static inline unsigned int tcp_optlen(const struct sk_buff *skb)
|
||||
{
|
||||
return (skb->h.th->doff - 5) * 4;
|
||||
return (tcp_hdr(skb)->doff - 5) * 4;
|
||||
}
|
||||
|
||||
/* This defines a selective acknowledgement block. */
|
||||
|
Reference in New Issue
Block a user