Home
last modified time | relevance | path

Searched refs:tcphdr (Results 1 – 25 of 136) sorted by relevance

123456

/freebsd/usr.sbin/ppp/
H A Dtcpmss.c75 #define MAXMSS4(mtu) ((mtu) - sizeof(struct ip) - sizeof(struct tcphdr))
77 #define MAXMSS6(mtu) ((mtu) - sizeof(struct ip6_hdr) - sizeof(struct tcphdr))
104 MSSFixup(struct tcphdr *tc, size_t pktlen, u_int16_t maxmss) in MSSFixup()
114 if (hlen <= sizeof(struct tcphdr) || hlen > pktlen) in MSSFixup()
121 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in MSSFixup()
176 plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check()
177 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
206 if (hlen > 0 && plen >= sizeof(struct tcphdr) + hlen) in tcpmss_Check()
207 MSSFixup((struct tcphdr *)(MBUF_CTOP(bp) + hlen), plen - hlen, in tcpmss_Check()
H A Dslcompress.c163 register struct tcphdr *oth; in sl_compress_tcp()
164 register struct tcphdr *th; in sl_compress_tcp()
181 th = (struct tcphdr *) & ((int *) ip)[hlen]; in sl_compress_tcp()
263 oth = (struct tcphdr *) & ((int *) &cs->cs_ip)[hlen]; in sl_compress_tcp()
433 register struct tcphdr *th; in sl_uncompress_tcp()
453 if ((int)(hlen + sizeof(struct tcphdr)) > len) in sl_uncompress_tcp()
455 th = (struct tcphdr *) & ((char *) ip)[hlen]; in sl_uncompress_tcp()
500 th = (struct tcphdr *) & ((u_char *) & cs->cs_ip)[hlen]; in sl_uncompress_tcp()
/freebsd/sys/netinet/tcp_stacks/
H A Drack_bbr_common.h92 _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th,
101 struct tcphdr *th, int32_t thflags, int32_t tlen,
108 struct tcphdr *th, int32_t rstreason, int32_t tlen);
113 __ctf_process_rst(struct mbuf *m, struct tcphdr *th,
118 ctf_challenge_ack(struct mbuf *m, struct tcphdr *th,
122 ctf_ts_check(struct mbuf *m, struct tcphdr *th,
132 ctf_do_dropwithreset_conn(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th,
H A Drack_bbr_common.c138 struct tcphdr *th; in ctf_get_enet_type()
179 th = (struct tcphdr *)(ip6 + 1); in ctf_get_enet_type()
211 th = (struct tcphdr *)(ip + 1); in ctf_get_enet_type()
351 struct tcphdr *th; in ctf_process_inbound_raw()
402 th = (struct tcphdr *)(ip6 + 1); in ctf_process_inbound_raw()
411 th = (struct tcphdr *)(ip + 1); in ctf_process_inbound_raw()
419 if (off < sizeof (struct tcphdr) || off > tlen) { in ctf_process_inbound_raw()
422 sizeof(struct tcphdr), in ctf_process_inbound_raw()
571 _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, in _ctf_drop_checks()
723 __ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, in __ctf_process_rst()
[all …]
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dtcp.h38 struct tcphdr { struct
54 static __inline struct tcphdr * argument
58 return (struct tcphdr *)skb_transport_header(skb); in tcp_hdr()
64 struct tcphdr *th; in tcp_hdrlen()
/freebsd/sys/netgraph/
H A Dng_tcpmss.c79 static int correct_mss(struct tcphdr *, int, uint16_t, int);
270 struct tcphdr *tcp; in ng_tcpmss_rcvdata()
317 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); in ng_tcpmss_rcvdata()
319 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
323 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata()
327 if (!(tcp->th_flags & TH_SYN) || tcphlen == sizeof(struct tcphdr)) in ng_tcpmss_rcvdata()
333 M_CHECK(tcphlen - sizeof(struct tcphdr)); in ng_tcpmss_rcvdata()
335 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
409 correct_mss(struct tcphdr *tc, int hlen, uint16_t maxmss, int flags) in correct_mss()
417 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in correct_mss()
/freebsd/sys/dev/virtio/network/
H A Dvirtio_net.h294 case offsetof(struct tcphdr, th_sum): in virtio_net_rx_csum_by_offset()
341 if (__predict_false(m->m_len < offset + sizeof(struct tcphdr))) in virtio_net_rx_csum_by_parse()
471 struct tcphdr *tcp, tcphdr; in virtio_net_tx_offload_tso() local
473 if (__predict_false(m->m_len < offset + sizeof(struct tcphdr))) { in virtio_net_tx_offload_tso()
474 m_copydata(m, offset, sizeof(struct tcphdr), (caddr_t) &tcphdr); in virtio_net_tx_offload_tso()
475 tcp = &tcphdr; in virtio_net_tx_offload_tso()
477 tcp = (struct tcphdr *)(m->m_data + offset); in virtio_net_tx_offload_tso()
/freebsd/sys/netinet/
H A Dtcp_var.h508 struct tcphdr tt_t;
614 struct tcphdr *, int, int, uint8_t);
1145 struct tcphdr *th;
1153 struct tcphdr *th, struct tcpopt *to,
1370 void tcp_dropwithreset(struct mbuf *, struct tcphdr *,
1373 struct tcphdr *, struct mbuf *, int);
1376 void cc_ack_received(struct tcpcb *tp, struct tcphdr *th,
1385 struct tcphdr *th, struct tcpopt *to);
1513 int tcp_newreno(struct tcpcb *, struct tcphdr *);
1572 tcp_fields_to_host(struct tcphdr *th) in tcp_fields_to_host()
[all …]
H A Dtoecore.h41 struct tcphdr;
141 void toe_syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *,
143 int toe_syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *,
146 int toe_4tuple_check(struct in_conninfo *, struct tcphdr *, struct ifnet *);
H A Dtcp_syncache.h42 struct tcphdr *, struct socket **, struct mbuf *, uint16_t);
44 struct tcphdr *, struct inpcb *, struct socket *, struct mbuf *,
46 void syncache_chkrst(struct in_conninfo *, struct tcphdr *, struct mbuf *,
H A Dtcp.h42 #define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */
48 struct tcphdr { struct
83 __tcp_get_flags(const struct tcphdr *th) in __tcp_get_flags() argument
89 __tcp_set_flags(struct tcphdr *th, uint16_t flags) in __tcp_set_flags()
172 #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
H A Dtcp_lro.h124 struct tcphdr *tcp;
206 static inline struct tcphdr *
209 return ((struct tcphdr *)((char *)m->m_data + in tcp_lro_get_th()
H A Dtcp_subr.c635 struct tcphdr *th; in tcp_recv_udp_tunneled_packet()
645 thlen = sizeof(struct tcphdr); in tcp_recv_udp_tunneled_packet()
653 th = (struct tcphdr *)(uh + 1); in tcp_recv_udp_tunneled_packet()
663 th = (struct tcphdr *)(uh + 1); in tcp_recv_udp_tunneled_packet()
1708 struct tcphdr *th = (struct tcphdr *)tcp_ptr; in tcpip_fillheaders()
1806 struct tcphdr *nth; in tcp_respond()
2489 sizeof (struct tcphdr) : in tcp_discardcb()
2809 struct tcphdr *th; in tcp_ctlinput_with_port()
2911 struct tcphdr *th, ttemp; in tcp_ctlinput_viaudp()
2930 th = (struct tcphdr *)(udp + 1); in tcp_ctlinput_viaudp()
[all …]
/freebsd/sys/netpfil/ipfw/pmod/
H A Dtcpmod.c60 tcpmod_setmss(struct mbuf **mp, struct tcphdr *tcp, int tlen, uint16_t mss) in tcpmod_setmss()
79 for (tlen -= sizeof(struct tcphdr), cp = (u_char *)(tcp + 1); in tcpmod_setmss()
121 struct tcphdr *tcp; in tcpmod_ipv6_setmss()
143 if (hlen <= sizeof(struct tcphdr) || hlen > plen) in tcpmod_ipv6_setmss()
153 struct tcphdr *tcp; in tcpmod_ipv4_setmss()
163 if (hlen <= sizeof(struct tcphdr) || hlen > plen) in tcpmod_ipv4_setmss()
/freebsd/sys/netinet/libalias/
H A Dalias_skinny.c208 struct tcphdr *tc, struct alias_link *lnk, in alias_skinny_reg_msg()
227 struct ip *pip, struct tcphdr *tc, in alias_skinny_startmedia()
251 struct tcphdr *tc, struct alias_link *lnk, in alias_skinny_port_msg()
269 struct ip *pip, struct tcphdr *tc, in alias_skinny_opnrcvch_ack()
301 struct tcphdr *tc; in AliasHandleSkinny()
308 tc = (struct tcphdr *)ip_next(pip); in AliasHandleSkinny()
H A Dalias_smedia.c237 struct tcphdr *tc; in alias_rtsp_out()
249 tc = (struct tcphdr *)ip_next(pip); in alias_rtsp_out()
394 tc = (struct tcphdr *)ip_next(pip); in alias_rtsp_out()
424 struct tcphdr *tc; in alias_pna_out()
445 tc = (struct tcphdr *)ip_next(pip); in alias_pna_out()
468 struct tcphdr *tc; in AliasHandleRtspOut()
477 tc = (struct tcphdr *)ip_next(pip); in AliasHandleRtspOut()
H A Dalias_pptp.c298 struct tcphdr *tc; in AliasHandlePptpOut()
337 tc = (struct tcphdr *)ip_next(pip); in AliasHandlePptpOut()
370 struct tcphdr *tc; in AliasHandlePptpIn()
409 tc = (struct tcphdr *)ip_next(pip); in AliasHandlePptpIn()
433 struct tcphdr *tc; in AliasVerifyPptp()
436 tc = (struct tcphdr *)ip_next(pip); in AliasVerifyPptp()
H A Dalias_ftp.c225 struct tcphdr *tc; in AliasHandleFtpOut()
229 tc = (struct tcphdr *)ip_next(pip); in AliasHandleFtpOut()
285 struct tcphdr *tc; in AliasHandleFtpIn()
288 tc = (struct tcphdr *)ip_next(pip); in AliasHandleFtpIn()
655 struct tcphdr *tc; in NewFtpMessage()
663 tc = (struct tcphdr *)ip_next(pip); in NewFtpMessage()
733 tc = (struct tcphdr *)ip_next(pip); in NewFtpMessage()
H A Dalias.c338 struct tcphdr *tc; in IcmpAliasIn2()
346 tc = (struct tcphdr *)ip_next(ip); in IcmpAliasIn2()
527 struct tcphdr *tc; in IcmpAliasOut2()
535 tc = (struct tcphdr *)ip_next(ip); in IcmpAliasOut2()
939 struct tcphdr *tc; in TcpAliasIn()
946 if (dlen < sizeof(struct tcphdr)) in TcpAliasIn()
948 tc = (struct tcphdr *)ip_next(pip); in TcpAliasIn()
1072 struct tcphdr *tc; in TcpAliasOut()
1078 if (dlen < sizeof(struct tcphdr)) in TcpAliasOut()
1080 tc = (struct tcphdr *)ip_next(pip); in TcpAliasOut()
[all …]
/freebsd/sys/net/
H A Dslcompress.c156 struct tcphdr *oth; in sl_compress_tcp()
157 struct tcphdr *th; in sl_compress_tcp()
172 th = (struct tcphdr *)&((int32_t *)ip)[hlen]; in sl_compress_tcp()
251 oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen]; in sl_compress_tcp()
455 struct tcphdr *th; in sl_uncompress_tcp_core()
474 if (hlen + sizeof(struct tcphdr) > buflen) in sl_uncompress_tcp_core()
476 hlen += ((struct tcphdr *)&((char *)ip)[hlen])->th_off << 2; in sl_uncompress_tcp_core()
515 th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen]; in sl_uncompress_tcp_core()
/freebsd/sys/netipsec/
H A Dipsec_support.h34 struct tcphdr;
93 int (*input)(struct mbuf *, struct tcphdr *, u_char *);
94 int (*output)(struct mbuf *, struct tcphdr *, u_char *);
131 struct tcphdr *, u_char *);
133 struct tcphdr *, u_char *);
H A Dxform_tcp.c183 tcp_signature_compute(struct mbuf *m, struct tcphdr *th, in tcp_signature_compute()
212 MD5Update(&ctx, (char *)th, sizeof(struct tcphdr)); in tcp_signature_compute()
267 tcp_ipsec_input(struct mbuf *m, struct tcphdr *th, u_char *buf) in tcp_ipsec_input()
313 tcp_ipsec_output(struct mbuf *m, struct tcphdr *th, u_char *buf) in tcp_ipsec_output()
/freebsd/contrib/tcpdump/
H A Dprint-sl.c154 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()
/freebsd/sys/dev/sfxge/
H A Dsfxge_rx.c376 struct tcphdr *c_th; in sfxge_lro_deliver()
389 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_deliver()
395 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_deliver()
466 struct tcphdr *c_th; in sfxge_lro_merge()
480 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_merge()
530 struct tcphdr *th; in sfxge_lro_try_merge()
535 th = (struct tcphdr *)(iph + 1); in sfxge_lro_try_merge()
539 th = (struct tcphdr *)(iph + 1); in sfxge_lro_try_merge()
678 struct tcphdr *th; in sfxge_lro()
712 th = (struct tcphdr *)(iph + 1); in sfxge_lro()
[all …]
/freebsd/cddl/lib/libdtrace/
H A Dtcp.d182 struct tcphdr *tcp_hdr; /* raw TCP header */
201 struct tcphdr *tcp_hdr; /* raw TCP header */
263 translator tcpinfo_t < struct tcphdr *p > {
273 tcp_hdr = (struct tcphdr *)p;
282 translator tcpinfoh_t < struct tcphdr *p > {
292 tcp_hdr = (struct tcphdr *)p;

123456