tcphdr
offsetof(struct tcphdr, th_sum);
offsetof(struct tcphdr, th_sum);
struct tcphdr *th;
th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2));
th = (struct tcphdr *)((caddr_t)ip6 + sizeof(struct ip6_hdr));
offset = hdrlen + offsetof(struct tcphdr, th_sum);
sizeof(struct tcphdr);
hdr->csum_offset = offsetof(struct tcphdr, th_sum);
ext->tcp = (struct tcphdr *)(mtod(m, caddr_t) + hoff);
struct tcphdr *th;
olen = (pd->hdr.tcp.th_off << 2) - sizeof(struct tcphdr);
optsoff = pd->off + sizeof(struct tcphdr);
struct tcphdr *th;
tlen = sizeof(struct tcphdr);
th = (struct tcphdr *)((caddr_t)h + sizeof(struct ip));
th = (struct tcphdr *)((caddr_t)h6 + sizeof(struct ip6_hdr));
olen = (pd->hdr.tcp.th_off << 2) - sizeof(struct tcphdr);
pd->off + sizeof(struct tcphdr), opts, olen, NULL, pd->af))
olen = (pd->hdr.tcp.th_off << 2) - sizeof(struct tcphdr);
pd->off + sizeof(struct tcphdr), opts, olen, NULL, pd->af))
mss = ifp->if_mtu - hlen - sizeof(struct tcphdr);
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
if (dst->seqdiff && (th->th_off << 2) > sizeof(struct tcphdr)) {
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd2.hdr.tcp;
(pd->proto == IPPROTO_TCP ? sizeof(struct tcphdr) :
struct tcphdr *th = &pd->hdr.tcp;
(th->th_off << 2) < sizeof(struct tcphdr)) {
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr *th = &pd->hdr.tcp;
olen = (pd->hdr.tcp.th_off << 2) - sizeof(struct tcphdr);
optsoff = pd->off + sizeof(struct tcphdr);
sizeof(struct tcphdr), &pd->hdr.tcp, M_NOWAIT);
return (pf_osfp_fingerprint_hdr(ip, ip6, (struct tcphdr *)hdr));
const struct tcphdr *tcp)
#define MTUOFF (sizeof(struct ip) + sizeof(struct tcphdr))
struct tcphdr *th = &pd->hdr.tcp;
struct tcphdr;
const struct tcphdr *);
struct tcphdr tcp;
#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr) - \
struct tcphdr *th;
lpktp = sizeof(struct ip) + sizeof(struct tcphdr) + PIPEX_TCP_OPTLEN;
if (sizeof(struct tcphdr) > lpktp)
th = (struct tcphdr *)pktp;
pktp += sizeof(struct tcphdr);
lpktp -= sizeof(struct tcphdr);
struct tcphdr *oth;
struct tcphdr *th;
th = (struct tcphdr *)&((int32_t *)ip)[hlen];
oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen];
struct tcphdr *th;
if (hlen + sizeof(struct tcphdr) > buflen)
hlen += ((struct tcphdr *)&((char *)ip)[hlen])->th_off << 2;
th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen];
struct tcphdr *tcp;
min_hdrlen = sizeof(struct tcphdr);
offset += offsetof(struct tcphdr, th_sum);
offset += offsetof(struct tcphdr, th_sum);
if (m->m_pkthdr.len < skip + sizeof(struct tcphdr)) {
m_copyback(m, skip + offsetof(struct tcphdr, th_sum),
m_copyback(m, skip + offsetof(struct tcphdr, th_sum),
struct tcphdr *th;
struct tcphdr ti_t; /* tcp header */
struct tcphdr ti6_t;
void tcp_sack_partialack(struct tcpcb *, struct tcphdr *);
void tcp_newreno_partialack(struct tcpcb *, struct tcphdr *);
struct tcphdr *, u_int);
int syn_cache_add(struct sockaddr *, struct sockaddr *, struct tcphdr *,
struct tcphdr *, unsigned int, unsigned int, struct socket *,
tcp_reass(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m, int *tlen)
tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th,
struct tcphdr *phdr = p->tcpqe_tcp;
tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
struct tcphdr *qhdr = q->tcpqe_tcp;
tcp_del_sackholes(struct tcpcb *tp, struct tcphdr *th)
tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th)
sizeof(struct tcphdr);
mss = rtmtu - iphlen - sizeof(struct tcphdr);
mss = ifp->if_mtu - iphlen - sizeof(struct tcphdr);
mss = ifp->if_mtu - iphlen - sizeof(struct tcphdr);
mss = ifp->if_mtu - iphlen - sizeof(struct tcphdr);
mssopt = ifp->if_mtu - iphlen - sizeof(struct tcphdr);
hlen += sizeof(struct tcphdr);
tcp_newreno_partialack(struct tcpcb *tp, struct tcphdr *th)
mss = ifp->if_mtu - iphlen - sizeof(struct tcphdr);
syn_cache_get(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th,
syn_cache_reset(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th,
struct tcphdr *th, u_int rtableid)
syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th,
struct tcphdr *th;
tlen = hlen + sizeof(struct tcphdr) + optlen;
struct tcphdr *th;
th = (struct tcphdr *)(ip + 1);
th = (struct tcphdr *)(ip6 + 1);
th->th_off = (sizeof(struct tcphdr) + optlen) >> 2;
if (ext->tcphlen > sizeof(struct tcphdr)) {
int optlen = ext->tcphlen - sizeof(struct tcphdr);
if (head->tcphlen > sizeof(struct tcphdr)) {
if (head->tcphlen > sizeof(struct tcphdr)) {
if (off < sizeof(struct tcphdr) || off > tlen) {
if (off > sizeof(struct tcphdr)) {
optlen = off - sizeof(struct tcphdr);
struct tcphdr *th;
if (tlen < iphlen + sizeof(struct tcphdr)) {
th = (struct tcphdr *)(mtod(m0, caddr_t) + iphlen);
struct tcphdr *mhth;
mhth = (struct tcphdr *)(mtod(m, caddr_t) + iphlen);
struct tcphdr *th;
hdrlen = sizeof(struct ip) + sizeof(struct tcphdr);
hdrlen = sizeof(struct ip6_hdr) + sizeof(struct tcphdr);
th = (struct tcphdr *)(mtod(m, caddr_t) + tp->t_template->m_len -
sizeof(struct tcphdr));
th->th_off = (sizeof (struct tcphdr) + optlen) >> 2;
tcp_signature(struct tdb *tdb, int af, struct mbuf *m, struct tcphdr *th,
struct tcphdr th0;
if (max_protohdr < (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)))
max_protohdr = (sizeof(struct ip6_hdr) + sizeof(struct tcphdr));
if ((max_linkhdr + sizeof(struct ip6_hdr) + sizeof(struct tcphdr)) >
struct tcphdr *th;
CTASSERT(sizeof(struct ip) + sizeof(struct tcphdr) <= MHLEN);
CTASSERT(sizeof(struct ip6_hdr) + sizeof(struct tcphdr) <= MHLEN);
m->m_len += sizeof (struct tcphdr);
ipovly->ih_len = htons(sizeof (struct tcphdr));
th = (struct tcphdr *)(mtod(m, caddr_t) +
ip6->ip6_plen = htons(sizeof(struct tcphdr)); /*XXX*/
th = (struct tcphdr *)(mtod(m, caddr_t) +
tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0,
struct tcphdr *th;
th = (struct tcphdr *)(ip6 + 1);
th = (struct tcphdr *)(ip + 1);
th->th_off = sizeof (struct tcphdr) >> 2;
th->th_off = (sizeof(struct tcphdr) + TCPOLEN_TSTAMP_APPA) >> 2;
struct tcphdr th;
struct tcphdr *th;
th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2));
th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2));
struct tcphdr *tcpqe_tcp;
int tcp_dooptions(struct tcpcb *, u_char *, int, struct tcphdr *,
int tcp_reass(struct tcpcb *, struct tcphdr *, struct mbuf *, int *);
void tcp_respond(struct tcpcb *, caddr_t, struct tcphdr *, tcp_seq,
void tcp_sack_option(struct tcpcb *,struct tcphdr *,u_char *,int);
void tcp_del_sackholes(struct tcpcb *, struct tcphdr *);
int tcp_signature(struct tdb *, int, struct mbuf *, struct tcphdr *,
struct tcphdr *, u_int);
min_hdrlen = sizeof(struct tcphdr);
icmp_len = sizeof(struct ip6_hdr) + sizeof(struct tcphdr) +
CTASSERT(sizeof(struct ip6_hdr) + sizeof(struct tcphdr) +
offset += offsetof(struct tcphdr, th_sum);
offset += offsetof(struct tcphdr, th_sum);
#define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr) - \
struct tcphdr *th;
if (lpktp < sizeof(struct ip) + sizeof(struct tcphdr))
if (sizeof(struct tcphdr) > lpktp)
th = (struct tcphdr *)pktp;
pktp += sizeof(struct tcphdr);
lpktp -= sizeof(struct tcphdr);
hlen += ((struct tcphdr *)&((int *)ip)[hlen])->th_off;
hlen += ((struct tcphdr *)&((int32_t *)ip)[hlen])->th_off;
static int tcp_cksum(const struct ip *ip, const struct tcphdr *tp, int len)
static int tcp6_cksum(const struct ip6_hdr *ip6, const struct tcphdr *tp,
const struct tcphdr *tp;
tp = (struct tcphdr *)bp;
struct tcphdr *th;