38#ifndef _NETINET_SCTP_PCB_H_
39#define _NETINET_SCTP_PCB_H_
59#define SCTP_PCBHASH_ALLADDR(port, mask) (port & mask)
60#define SCTP_PCBHASH_ASOC(tag, mask) (tag & mask)
93#define SCTP_ADDR_VALID 0x00000001
94#define SCTP_BEING_DELETED 0x00000002
101#define SCTP_ADDR_DEFER_USE 0x00000004
102#define SCTP_ADDR_IFA_UNUSEABLE 0x00000008
149 struct socket *udp4_tun_socket;
152 struct socket *udp6_tun_socket;
247#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
255#if defined(SCTP_PACKET_LOGGING)
256 int packet_log_writers;
337#ifndef SCTP_ALIGNMENT
338#define SCTP_ALIGNMENT 32
342#define SCTP_ALIGNM1 (SCTP_ALIGNMENT-1)
345#define sctp_lport ip_inp.inp.inp_lport
354#define SCTP_READ_LOG_SIZE 135
395#ifdef SCTP_TRACK_FREED_ASOCS
396 struct sctpasochead sctp_asoc_free_list;
437#ifdef SCTP_ASOCLOG_OF_TSNS
473#if defined(_KERNEL) || defined(__Userspace__)
482int SCTP6_ARE_ADDR_EQUAL(
struct sockaddr_in6 *a,
struct sockaddr_in6 *b);
509 void *
ifa,
struct sockaddr *addr,
uint32_t ifa_flags,
519 uint32_t ifn_index,
const char *if_name);
527 struct sctp_ifa *,
struct thread *);
530 struct sctp_ifa *,
struct thread *);
534 struct sockaddr *,
struct sockaddr *,
554 struct sockaddr *,
struct sctp_nets **,
struct sockaddr *,
573#define SCTP_DONT_INITIALIZE_AUTH_PARAMS 0
574#define SCTP_INITIALIZE_AUTH_PARAMS 1
579 struct thread *,
int);
583 struct thread *,
int);
606 struct sockaddr *,
struct sockaddr *,
struct sockaddr *,
uint16_t);
637#if defined(SCTP_MCORE_INPUT) && defined(SMP)
639 sctp_queue_to_mcore(
struct mbuf *m,
int off,
int cpu_to_use);
#define SCTP_PACKET_LOG_SIZE
#define SCTP_STACK_VTAG_HASH_SIZE
#define SCTP_NUMBER_OF_SECRETS
#define SCTP_HOW_MANY_SECRETS
#define SCTP_SIGNATURE_ALOC_SIZE
#define SCTP_NUMBER_IN_VTAG_BLOCK
struct uma_zone * sctp_zone_t
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
struct sctp_tcb * sctp_findassociation_ep_addr(struct sctp_inpcb **, struct sockaddr *, struct sctp_nets **, struct sockaddr *, struct sctp_tcb *)
int sctp_inpcb_bind(struct socket *, struct sockaddr *, struct sctp_ifa *, struct thread *)
void sctp_add_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *)
int sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int, int, struct sockaddr *, struct sockaddr *, struct sockaddr *, uint16_t)
int sctp_inpcb_bind_locked(struct sctp_inpcb *, struct sockaddr *, struct sctp_ifa *, struct thread *)
int sctp_is_address_on_local_host(struct sockaddr *addr, uint32_t vrf_id)
struct sctp_tcb * sctp_findasoc_ep_asocid_locked(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
void sctp_pcb_finish(void)
VNET_DECLARE(struct sctp_base_info, system_base_info)
void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
struct sctp_tcb * sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *, int *, uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, struct thread *, int)
void sctp_del_local_addr_ep(struct sctp_inpcb *, struct sctp_ifa *)
struct sctp_vrf * sctp_find_vrf(uint32_t vrfid)
struct sctp_tcb * sctp_findassociation_addr(struct mbuf *, int, struct sockaddr *, struct sockaddr *, struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id)
struct sctp_inpcb * sctp_pcb_findep(struct sockaddr *, int, int, uint32_t)
struct sctp_nets * sctp_findnet(struct sctp_tcb *, struct sockaddr *)
LIST_HEAD(sctppcbhead, sctp_inpcb)
void sctp_move_pcb_and_assoc(struct sctp_inpcb *, struct sctp_inpcb *, struct sctp_tcb *)
int sctp_add_remote_addr(struct sctp_tcb *, struct sockaddr *, struct sctp_nets **, uint16_t, int, int)
struct sctp_tcb * sctp_aloc_assoc_connected(struct sctp_inpcb *, struct sockaddr *, int *, uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, struct thread *, int)
void sctp_free_ifa(struct sctp_ifa *sctp_ifap)
int sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *, struct sctp_nets *)
int sctp_del_remote_addr(struct sctp_tcb *, struct sockaddr *)
void sctp_fill_pcbinfo(struct sctp_pcbinfo *)
struct sctp_tcb * sctp_findassociation_addr_sa(struct sockaddr *, struct sockaddr *, struct sctp_inpcb **, struct sctp_nets **, int, uint32_t)
void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index)
void sctp_remove_net(struct sctp_tcb *, struct sctp_nets *)
void sctp_del_addr_from_vrf(uint32_t vrfid, struct sockaddr *addr, uint32_t ifn_index, const char *if_name)
struct sctp_ifa * sctp_add_addr_to_vrf(uint32_t vrfid, void *ifn, uint32_t ifn_index, uint32_t ifn_type, const char *if_name, void *ifa, struct sockaddr *addr, uint32_t ifa_flags, int dynamic_add)
bool sctp_is_vtag_good(uint32_t, uint16_t lport, uint16_t rport, struct timeval *)
#define SCTP_READ_LOG_SIZE
int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int)
void sctp_free_ifn(struct sctp_ifn *sctp_ifnp)
struct sctp_tcb * sctp_findassociation_ep_asconf(struct mbuf *, int, struct sockaddr *, struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id)
int sctp_swap_inpcb_for_listen(struct sctp_inpcb *inp)
TAILQ_HEAD(sctp_readhead, sctp_queued_to_read)
int sctp_initiate_iterator(inp_func inpf, asoc_func af, inp_func inpe, uint32_t, uint32_t, uint32_t, void *, uint32_t, end_func ef, struct sctp_inpcb *, uint8_t co_off)
void sctp_del_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *)
struct sctp_ifn * sctp_find_ifn(void *ifn, uint32_t ifn_index)
void sctp_clean_up_stream(struct sctp_tcb *stcb, struct sctp_readhead *rh)
struct sctp_vrf * sctp_allocate_vrf(int vrfid)
void sctp_inpcb_free(struct sctp_inpcb *, int, int)
int sctp_destination_is_reachable(struct sctp_tcb *, struct sockaddr *)
void sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu)
void sctp_free_vrf(struct sctp_vrf *vrf)
struct sctp_tcb * sctp_findassociation_ep_asocid(struct sctp_inpcb *, sctp_assoc_t, int)
void sctp_add_local_addr_ep(struct sctp_inpcb *, struct sctp_ifa *, uint32_t)
void(* asoc_func)(struct sctp_inpcb *, struct sctp_tcb *, void *ptr, uint32_t val)
int(* inp_func)(struct sctp_inpcb *, void *ptr, uint32_t val)
void(* end_func)(void *ptr, uint32_t val)
struct sctp_sysctl sctpsysctl
char sctp_pcb_initialized
struct sctp_epinfo sctppcbinfo
struct mtx ipi_pktlog_mtx
struct sctp_vrflist * sctp_vrfhash
sctp_zone_t ipi_zone_readq
struct sctpasochead * sctp_asochash
sctp_zone_t ipi_zone_strmoq
struct mtx ipi_iterator_wq_mtx
uint32_t ipi_count_strmoq
struct sctppcbhead listhead
struct sctppcbhead * sctp_ephash
sctp_zone_t ipi_zone_asconf_ack
struct rwlock ipi_addr_mtx
sctp_zone_t ipi_zone_laddr
sctp_zone_t ipi_zone_chunk
struct sctpvtaghead vtag_timewait[SCTP_STACK_VTAG_HASH_SIZE]
struct sctp_ifnlist * vrf_ifn_hash
sctp_zone_t ipi_zone_asoc
struct sctppcbhead * sctp_tcpephash
sctp_zone_t ipi_zone_asconf
struct sctp_timer addr_wq_timer
union sctp_sockstore address
LIST_ENTRY(sctp_ifa) next_ifa
LIST_ENTRY(sctp_ifn) next_ifn
LIST_ENTRY(sctp_ifn) next_bucket
struct sctp_ifalist ifalist
char ifn_name[SCTP_IFNAMSIZ]
uint32_t partial_delivery_point
struct mtx inp_create_mtx
char align[(sizeof(struct inpcb)+SCTP_ALIGNM1) &~SCTP_ALIGNM1]
struct socket * sctp_socket
union sctp_inpcb::@33 ip_inp
struct sctpasochead sctp_asoc_list
uint8_t reconfig_supported
uint32_t sctp_mobility_features
struct sctp_readhead read_queue
struct sctpasochead * sctp_tcbhash
struct sctp_nonpad_sndrcvinfo def_send
struct sctpladdr sctp_addr_list
LIST_ENTRY(sctp_inpcb) sctp_list
struct sctp_laddr * next_addr_touse
uint32_t sctp_associd_counter
struct sctpasochead * sctp_asocidhash
uint8_t pktdrop_supported
uint8_t local_strreset_support
LIST_ENTRY(sctp_laddr) sctp_nxt_addr
struct timeval start_time
uint32_t initial_init_rto_max
uint32_t secret_key[SCTP_HOW_MANY_SECRETS][SCTP_NUMBER_OF_SECRETS]
uint32_t sctp_sws_receiver
char current_secret_number
uint8_t random_numbers[SCTP_SIGNATURE_ALOC_SIZE]
uint32_t sctp_default_ss_module
struct sctp_keyhead shared_keys
struct sctp_timer signature_change
uint32_t initial_sequence_debug
sctp_auth_chklist_t * local_auth_chunks
uint16_t pre_open_stream_count
unsigned int sctp_sack_freq
uint16_t def_net_pf_threshold
unsigned int time_of_secret_change
uint32_t adaptation_layer_indicator
sctp_hmaclist_t * local_hmacs
uint16_t max_open_streams_intome
uint8_t random_store[SCTP_SIGNATURE_ALOC_SIZE]
uint32_t sctp_default_cc_module
uint32_t sctp_timeoutticks[SCTP_NUM_TMRS]
unsigned int size_of_a_cookie
uint8_t adaptation_layer_indicator_provided
LIST_ENTRY(sctp_tagblock) sctp_nxt_tagblock
struct sctp_timewait vtag_block[SCTP_NUMBER_IN_VTAG_BLOCK]
struct socket * sctp_socket
uint32_t freed_by_sorcv_sincelast
LIST_ENTRY(sctp_tcb) sctp_asocs
struct sctp_association asoc
LIST_ENTRY(sctp_tcb) sctp_tcbhash
struct sctp_block_entry * block_entry
struct sctp_inpcb * sctp_ep
uint32_t tv_sec_at_expire
struct sctp_ifnlist ifnlist
LIST_ENTRY(sctp_vrf) next_vrf
struct sctp_ifalist * vrf_addr_hash