/dragonfly/sys/netgraph7/tcpmss/ |
H A D | ng_tcpmss.c | 79 static int correct_mss(struct tcphdr *, int, uint16_t, int); 272 struct tcphdr *tcp; in ng_tcpmss_rcvdata() 319 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); in ng_tcpmss_rcvdata() 321 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata() 325 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata() 329 if (!(tcp->th_flags & TH_SYN) || tcphlen == sizeof(struct tcphdr)) in ng_tcpmss_rcvdata() 335 M_CHECK(tcphlen - sizeof(struct tcphdr)); in ng_tcpmss_rcvdata() 337 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata() 411 correct_mss(struct tcphdr *tc, int hlen, uint16_t maxmss, int flags) in correct_mss() 419 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in correct_mss()
|
/dragonfly/usr.sbin/ppp/ |
H A D | tcpmss.c | 74 #define MAXMSS(mtu) (mtu - sizeof(struct ip) - sizeof(struct tcphdr)) 100 MSSFixup(struct tcphdr *tc, size_t pktlen, u_int16_t maxmss) in MSSFixup() 110 if (hlen <= sizeof(struct tcphdr) || hlen > pktlen) in MSSFixup() 117 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in MSSFixup() 164 plen - hlen >= sizeof(struct tcphdr)) in tcpmss_Check() 165 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
|
H A D | slcompress.c | 149 struct tcphdr *oth; in sl_compress_tcp() 150 struct tcphdr *th; in sl_compress_tcp() 167 th = (struct tcphdr *) & ((int *) ip)[hlen]; in sl_compress_tcp() 249 oth = (struct tcphdr *) & ((int *) &cs->cs_ip)[hlen]; in sl_compress_tcp() 419 struct tcphdr *th; in sl_uncompress_tcp() 439 if ((int)(hlen + sizeof(struct tcphdr)) > len) in sl_uncompress_tcp() 441 th = (struct tcphdr *) & ((char *) ip)[hlen]; in sl_uncompress_tcp() 486 th = (struct tcphdr *) & ((u_char *) & cs->cs_ip)[hlen]; in sl_uncompress_tcp()
|
/dragonfly/sys/netinet/ |
H A D | ip_demux.c | 151 struct tcphdr *th; in ip_lengthcheck() 219 if (iplen < iphlen + sizeof(struct tcphdr)) { in ip_lengthcheck() 223 if (m->m_len < hoff + iphlen + sizeof(struct tcphdr)) { in ip_lengthcheck() 224 m = m_pullup(m, hoff + iphlen + sizeof(struct tcphdr)); in ip_lengthcheck() 231 th = (struct tcphdr *)((caddr_t)ip + iphlen); in ip_lengthcheck() 233 if (thoff < sizeof(struct tcphdr) || in ip_lengthcheck() 290 struct tcphdr *th; in ip_hashfn() 312 th = (struct tcphdr *)((caddr_t)ip + iphlen); in ip_hashfn()
|
H A D | tcp_subr.c | 467 struct tcphdr *tcp_hdr = (struct tcphdr *)tcp_ptr; in tcp_fillheaders() 564 struct tcphdr *nth; in tcp_respond() 616 nth = (struct tcphdr *)(ip6 + 1); in tcp_respond() 620 nth = (struct tcphdr *)(ip + 1); in tcp_respond() 636 nth = (struct tcphdr *)(ip + 1); in tcp_respond() 1464 const struct tcphdr *th; in tcp_get_inpnotify() 1466 th = (const struct tcphdr *) in tcp_get_inpnotify() 1495 const struct tcphdr *th; in tcp_ctlinput() 1501 th = (const struct tcphdr *) in tcp_ctlinput() 1554 struct tcphdr th; in tcp6_ctlinput() [all …]
|
H A D | tcp.h | 46 #define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */ 52 struct tcphdr { struct 149 #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
|
H A D | tcp_var.h | 97 struct tcphdr *tqe_th; /* a pointer to tcp header */ 109 struct tcphdr tt_t; 688 struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int); 733 void tcp_trace (short, short, struct tcpcb *, void *, struct tcphdr *, 739 void syncache_unreach(struct in_conninfo *, const struct tcphdr *); 740 int syncache_expand(struct in_conninfo *, struct tcphdr *, 743 struct tcphdr *, struct socket *, struct mbuf *); 744 void syncache_chkrst(struct in_conninfo *, struct tcphdr *);
|
H A D | tcp_syncache.c | 134 struct tcphdr *, struct socket *); 609 syncache_chkrst(struct in_conninfo *inc, struct tcphdr *th) in syncache_chkrst() 1136 struct tcphdr *th; in syncache_respond() 1148 (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)); in syncache_respond() 1156 (sizeof(struct ip) + sizeof(struct tcphdr)); in syncache_respond() 1176 tlen = hlen + sizeof(struct tcphdr) + optlen; in syncache_respond() 1211 th = (struct tcphdr *)(ip6 + 1); in syncache_respond() 1239 th = (struct tcphdr *)(ip + 1); in syncache_respond() 1246 th->th_off = (sizeof(struct tcphdr) + optlen) >> 2; in syncache_respond() 1317 m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); in syncache_respond() [all …]
|
H A D | tcpip.h | 49 struct tcphdr ti_t; /* tcp header */ 57 struct tcphdr ti_t; /* tcp header */
|
H A D | tcp_output.c | 185 struct tcphdr *th; in tcp_output() 716 hdrlen = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); in tcp_output() 964 th = (struct tcphdr *)(ip6 + 1); in tcp_output() 968 th = (struct tcphdr *)(ip + 1); in tcp_output() 1004 th->th_off = (sizeof(struct tcphdr) + optlen) >> 2; in tcp_output() 1074 sizeof(struct tcphdr) + optlen + len); in tcp_output() 1076 m->m_pkthdr.csum_thlen = sizeof(struct tcphdr) + optlen; in tcp_output() 1083 offsetof(struct tcphdr, th_sum); in tcp_output() 1421 hlen = sizeof(struct ip) + sizeof(struct tcphdr); in tcp_tso_getsize()
|
H A D | tcp_input.c | 118 struct tcphdr tcp_savetcp; 265 struct tcphdr *, struct mbuf *, int); 640 struct tcphdr *th; in tcp_input() 699 th = (struct tcphdr *)((caddr_t)ip6 + off0); in tcp_input() 727 th = (struct tcphdr *)((caddr_t)ip + off0); in tcp_input() 766 KASSERT(off >= sizeof(struct tcphdr) && off <= tlen, in tcp_input() 769 if (off > sizeof(struct tcphdr)) { in tcp_input() 773 th = (struct tcphdr *)((caddr_t)ip6 + off0); in tcp_input() 780 optlen = off - sizeof(struct tcphdr); in tcp_input() 2965 sizeof(struct ip6_hdr) + sizeof(struct tcphdr) : in tcp_rmx_mss() [all …]
|
H A D | tcp_debug.c | 77 struct tcphdr *th, int req) in tcp_trace() 174 len -= sizeof(struct tcphdr); in tcp_trace()
|
/dragonfly/lib/libalias/ |
H A D | alias_pptp.c | 155 struct tcphdr *tc; in AliasHandlePptpOut() 189 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in AliasHandlePptpOut() 218 struct tcphdr *tc; in AliasHandlePptpIn() 259 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in AliasHandlePptpIn() 280 struct tcphdr *tc; in AliasVerifyPptp() 283 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in AliasVerifyPptp()
|
H A D | alias_smedia.c | 146 struct tcphdr *tc; in alias_rtsp_out() 158 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in alias_rtsp_out() 331 struct tcphdr *tc; in alias_pna_out() 353 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in alias_pna_out() 372 struct tcphdr *tc; in AliasHandleRtspOut() 379 tc = (struct tcphdr *)((char *)pip + (pip->ip_hl << 2)); in AliasHandleRtspOut()
|
H A D | alias.c | 175 struct tcphdr *tc; in TcpMonitorIn() 177 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in TcpMonitorIn() 197 struct tcphdr *tc; in TcpMonitorOut() 335 struct tcphdr *tc; in IcmpAliasIn2() 342 tc = (struct tcphdr *) ud; in IcmpAliasIn2() 527 struct tcphdr *tc; in IcmpAliasOut2() 534 tc = (struct tcphdr *) ud; in IcmpAliasOut2() 878 struct tcphdr *tc; in TcpAliasIn() 974 struct tcphdr *tc; in TcpAliasOut() 1403 struct tcphdr *tc; in PacketUnaliasOut() [all …]
|
H A D | alias_ftp.c | 111 struct tcphdr *tc; in AliasHandleFtpOut() 115 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in AliasHandleFtpOut() 476 struct tcphdr *tc; in NewFtpMessage() 484 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in NewFtpMessage()
|
H A D | alias_util.c | 96 struct tcphdr *tc; in TcpChecksum() 103 tc = (struct tcphdr *) ((char *) pip + nhdr); in TcpChecksum()
|
H A D | alias_proxy.c | 291 struct tcphdr *tc; in ProxyEncodeTcpStream() 294 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in ProxyEncodeTcpStream() 391 struct tcphdr *tc; in ProxyEncodeIpHeader() 402 tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2)); in ProxyEncodeIpHeader() 461 dst_port = ((struct tcphdr *) ((char *) pip + (pip->ip_hl << 2))) in ProxyCheck()
|
/dragonfly/sys/net/ppp_layer/ |
H A D | slcompress.c | 159 struct tcphdr *oth; in sl_compress_tcp() 160 struct tcphdr *th; in sl_compress_tcp() 175 th = (struct tcphdr *)&((int32_t *)ip)[hlen]; in sl_compress_tcp() 254 oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen]; in sl_compress_tcp() 462 struct tcphdr *th; in sl_uncompress_tcp_core() 482 if (hlen + sizeof(struct tcphdr) > buflen) in sl_uncompress_tcp_core() 484 hlen += ((struct tcphdr *)&((char *)ip)[hlen])->th_off << 2; in sl_uncompress_tcp_core() 523 th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen]; in sl_uncompress_tcp_core()
|
/dragonfly/contrib/tcpdump/ |
H A D | print-sl.c | 154 ND_TCHECK_SIZE((const struct tcphdr *)&((const int *)ip)[hlen]); in sliplink_print() 155 hlen += TH_OFF((const struct tcphdr *)&((const int *)ip)[hlen]); in sliplink_print() 255 ND_TCHECK_SIZE((const struct tcphdr *)&((const int32_t *)ip)[hlen]); in compressed_sl_print() 256 hlen += TH_OFF((const struct tcphdr *)&((const int32_t *)ip)[hlen]); in compressed_sl_print()
|
H A D | print-tcp.c | 59 const struct ip *ip, const struct tcphdr *tp, 142 const struct tcphdr *tp, in tcp_cksum() 152 const struct tcphdr *tp, in tcp6_cksum() 164 const struct tcphdr *tp; in tcp_print() 178 tp = (const struct tcphdr *)bp; in tcp_print() 893 const struct ip *ip, const struct tcphdr *tp, in tcp_verify_signature() 896 struct tcphdr tp1; in tcp_verify_signature() 952 MD5_Update(&ctx, (const char *)&tp1, sizeof(struct tcphdr)); in tcp_verify_signature()
|
/dragonfly/sys/net/ip6fw/ |
H A D | ip6_fw.c | 143 static int tcp6flg_match (struct tcphdr *tcp6, struct ip6_fw *f); 178 tcp6flg_match(struct tcphdr *tcp6, struct ip6_fw *f) in tcp6flg_match() 361 struct tcphdr *const tcp6 = (struct tcphdr *) ((caddr_t) ip6+ off); in ip6fw_report() 611 struct tcphdr *tcp6; in ip6_fw_chk() 630 tcp6 = (struct tcphdr *) ((caddr_t)ip6 + off); in ip6_fw_chk() 775 struct tcphdr *const tcp = in ip6_fw_chk() 776 (struct tcphdr *) ((caddr_t)ip6 + off); in ip6_fw_chk() 779 struct tcphdr th; in ip6_fw_chk() 813 tcp_respond(NULL, ip6, (struct tcphdr *)(ip6 + 1), in ip6_fw_chk()
|
/dragonfly/sys/net/pf/ |
H A D | pf_norm.c | 93 struct tcphdr *, int, sa_family_t); 1296 struct tcphdr *th = pd->hdr.tcp; in pf_normalize_tcp() 1366 if (th->th_off < (sizeof(struct tcphdr) >> 2)) in pf_normalize_tcp() 1452 opt = hdr + sizeof(struct tcphdr); in pf_normalize_tcp_init() 1453 hlen = (th->th_off << 2) - sizeof(struct tcphdr); in pf_normalize_tcp_init() 1549 if (th->th_off > (sizeof(struct tcphdr) >> 2) && in pf_normalize_tcp_stateful() 1555 opt = hdr + sizeof(struct tcphdr); in pf_normalize_tcp_stateful() 1620 m_copyback(m, off + sizeof(struct tcphdr), in pf_normalize_tcp_stateful() 1621 (th->th_off << 2) - sizeof(struct tcphdr), in pf_normalize_tcp_stateful() 1622 hdr + sizeof(struct tcphdr)); in pf_normalize_tcp_stateful() [all …]
|
H A D | pf_osfp.c | 89 const struct tcphdr *tcp) in pf_osfp_fingerprint() 109 return (pf_osfp_fingerprint_hdr(ip, ip6, (struct tcphdr *)hdr)); in pf_osfp_fingerprint() 114 pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const struct tcphdr *tcp) in pf_osfp_fingerprint_hdr() 453 #define MTUOFF (sizeof(struct ip) + sizeof(struct tcphdr)) in pf_osfp_find()
|
/dragonfly/usr.sbin/trpt/ |
H A D | trpt.c | 89 int, void *, struct tcphdr *, int); 300 struct tcpcb *tp, int family, void *ip, struct tcphdr *th, int req) in tcp_trace() 374 len -= sizeof(struct tcphdr); in tcp_trace()
|