MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_get_header_oh

Function bbr_get_header_oh

freebsd/netinet/tcp_stacks/bbr.c:3506–3532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3504}
3505
3506static uint32_t
3507bbr_get_header_oh(struct tcp_bbr *bbr)
3508{
3509 int seg_oh;
3510
3511 seg_oh = 0;
3512 if (bbr->r_ctl.rc_inc_tcp_oh) {
3513 /* Do we include TCP overhead? */
3514 seg_oh = (bbr->rc_last_options + sizeof(struct tcphdr));
3515 }
3516 if (bbr->r_ctl.rc_inc_ip_oh) {
3517 /* Do we include IP overhead? */
3518#ifdef INET6
3519 if (bbr->r_is_v6)
3520 seg_oh += sizeof(struct ip6_hdr);
3521 else
3522#endif
3523#ifdef INET
3524 seg_oh += sizeof(struct ip);
3525#endif
3526 }
3527 if (bbr->r_ctl.rc_inc_enet_oh) {
3528 /* Do we include the ethernet overhead? */
3529 seg_oh += sizeof(struct ether_header);
3530 }
3531 return(seg_oh);
3532}
3533
3534static uint32_t
3535bbr_get_pacing_length(struct tcp_bbr *bbr, uint16_t gain, uint32_t useconds_time, uint64_t bw)

Callers 1

bbr_get_pacing_delayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected