Home
last modified time | relevance | path

Searched refs:tcphdr (Results 1 – 25 of 137) 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,
99 struct tcphdr *th, int32_t thflags, int32_t tlen,
104 struct tcphdr *th, int32_t rstreason, int32_t tlen);
109 ctf_process_rst(struct mbuf *m, struct tcphdr *th,
113 ctf_challenge_ack(struct mbuf *m, struct tcphdr *th,
117 ctf_ts_check(struct mbuf *m, struct tcphdr *th,
127 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()
391 th = (struct tcphdr *)(ip6 + 1); in ctf_process_inbound_raw()
400 th = (struct tcphdr *)(ip + 1); in ctf_process_inbound_raw()
408 if (off < sizeof (struct tcphdr) || off > tlen) { in ctf_process_inbound_raw()
411 sizeof(struct tcphdr), in ctf_process_inbound_raw()
509 ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, in ctf_do_dropwithreset()
547 ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, in ctf_drop_checks()
[all …]
/freebsd/sys/netgraph/
H A Dng_tcpmss.c85 static int correct_mss(struct tcphdr *, int, uint16_t, int);
276 struct tcphdr *tcp; in ng_tcpmss_rcvdata()
323 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); in ng_tcpmss_rcvdata()
325 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
329 if (tcphlen < sizeof(struct tcphdr) || tcphlen > pktlen - iphlen) in ng_tcpmss_rcvdata()
333 if (!(tcp_get_flags(tcp) & TH_SYN) || tcphlen == sizeof(struct tcphdr)) in ng_tcpmss_rcvdata()
339 M_CHECK(tcphlen - sizeof(struct tcphdr)); in ng_tcpmss_rcvdata()
341 tcp = (struct tcphdr *)((caddr_t )ip + iphlen); in ng_tcpmss_rcvdata()
415 correct_mss(struct tcphdr *tc, int hlen, uint16_t maxmss, int flags) in correct_mss()
423 for (olen = hlen - sizeof(struct tcphdr), opt = (u_char *)(tc + 1); in correct_mss()
/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/netinet/
H A Dtcp_var.h512 struct tcphdr tt_t;
616 struct tcphdr *, int, int, uint8_t);
618 struct tcphdr *, int, int, uint8_t, int, struct timeval *);
1154 struct tcphdr *th;
1162 struct tcphdr *th, struct tcpopt *to,
1378 char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, const void *,
1380 char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, const void *,
1382 int tcp_reass(struct tcpcb *, struct tcphdr *, tcp_seq *, int *,
1387 void tcp_dropwithreset(struct mbuf *, struct tcphdr *,
1390 struct tcphdr *, struct mbuf *, int);
[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()
170 #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.c344 static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th,
580 struct tcphdr *th; in tcp_recv_udp_tunneled_packet()
590 thlen = sizeof(struct tcphdr); in tcp_recv_udp_tunneled_packet()
598 th = (struct tcphdr *)(uh + 1); in tcp_recv_udp_tunneled_packet()
608 th = (struct tcphdr *)(uh + 1); in tcp_recv_udp_tunneled_packet()
1516 max_protohdr_grow(sizeof(struct ip6_hdr) + sizeof(struct tcphdr)); in tcp_init()
1646 struct tcphdr *th = (struct tcphdr *)tcp_ptr; in tcpip_fillheaders()
1663 ip6->ip6_plen = htons(sizeof(struct tcphdr)); in tcpip_fillheaders()
1736 tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, in tcp_respond()
1744 struct tcphdr *nth; in tcp_respond()
[all …]
/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/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()
1030 tc = (struct tcphdr *)ip_next(pip); in TcpAliasIn()
1055 tc = (struct tcphdr *)ip_next(pip); in TcpAliasIn()
1072 struct tcphdr *tc; in TcpAliasOut()
[all …]
/freebsd/sys/netipsec/
H A Dipsec_support.h36 struct tcphdr;
97 int (*input)(struct mbuf *, struct tcphdr *, u_char *);
98 int (*output)(struct mbuf *, struct tcphdr *, u_char *);
135 struct tcphdr *, u_char *);
137 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/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/contrib/tcpdump/
H A Dprint-sl.c152 ND_TCHECK_SIZE((const struct tcphdr *)&((const int *)ip)[hlen]); in sliplink_print()
153 hlen += TH_OFF((const struct tcphdr *)&((const int *)ip)[hlen]); in sliplink_print()
253 ND_TCHECK_SIZE((const struct tcphdr *)&((const int32_t *)ip)[hlen]); in compressed_sl_print()
254 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()
464 struct mbuf *mbuf, struct tcphdr *th) in sfxge_lro_merge()
466 struct tcphdr *c_th; in sfxge_lro_merge()
480 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_merge()
484 c_th = (struct tcphdr *)(iph + 1); in sfxge_lro_merge()
499 struct mbuf *mbuf, void *nh, struct tcphdr *th) in sfxge_lro_start()
530 struct tcphdr *th; in sfxge_lro_try_merge()
535 th = (struct tcphdr *)(iph + 1); in sfxge_lro_try_merge()
[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