| /xnu-12377.1.9/bsd/netinet/ |
| H A D | tcp_newreno.c | 80 void tcp_newreno_congestion_avd(struct tcpcb *tp, struct tcphdr *th); 81 void tcp_newreno_ack_rcvd(struct tcpcb *tp, struct tcphdr *th); 83 void tcp_newreno_post_fr(struct tcpcb *tp, struct tcphdr *th); 86 int tcp_newreno_delay_ack(struct tcpcb *tp, struct tcphdr *th); 142 tcp_newreno_congestion_avd(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_congestion_avd() 163 tcp_newreno_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_ack_rcvd() 225 tcp_newreno_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_post_fr() 322 tcp_newreno_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_delay_ack()
|
| H A D | tcp_cc.h | 199 void (*congestion_avd) (struct tcpcb *tp, struct tcphdr *th); 202 void (*ack_rcvd) (struct tcpcb *tp, struct tcphdr *th); 208 void (*post_fr) (struct tcpcb *tp, struct tcphdr *th); 217 int (*delay_ack)(struct tcpcb *tp, struct tcphdr *th); 220 …void (*process_ecn) (struct tcpcb *tp, struct tcphdr *th, uint32_t new_bytes_marked, uint32_t pack… 259 void (*data_rcvd) (struct tcpcb *tp, struct tcphdr *th, 277 extern int tcp_cc_delay_ack(struct tcpcb *tp, struct tcphdr *th);
|
| H A D | tcp_cubic.c | 44 static void tcp_cubic_congestion_avd(struct tcpcb *tp, struct tcphdr *th); 45 static void tcp_cubic_ack_rcvd(struct tcpcb *tp, struct tcphdr *th); 47 static void tcp_cubic_post_fr(struct tcpcb *tp, struct tcphdr *th); 49 static int tcp_cubic_delay_ack(struct tcpcb *tp, struct tcphdr *th); 229 tcp_cubic_tcpwin(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_tcpwin() 265 tcp_cubic_congestion_avd(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_congestion_avd() 323 tcp_cubic_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_ack_rcvd() 440 tcp_cubic_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_post_fr() 505 tcp_cubic_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_delay_ack()
|
| H A D | tcp_prague.c | 34 static void tcp_prague_ack_rcvd(struct tcpcb *tp, struct tcphdr *th); 36 static void tcp_prague_post_fr(struct tcpcb *tp, struct tcphdr *th); 38 static int tcp_prague_delay_ack(struct tcpcb *tp, struct tcphdr *th); 41 static void tcp_prague_process_ecn(struct tcpcb *tp, struct tcphdr *th, uint32_t new_bytes_marked, 151 reno_friendly_win(struct tcpcb *tp, struct tcphdr *th) in reno_friendly_win() 189 tcp_cubic_ack_ca(struct tcpcb *tp, struct tcphdr *th, uint32_t acked) in tcp_cubic_ack_ca() 240 tcp_prague_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_prague_ack_rcvd() 321 tcp_prague_post_fr(struct tcpcb *tp, __unused struct tcphdr *th) in tcp_prague_post_fr() 486 tcp_prague_process_ecn(struct tcpcb *tp, struct tcphdr *th, uint32_t new_bytes_marked, in tcp_prague_process_ecn() 657 tcp_prague_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_prague_delay_ack()
|
| H A D | tcp_ledbat.c | 56 void tcp_ledbat_congestion_avd(struct tcpcb *tp, struct tcphdr *th); 57 void tcp_ledbat_ack_rcvd(struct tcpcb *tp, struct tcphdr *th); 60 void tcp_ledbat_post_fr(struct tcpcb *tp, struct tcphdr *th); 63 static int tcp_ledbat_delay_ack(struct tcpcb *tp, struct tcphdr *th); 196 tcp_ledbat_congestion_avd(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_congestion_avd() 381 tcp_ledbat_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_ack_rcvd() 465 tcp_ledbat_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_post_fr() 548 tcp_ledbat_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_delay_ack()
|
| H A D | tcpip.h | 74 struct tcphdr ti_t; /* tcp header */ 82 struct tcphdr ti_t; /* tcp header */
|
| H A D | tcp.h | 87 #define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */ 93 struct tcphdr { struct 217 #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
|
| H A D | tcp_subr.c | 594 #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)) in tcp_init() 670 struct tcphdr *tcp_hdr = (struct tcphdr *)tcp_ptr; in tcp_fillheaders() 688 ip6->ip6_plen = htons(sizeof(struct tcphdr)); in tcp_fillheaders() 718 htonl(sizeof(struct tcphdr) + IPPROTO_TCP)); in tcp_fillheaders() 742 htons(sizeof(struct tcphdr) + IPPROTO_TCP)); in tcp_fillheaders() 833 struct tcphdr *th, struct mbuf *m, tcp_seq ack, tcp_seq seq, uint32_t rcv_win, uint16_t flags, in tcp_respond() 843 struct tcphdr *nth; in tcp_respond() 898 nth = (struct tcphdr *)(void *)(ip6 + 1); in tcp_respond() 904 nth = (struct tcphdr *)(void *)(ip + 1); in tcp_respond() 906 bcopy(th, nth, sizeof(struct tcphdr)); in tcp_respond() [all …]
|
| H A D | tcp_var.h | 164 tcp_get_flags(const struct tcphdr *th) in tcp_get_flags() 170 tcp_set_flags(struct tcphdr *th, uint16_t flags) in tcp_set_flags() 184 struct tcphdr *tqe_th; /* a pointer to tcp header */ 257 struct tcphdr tt_t; 265 struct tcphdr *th; 1804 struct tcphdr *th, int len); 1857 …uct tcpcb *, void *ipgen __sized_by(ipgen_size), size_t ipgen_size, struct tcphdr *, struct mbuf *, 1871 void tcp_trace(int, int, struct tcpcb *, void *, struct tcphdr *, int); 1874 void tcp_sack_doack(struct tcpcb *, struct tcpopt *, struct tcphdr *, 1877 struct tcphdr *, boolean_t *); [all …]
|
| H A D | tcp_log.h | 95 extern void tcp_log_th_flags(void *hdr, struct tcphdr *th, struct tcpcb *tp, bool outgoing, struct … 98 extern void tcp_log_drop_pcb(void *hdr, struct tcphdr *th, struct tcpcb *tp, bool outgoing, const c… 99 extern void tcp_log_drop_pkt(void *hdr, struct tcphdr *th, struct ifnet *ifp, const char *reason);
|
| H A D | tcp_ccdbg.c | 82 tcp_ccdbg_trace(struct tcpcb *tp, struct tcphdr *th, int32_t event) in tcp_ccdbg_trace() 146 struct tcpcb *, tp, struct tcphdr *, th, int32_t, event); in tcp_ccdbg_trace()
|
| H A D | ip_icmp.c | 267 struct tcphdr *th = NULL; in icmp_error() 275 if (oiphlen + sizeof(struct tcphdr) > n->m_len && in icmp_error() 284 if (n->m_len < (oiphlen + sizeof(struct tcphdr)) && in icmp_error() 285 (n = m_pullup(n, (oiphlen + sizeof(struct tcphdr)))) == NULL) { in icmp_error() 294 th = (struct tcphdr *)(void *)((caddr_t)oip + oiphlen); in icmp_error() 296 if (th != ((struct tcphdr *)P2ROUNDDOWN(th, in icmp_error() 304 if (tcphlen < sizeof(struct tcphdr)) { in icmp_error() 323 th = (struct tcphdr *)(void *)((caddr_t)oip + oiphlen); in icmp_error()
|
| H A D | tcp_utils.h | 52 extern void tcp_ccdbg_trace(struct tcpcb *tp, struct tcphdr *th, int32_t event);
|
| H A D | tcp_input.c | 257 static void tcp_dooptions(struct tcpcb *, u_char *cp0 __counted_by(cnt0), int cnt0, struct tcphdr *, 261 struct tcphdr *, struct mbuf *, int); 281 static void tcp_bad_rexmt_restore_state(struct tcpcb *tp, struct tcphdr *th); 283 struct tcphdr *th); 285 struct tcphdr *th); 286 static void tcp_early_rexmt_check(struct tcpcb *tp, struct tcphdr *th); 287 static void tcp_bad_rexmt_check(struct tcpcb *tp, struct tcphdr *th, 314 static void tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th); 538 tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m, in tcp_reass() 945 IP6_EXTHDR_CHECK(m, *offp, sizeof(struct tcphdr), return IPPROTO_DONE); in tcp6_input() [all …]
|
| H A D | mptcp_opt.h | 41 …_do_mptcp_options(struct tcpcb *, u_char * opt __ended_by(optend), u_char *optend, struct tcphdr *,
|
| /xnu-12377.1.9/bsd/skywalk/nexus/flowswitch/flow/ |
| H A D | flow_classifier.c | 94 volatile struct tcphdr *_tcph; in flow_pkt_classify() 139 (offsetof(struct tcphdr, th_dport) - in flow_pkt_classify() 140 offsetof(struct tcphdr, th_sport))); in flow_pkt_classify() 143 (offsetof(struct tcphdr, th_seq) - in flow_pkt_classify() 144 offsetof(struct tcphdr, th_sport))); in flow_pkt_classify() 147 (offsetof(struct tcphdr, th_ack) - in flow_pkt_classify() 148 offsetof(struct tcphdr, th_sport))); in flow_pkt_classify() 151 (offsetof(struct tcphdr, th_flags) - in flow_pkt_classify() 152 offsetof(struct tcphdr, th_sport))); in flow_pkt_classify() 155 (offsetof(struct tcphdr, th_win) - in flow_pkt_classify() [all …]
|
| H A D | flow_agg.c | 119 struct tcphdr tcp_m; 169 struct tcphdr tcp_m; 340 struct tcphdr *tcp = in mbuf_csum() 341 (struct tcphdr *)(void *)(mtod(m, uint8_t *) + in mbuf_csum() 983 (sizeof(struct tcphdr) + TCPOLEN_TSTAMP_APPA))) { in can_agg_fastpath() 1147 struct tcphdr *stcp = (struct tcphdr *)(void *)(sl3_hdr + sl3hlen); in can_agg_slowpath() 1149 struct tcphdr *tcp = __unsafe_forge_bidi_indexable(struct tcphdr *, in can_agg_slowpath() 1176 uint8_t tcp_opts_len = pkt->pkt_flow_tcp_hlen - sizeof(struct tcphdr); in can_agg_slowpath() 1313 struct tcphdr *stcp, *tcp; in flow_agg_merge_hdr() 1389 stcp = (struct tcphdr *)(void *)(l3hdr + l3hlen); in flow_agg_merge_hdr() [all …]
|
| H A D | flow_track.c | 65 ASSERT(hlen >= (int)sizeof(struct tcphdr)); in flow_track_tcp_get_wscale() 67 opt = hdr + sizeof(struct tcphdr); in flow_track_tcp_get_wscale() 68 hlen -= sizeof(struct tcphdr); in flow_track_tcp_get_wscale() 763 struct tcphdr *th; in flow_track_abort_tcp() 774 tlen = sizeof(struct tcphdr); in flow_track_abort_tcp() 808 th = (struct tcphdr *)(void *)((char *)ip + sizeof(*ip)); in flow_track_abort_tcp() 823 th = (struct tcphdr *)(void *)((char *)ip6 + sizeof(*ip6)); in flow_track_abort_tcp()
|
| /xnu-12377.1.9/tests/ |
| H A D | icmp_fragmented_payload.c | 105 struct tcphdr *inner_tcp_hdr; 232 icmp4_pcb_set_payload(icmp4_pcb_t pcb, struct icmp *icmp_in, struct ip *ip_in, struct tcphdr *tcp_i… in icmp4_pcb_set_payload() 237 pcb->inner_tcp_hdr_len = sizeof(struct tcphdr); in icmp4_pcb_set_payload() 239 pcb->inner_tcp_hdr = (struct tcphdr*)(ptr + pcb->icmp_hdr_len + pcb->inner_ip_hdr_len); in icmp4_pcb_set_payload() 340 .ip_len = sizeof(struct ip) + sizeof(struct tcphdr), 345 struct tcphdr tcp_payload = {
|
| /xnu-12377.1.9/bsd/net/ |
| H A D | pf_osfp.c | 88 const struct tcphdr *tcp) in pf_osfp_fingerprint() 112 return pf_osfp_fingerprint_hdr(ip, ip6, (struct tcphdr *)(void *)hdr, sizeof(hdr)); in pf_osfp_fingerprint() 117 const struct tcphdr *__sized_by(tcphdr_max_len)tcp, size_t tcphdr_max_len) in pf_osfp_fingerprint_hdr() 122 uint8_t const *tcphdr = (uint8_t const *__bidi_indexable)tcp; in pf_osfp_fingerprint_hdr() local 123 uint8_t const *tcpopt_ptr = tcphdr + sizeof(struct tcphdr); in pf_osfp_fingerprint_hdr() 124 int tcpopt_cnt = (tcp->th_off << 2) + sizeof(struct tcphdr); in pf_osfp_fingerprint_hdr() 461 #define MTUOFF (sizeof (struct ip) + sizeof (struct tcphdr)) in pf_osfp_find()
|
| H A D | packet_mangler.c | 693 struct tcphdr tcp; in pktmnglr_ipfilter_output() 764 struct tcphdr tcp; in pktmnglr_ipfilter_input() 906 if (off < sizeof(struct tcphdr) || off > ip_pld_len) { in pktmnglr_ipfilter_input() 911 tcp_optlen = off - sizeof(struct tcphdr); in pktmnglr_ipfilter_input() 917 …error = mbuf_copydata(*data, (size_t)offset + sizeof(struct tcphdr), orig_tcp_optlen, tcp_opt_buf); in pktmnglr_ipfilter_input() 998 (size_t)offset + sizeof(struct tcphdr), in pktmnglr_ipfilter_input() 1043 struct tcphdr *tcp; in chksm_update() 1059 tcp = (struct tcphdr *)(void *)(ptr + (ip->ip_hl << 2)); in chksm_update()
|
| H A D | if_ports_used.c | 1885 struct tcphdr th = {}; in if_ports_used_match_mbuf() 1886 error = mbuf_copydata(m, iphdr.ip_hl << 2, sizeof(struct tcphdr), &th); in if_ports_used_match_mbuf() 1895 if (pkt_data_len < sizeof(struct tcphdr) || in if_ports_used_match_mbuf() 2022 struct tcphdr th = {}; in if_ports_used_match_mbuf() 2024 error = mbuf_copydata(m, l3_len, sizeof(struct tcphdr), &th); in if_ports_used_match_mbuf() 2034 if (pkt_data_len < sizeof(struct tcphdr) || in if_ports_used_match_mbuf() 2287 struct tcphdr * __single tcp = __unsafe_forge_single(struct tcphdr *, pkt->pkt_flow_tcp_hdr); in if_ports_used_match_pkt() 2690 struct tcphdr th; in check_wake_mbuf() 2692 if ((size_t)(m)->m_pkthdr.len < offset + sizeof(struct tcphdr)) { in check_wake_mbuf() 2696 mbuf_copydata(m, offset, sizeof(struct tcphdr), &th); in check_wake_mbuf() [all …]
|
| H A D | pf_norm.c | 169 struct pf_pdesc *, pbuf_t *, struct tcphdr *, int, int *); 2602 struct tcphdr *__single th = pf_pd_get_hdr_tcp(pd); in pf_normalize_tcp() 2694 if (th->th_off < (sizeof(struct tcphdr) >> 2)) { in pf_normalize_tcp() 2702 …uint8_t *__bidi_indexable th_iter = (uint8_t * __bidi_indexable)(struct tcphdr *__bidi_indexable) … in pf_normalize_tcp() 2704 ov = *(u_int16_t *)(void *)(th_iter + offsetof(struct tcphdr, th_ack) + sizeof(th->th_ack)); in pf_normalize_tcp() 2707 nv = *(u_int16_t *)(void *)(th_iter + offsetof(struct tcphdr, th_ack) + sizeof(th->th_ack)); in pf_normalize_tcp() 2757 struct tcphdr *th, struct pf_state_peer *src, struct pf_state_peer *dst) in pf_normalize_tcp_init() 2796 if (th->th_off > (sizeof(struct tcphdr) >> 2) && src->scrub && in pf_normalize_tcp_init() 2799 int hlen = (th->th_off << 2) - sizeof(struct tcphdr); in pf_normalize_tcp_init() 2800 u_int8_t *opt = hdr + sizeof(struct tcphdr); in pf_normalize_tcp_init() [all …]
|
| /xnu-12377.1.9/bsd/skywalk/nexus/netif/ |
| H A D | nx_netif_gso.c | 115 struct tcphdr *tcp; 430 state->tcp = (struct tcphdr *)(void *)(baddr + pkt->pkt_headroom + in netif_gso_ipv4_tcp_update() 502 state->tcp = (struct tcphdr *)(void *)(baddr + pkt->pkt_headroom + in netif_gso_ipv6_tcp_update() 567 state->tcp = (struct tcphdr *)(void *)(m_mtod_current(m) + in netif_gso_ip_tcp_init_state() 588 state->tcp = (struct tcphdr *)(void *)(m_mtod_current(m) + in netif_gso_ip_tcp_init_state() 665 hlen = mac_hlen + ip_hlen + sizeof(struct tcphdr); in netif_gso_ipv4_tcp() 739 hlen = mac_hlen + ip_hlen + sizeof(struct tcphdr); in netif_gso_ipv6_tcp()
|
| /xnu-12377.1.9/bsd/dev/dtrace/scripts/ |
| H A D | tcp.d | 126 struct tcphdr *tcp_hdr; /* raw TCP header */ 130 translator tcpinfo_t < struct tcphdr *T > {
|