Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_usrreq.c
Show First 20 Lines • Show All 1,658 Lines • ▼ Show 20 Lines | if ((tp->t_flags & TF_REQ_TSTMP) && (tp->t_flags & TF_RCVD_TSTMP)) | ||||
ti->tcpi_options |= TCPI_OPT_TIMESTAMPS; | ti->tcpi_options |= TCPI_OPT_TIMESTAMPS; | ||||
if (tp->t_flags & TF_SACK_PERMIT) | if (tp->t_flags & TF_SACK_PERMIT) | ||||
ti->tcpi_options |= TCPI_OPT_SACK; | ti->tcpi_options |= TCPI_OPT_SACK; | ||||
if ((tp->t_flags & TF_REQ_SCALE) && (tp->t_flags & TF_RCVD_SCALE)) { | if ((tp->t_flags & TF_REQ_SCALE) && (tp->t_flags & TF_RCVD_SCALE)) { | ||||
ti->tcpi_options |= TCPI_OPT_WSCALE; | ti->tcpi_options |= TCPI_OPT_WSCALE; | ||||
ti->tcpi_snd_wscale = tp->snd_scale; | ti->tcpi_snd_wscale = tp->snd_scale; | ||||
ti->tcpi_rcv_wscale = tp->rcv_scale; | ti->tcpi_rcv_wscale = tp->rcv_scale; | ||||
} | } | ||||
if (tp->t_flags2 & TF2_ECN_PERMIT) | if (tp->t_flags2 & (TF2_ECN_PERMIT | TF2_ACE_PERMIT)) | ||||
ti->tcpi_options |= TCPI_OPT_ECN; | ti->tcpi_options |= TCPI_OPT_ECN; | ||||
ti->tcpi_rto = tp->t_rxtcur * tick; | ti->tcpi_rto = tp->t_rxtcur * tick; | ||||
ti->tcpi_last_data_recv = ((uint32_t)ticks - tp->t_rcvtime) * tick; | ti->tcpi_last_data_recv = ((uint32_t)ticks - tp->t_rcvtime) * tick; | ||||
ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; | ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; | ||||
ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT; | ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT; | ||||
ti->tcpi_snd_ssthresh = tp->snd_ssthresh; | ti->tcpi_snd_ssthresh = tp->snd_ssthresh; | ||||
▲ Show 20 Lines • Show All 1,283 Lines • ▼ Show 20 Lines | db_print_tflags(u_int t_flags) | ||||
if (t_flags & TF_NEEDFIN) { | if (t_flags & TF_NEEDFIN) { | ||||
db_printf("%sTF_NEEDFIN", comma ? ", " : ""); | db_printf("%sTF_NEEDFIN", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_NOPUSH) { | if (t_flags & TF_NOPUSH) { | ||||
db_printf("%sTF_NOPUSH", comma ? ", " : ""); | db_printf("%sTF_NOPUSH", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_PREVVALID) { | |||||
db_printf("%sTF_PREVVALID", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags & TF_MORETOCOME) { | if (t_flags & TF_MORETOCOME) { | ||||
db_printf("%sTF_MORETOCOME", comma ? ", " : ""); | db_printf("%sTF_MORETOCOME", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_LQ_OVERFLOW) { | if (t_flags & TF_LQ_OVERFLOW) { | ||||
db_printf("%sTF_LQ_OVERFLOW", comma ? ", " : ""); | db_printf("%sTF_LQ_OVERFLOW", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
Show All 12 Lines | db_print_tflags(u_int t_flags) | ||||
if (t_flags & TF_CONGRECOVERY) { | if (t_flags & TF_CONGRECOVERY) { | ||||
db_printf("%sTF_CONGRECOVERY", comma ? ", " : ""); | db_printf("%sTF_CONGRECOVERY", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_WASFRECOVERY) { | if (t_flags & TF_WASFRECOVERY) { | ||||
db_printf("%sTF_WASFRECOVERY", comma ? ", " : ""); | db_printf("%sTF_WASFRECOVERY", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_WASCRECOVERY) { | |||||
db_printf("%sTF_WASCRECOVERY", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags & TF_SIGNATURE) { | if (t_flags & TF_SIGNATURE) { | ||||
db_printf("%sTF_SIGNATURE", comma ? ", " : ""); | db_printf("%sTF_SIGNATURE", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_FORCEDATA) { | if (t_flags & TF_FORCEDATA) { | ||||
db_printf("%sTF_FORCEDATA", comma ? ", " : ""); | db_printf("%sTF_FORCEDATA", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_TSO) { | if (t_flags & TF_TSO) { | ||||
db_printf("%sTF_TSO", comma ? ", " : ""); | db_printf("%sTF_TSO", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
if (t_flags & TF_FASTOPEN) { | if (t_flags & TF_FASTOPEN) { | ||||
db_printf("%sTF_FASTOPEN", comma ? ", " : ""); | db_printf("%sTF_FASTOPEN", comma ? ", " : ""); | ||||
comma = 1; | comma = 1; | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
db_print_tflags2(u_int t_flags2) | db_print_tflags2(u_int t_flags2) | ||||
{ | { | ||||
int comma; | int comma; | ||||
comma = 0; | comma = 0; | ||||
if (t_flags2 & TF2_PLPMTU_BLACKHOLE) { | |||||
db_printf("%sTF2_PLPMTU_BLACKHOLE", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_PLPMTU_PMTUD) { | |||||
db_printf("%sTF2_PLPMTU_PMTUD", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_PLPMTU_MAXSEGSNT) { | |||||
db_printf("%sTF2_PLPMTU_MAXSEGSNT", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_LOG_AUTO) { | |||||
db_printf("%sTF2_LOG_AUTO", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_DROP_AF_DATA) { | |||||
db_printf("%sTF2_DROP_AF_DATA", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_ECN_PERMIT) { | if (t_flags2 & TF2_ECN_PERMIT) { | ||||
db_printf("%sTF2_ECN_PERMIT", comma ? ", " : ""); | db_printf("%sTF2_ECN_PERMIT", comma ? ", " : ""); | ||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_ECN_SND_CWR) { | |||||
db_printf("%sTF2_ECN_SND_CWR", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_ECN_SND_ECE) { | |||||
db_printf("%sTF2_ECN_SND_ECE", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_ACE_PERMIT) { | |||||
db_printf("%sTF2_ACE_PERMIT", comma ? ", " : ""); | |||||
comma = 1; | |||||
} | |||||
if (t_flags2 & TF2_FBYTES_COMPLETE) { | |||||
db_printf("%sTF2_FBYTES_COMPLETE", comma ? ", " : ""); | |||||
comma = 1; | comma = 1; | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
db_print_toobflags(char t_oobflags) | db_print_toobflags(char t_oobflags) | ||||
{ | { | ||||
int comma; | int comma; | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |