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

Function tcp_log_end_status

freebsd/netinet/tcp_subr.c:3499–3526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3497}
3498
3499void
3500tcp_log_end_status(struct tcpcb *tp, uint8_t status)
3501{
3502 uint32_t bit, i;
3503
3504 if ((tp == NULL) ||
3505 (status > TCP_EI_STATUS_MAX_VALUE) ||
3506 (status == 0)) {
3507 /* Invalid */
3508 return;
3509 }
3510 if (status > (sizeof(uint32_t) * 8)) {
3511 /* Should this be a KASSERT? */
3512 return;
3513 }
3514 bit = 1U << (status - 1);
3515 if (bit & tp->t_end_info_status) {
3516 /* already logged */
3517 return;
3518 }
3519 for (i = 0; i < TCP_END_BYTE_INFO; i++) {
3520 if (tp->t_end_info_bytes[i] == TCP_EI_EMPTY_SLOT) {
3521 tp->t_end_info_bytes[i] = status;
3522 tp->t_end_info_status |= bit;
3523 break;
3524 }
3525 }
3526}

Callers 15

ctf_process_rstFunction · 0.85
rack_timeout_persistFunction · 0.85
rack_timeout_keepaliveFunction · 0.85
rack_timeout_rxtFunction · 0.85
rack_process_ackFunction · 0.85
rack_do_syn_sentFunction · 0.85
rack_do_syn_recvFunction · 0.85
rack_do_segment_nounlockFunction · 0.85
rack.cFile · 0.85
bbr_timeout_persistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected