Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_var.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
/* Flags for tcp functions */ | /* Flags for tcp functions */ | ||||
#define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ | #define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ | ||||
struct tcpcb; | struct tcpcb; | ||||
struct inpcb; | struct inpcb; | ||||
struct sockopt; | struct sockopt; | ||||
struct socket; | struct socket; | ||||
/* | |||||
* If defining the optional tcp_timers, in the | |||||
* tfb_tcp_timer_stop call you must use the | |||||
* callout_async_drain() function with the | |||||
* tcp_timer_discard callback. You should check | |||||
* the return of callout_async_drain() and if 0 | |||||
* increment tt_draincnt. Since the timer sub-system | |||||
* does not know your callbacks you must provide a | |||||
* stop_all function that loops through and calls | |||||
* tcp_timer_stop() with each of your defined timers. | |||||
*/ | |||||
struct tcp_function_block { | struct tcp_function_block { | ||||
char tfb_tcp_block_name[TCP_FUNCTION_NAME_LEN_MAX]; | char tfb_tcp_block_name[TCP_FUNCTION_NAME_LEN_MAX]; | ||||
int (*tfb_tcp_output)(struct tcpcb *); | int (*tfb_tcp_output)(struct tcpcb *); | ||||
void (*tfb_tcp_do_segment)(struct mbuf *, struct tcphdr *, | void (*tfb_tcp_do_segment)(struct mbuf *, struct tcphdr *, | ||||
struct socket *, struct tcpcb *, | struct socket *, struct tcpcb *, | ||||
int, int, uint8_t, | int, int, uint8_t, | ||||
int); | int); | ||||
int (*tfb_tcp_ctloutput)(struct socket *so, struct sockopt *sopt, | int (*tfb_tcp_ctloutput)(struct socket *so, struct sockopt *sopt, | ||||
struct inpcb *inp, struct tcpcb *tp); | struct inpcb *inp, struct tcpcb *tp); | ||||
/* Optional memory allocation/free routine */ | /* Optional memory allocation/free routine */ | ||||
void (*tfb_tcp_fb_init)(struct tcpcb *); | void (*tfb_tcp_fb_init)(struct tcpcb *); | ||||
void (*tfb_tcp_fb_fini)(struct tcpcb *); | void (*tfb_tcp_fb_fini)(struct tcpcb *); | ||||
/* Optional timers, must define all if you define one */ | /* Optional timers, must define all if you define one */ | ||||
int (*tfb_tcp_timer_stop_all)(struct tcpcb *); | int (*tfb_tcp_timer_stop_all)(struct tcpcb *); | ||||
int (*tfb_tcp_timers_left)(struct tcpcb *); | |||||
void (*tfb_tcp_timer_activate)(struct tcpcb *, | void (*tfb_tcp_timer_activate)(struct tcpcb *, | ||||
uint32_t, u_int); | uint32_t, u_int); | ||||
int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); | int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); | ||||
void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); | void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); | ||||
volatile uint32_t tfb_refcnt; | volatile uint32_t tfb_refcnt; | ||||
uint32_t tfb_flags; | uint32_t tfb_flags; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 743 Lines • Show Last 20 Lines |