Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_var.h
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | |||||
#endif /* _KERNEL || _WANT_TCPCB */ | #endif /* _KERNEL || _WANT_TCPCB */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct tcptemp { | struct tcptemp { | ||||
u_char tt_ipgen[40]; /* the size must be of max ip header, now IPv6 */ | u_char tt_ipgen[40]; /* the size must be of max ip header, now IPv6 */ | ||||
struct tcphdr tt_t; | struct tcphdr tt_t; | ||||
}; | }; | ||||
/* Enable TCP/UDP tunneling port */ | |||||
#define TCP_TUNNELING_PORT_MIN 0 | |||||
#define TCP_TUNNELING_PORT_MAX 65535 | |||||
#define TCP_TUNNELING_PORT_DEFAULT 0 | |||||
/* Enable TCP/UDP tunneling port */ | |||||
#define TCP_TUNNELING_OVERHEAD_MIN sizeof(struct udphdr) | |||||
#define TCP_TUNNELING_OVERHEAD_MAX 1024 | |||||
#define TCP_TUNNELING_OVERHEAD_DEFAULT TCP_TUNNELING_OVERHEAD_MIN | |||||
/* Minimum map entries limit value, if set */ | /* Minimum map entries limit value, if set */ | ||||
#define TCP_MIN_MAP_ENTRIES_LIMIT 128 | #define TCP_MIN_MAP_ENTRIES_LIMIT 128 | ||||
/* | /* | ||||
* TODO: We yet need to brave plowing in | * TODO: We yet need to brave plowing in | ||||
* to tcp_input() and the pru_usrreq() block. | * to tcp_input() and the pru_usrreq() block. | ||||
* Right now these go to the old standards which | * Right now these go to the old standards which | ||||
* are somewhat ok, but in the long term may | * are somewhat ok, but in the long term may | ||||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
#ifndef _NETINET_IN_PCB_H_ | #ifndef _NETINET_IN_PCB_H_ | ||||
struct in_conninfo; | struct in_conninfo; | ||||
#endif /* _NETINET_IN_PCB_H_ */ | #endif /* _NETINET_IN_PCB_H_ */ | ||||
struct tcptw { | struct tcptw { | ||||
struct inpcb *tw_inpcb; /* XXX back pointer to internet pcb */ | struct inpcb *tw_inpcb; /* XXX back pointer to internet pcb */ | ||||
uint32_t t_port:16, /* UDP port number if TCPoUDP */ | |||||
t_unused:16; | |||||
tcp_seq snd_nxt; | tcp_seq snd_nxt; | ||||
tcp_seq rcv_nxt; | tcp_seq rcv_nxt; | ||||
tcp_seq iss; | tcp_seq iss; | ||||
tcp_seq irs; | tcp_seq irs; | ||||
u_short last_win; /* cached window value */ | u_short last_win; /* cached window value */ | ||||
short tw_so_options; /* copy of so_options */ | short tw_so_options; /* copy of so_options */ | ||||
struct ucred *tw_cred; /* user credentials */ | struct ucred *tw_cred; /* user credentials */ | ||||
u_int32_t t_recent; | u_int32_t t_recent; | ||||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | struct tcpstat { | ||||
uint64_t tcps_sig_err_sigopt; /* No signature expected by socket */ | uint64_t tcps_sig_err_sigopt; /* No signature expected by socket */ | ||||
uint64_t tcps_sig_err_nosigopt; /* No signature provided by segment */ | uint64_t tcps_sig_err_nosigopt; /* No signature provided by segment */ | ||||
/* Path MTU Discovery Black Hole Detection related stats */ | /* Path MTU Discovery Black Hole Detection related stats */ | ||||
uint64_t tcps_pmtud_blackhole_activated; /* Black Hole Count */ | uint64_t tcps_pmtud_blackhole_activated; /* Black Hole Count */ | ||||
uint64_t tcps_pmtud_blackhole_activated_min_mss; /* BH at min MSS Count */ | uint64_t tcps_pmtud_blackhole_activated_min_mss; /* BH at min MSS Count */ | ||||
uint64_t tcps_pmtud_blackhole_failed; /* Black Hole Failure Count */ | uint64_t tcps_pmtud_blackhole_failed; /* Black Hole Failure Count */ | ||||
uint64_t _pad[12]; /* 6 UTO, 6 TBD */ | uint64_t tcps_tunneled_pkts; /* Packets encap's in UDP received */ | ||||
uint64_t tcps_tunneled_errs; /* Packets that had errors that were UDP encaped */ | |||||
uint64_t _pad[10]; /* 6 UTO, 6 TBD */ | |||||
}; | }; | ||||
#define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ | #define tcps_rcvmemdrop tcps_rcvreassfull /* compat */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define TI_UNLOCKED 1 | #define TI_UNLOCKED 1 | ||||
#define TI_RLOCKED 2 | #define TI_RLOCKED 2 | ||||
#include <sys/counter.h> | #include <sys/counter.h> | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | struct xtcpcb { | ||||
int32_t tt_delack; /* (s) */ | int32_t tt_delack; /* (s) */ | ||||
int32_t t_logstate; /* (3) */ | int32_t t_logstate; /* (3) */ | ||||
uint32_t t_snd_cwnd; /* (s) */ | uint32_t t_snd_cwnd; /* (s) */ | ||||
uint32_t t_snd_ssthresh; /* (s) */ | uint32_t t_snd_ssthresh; /* (s) */ | ||||
uint32_t t_maxseg; /* (s) */ | uint32_t t_maxseg; /* (s) */ | ||||
uint32_t t_rcv_wnd; /* (s) */ | uint32_t t_rcv_wnd; /* (s) */ | ||||
uint32_t t_snd_wnd; /* (s) */ | uint32_t t_snd_wnd; /* (s) */ | ||||
uint32_t xt_ecn; /* (s) */ | uint32_t xt_ecn; /* (s) */ | ||||
int32_t spare32[26]; | uint16_t xt_encaps_port; /* (s) */ | ||||
int16_t spare16; | |||||
int32_t spare32[25]; | |||||
} __aligned(8); | } __aligned(8); | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
void tcp_inptoxtp(const struct inpcb *, struct xtcpcb *); | void tcp_inptoxtp(const struct inpcb *, struct xtcpcb *); | ||||
#endif | #endif | ||||
#endif | #endif | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
VNET_DECLARE(int, tcp_perconn_stats_enable); | VNET_DECLARE(int, tcp_perconn_stats_enable); | ||||
#endif /* STATS */ | #endif /* STATS */ | ||||
VNET_DECLARE(int, tcp_recvspace); | VNET_DECLARE(int, tcp_recvspace); | ||||
VNET_DECLARE(int, tcp_sack_globalholes); | VNET_DECLARE(int, tcp_sack_globalholes); | ||||
VNET_DECLARE(int, tcp_sack_globalmaxholes); | VNET_DECLARE(int, tcp_sack_globalmaxholes); | ||||
VNET_DECLARE(int, tcp_sack_maxholes); | VNET_DECLARE(int, tcp_sack_maxholes); | ||||
VNET_DECLARE(int, tcp_sc_rst_sock_fail); | VNET_DECLARE(int, tcp_sc_rst_sock_fail); | ||||
VNET_DECLARE(int, tcp_sendspace); | VNET_DECLARE(int, tcp_sendspace); | ||||
VNET_DECLARE(int, tcp_udp_tunneling_overhead); | |||||
VNET_DECLARE(int, tcp_udp_tunneling_port); | |||||
VNET_DECLARE(struct inpcbhead, tcb); | VNET_DECLARE(struct inpcbhead, tcb); | ||||
VNET_DECLARE(struct inpcbinfo, tcbinfo); | VNET_DECLARE(struct inpcbinfo, tcbinfo); | ||||
#define V_tcp_do_prr VNET(tcp_do_prr) | #define V_tcp_do_prr VNET(tcp_do_prr) | ||||
#define V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) | #define V_tcp_do_prr_conservative VNET(tcp_do_prr_conservative) | ||||
#define V_tcp_do_newcwv VNET(tcp_do_newcwv) | #define V_tcp_do_newcwv VNET(tcp_do_newcwv) | ||||
#define V_drop_synfin VNET(drop_synfin) | #define V_drop_synfin VNET(drop_synfin) | ||||
#define V_path_mtu_discovery VNET(path_mtu_discovery) | #define V_path_mtu_discovery VNET(path_mtu_discovery) | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
int tcp_ccalgounload(struct cc_algo *unload_algo); | int tcp_ccalgounload(struct cc_algo *unload_algo); | ||||
struct tcpcb * | struct tcpcb * | ||||
tcp_close(struct tcpcb *); | tcp_close(struct tcpcb *); | ||||
void tcp_discardcb(struct tcpcb *); | void tcp_discardcb(struct tcpcb *); | ||||
void tcp_twstart(struct tcpcb *); | void tcp_twstart(struct tcpcb *); | ||||
void tcp_twclose(struct tcptw *, int); | void tcp_twclose(struct tcptw *, int); | ||||
void tcp_ctlinput(int, struct sockaddr *, void *); | void tcp_ctlinput(int, struct sockaddr *, void *); | ||||
int tcp_ctloutput(struct socket *, struct sockopt *); | int tcp_ctloutput(struct socket *, struct sockopt *); | ||||
void tcp_ctlinput_viaudp(int, struct sockaddr *, void *, void *); | |||||
struct tcpcb * | struct tcpcb * | ||||
tcp_drop(struct tcpcb *, int); | tcp_drop(struct tcpcb *, int); | ||||
void tcp_drain(void); | void tcp_drain(void); | ||||
void tcp_init(void); | void tcp_init(void); | ||||
void tcp_fini(void *); | void tcp_fini(void *); | ||||
char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, | char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, | ||||
const void *); | const void *); | ||||
char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, void *, | char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, void *, | ||||
Show All 18 Lines | |||||
#ifdef TCP_HHOOK | #ifdef TCP_HHOOK | ||||
void hhook_run_tcp_est_in(struct tcpcb *tp, | void hhook_run_tcp_est_in(struct tcpcb *tp, | ||||
struct tcphdr *th, struct tcpopt *to); | struct tcphdr *th, struct tcpopt *to); | ||||
#endif | #endif | ||||
int tcp_input(struct mbuf **, int *, int); | int tcp_input(struct mbuf **, int *, int); | ||||
int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *, | int tcp_autorcvbuf(struct mbuf *, struct tcphdr *, struct socket *, | ||||
struct tcpcb *, int); | struct tcpcb *, int); | ||||
int tcp_input_with_port(struct mbuf **, int *, int, uint16_t); | |||||
void tcp_handle_wakeup(struct tcpcb *, struct socket *); | void tcp_handle_wakeup(struct tcpcb *, struct socket *); | ||||
void tcp_do_segment(struct mbuf *, struct tcphdr *, | void tcp_do_segment(struct mbuf *, struct tcphdr *, | ||||
struct socket *, struct tcpcb *, int, int, uint8_t); | struct socket *, struct tcpcb *, int, int, uint8_t); | ||||
int register_tcp_functions(struct tcp_function_block *blk, int wait); | int register_tcp_functions(struct tcp_function_block *blk, int wait); | ||||
int register_tcp_functions_as_names(struct tcp_function_block *blk, | int register_tcp_functions_as_names(struct tcp_function_block *blk, | ||||
int wait, const char *names[], int *num_names); | int wait, const char *names[], int *num_names); | ||||
int register_tcp_functions_as_name(struct tcp_function_block *blk, | int register_tcp_functions_as_name(struct tcp_function_block *blk, | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
void tcp_tw_zone_change(void); | void tcp_tw_zone_change(void); | ||||
int tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, | int tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, | ||||
struct mbuf *, int); | struct mbuf *, int); | ||||
void tcp_setpersist(struct tcpcb *); | void tcp_setpersist(struct tcpcb *); | ||||
void tcp_slowtimo(void); | void tcp_slowtimo(void); | ||||
struct tcptemp * | struct tcptemp * | ||||
tcpip_maketemplate(struct inpcb *); | tcpip_maketemplate(struct inpcb *); | ||||
void tcpip_fillheaders(struct inpcb *, void *, void *); | void tcpip_fillheaders(struct inpcb *, uint16_t, void *, void *); | ||||
void tcp_timer_activate(struct tcpcb *, uint32_t, u_int); | void tcp_timer_activate(struct tcpcb *, uint32_t, u_int); | ||||
int tcp_timer_suspend(struct tcpcb *, uint32_t); | int tcp_timer_suspend(struct tcpcb *, uint32_t); | ||||
void tcp_timers_unsuspend(struct tcpcb *, uint32_t); | void tcp_timers_unsuspend(struct tcpcb *, uint32_t); | ||||
int tcp_timer_active(struct tcpcb *, uint32_t); | int tcp_timer_active(struct tcpcb *, uint32_t); | ||||
void tcp_timer_stop(struct tcpcb *, uint32_t); | void tcp_timer_stop(struct tcpcb *, uint32_t); | ||||
void tcp_trace(short, short, struct tcpcb *, void *, struct tcphdr *, int); | void tcp_trace(short, short, struct tcpcb *, void *, struct tcphdr *, int); | ||||
int inp_to_cpuid(struct inpcb *inp); | int inp_to_cpuid(struct inpcb *inp); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |