webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions | Variables
sctputil.c File Reference
#include <netinet/sctp_os.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_var.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_uio.h>
#include <netinet/sctp_timer.h>
#include <netinet/sctp_indata.h>
#include <netinet/sctp_auth.h>
#include <netinet/sctp_asconf.h>
#include <netinet/sctp_bsd_addr.h>

Macros

#define KTR_SCTP   KTR_SUBSYS
 

Functions

void sctp_sblog (struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr)
 
void sctp_log_closing (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc)
 
void rto_logging (struct sctp_nets *net, int from)
 
void sctp_log_strm_del_alt (struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16_t stream, int from)
 
void sctp_log_nagle_event (struct sctp_tcb *stcb, int action)
 
void sctp_log_sack (uint32_t old_cumack, uint32_t cumack, uint32_t tsn, uint16_t gaps, uint16_t dups, int from)
 
void sctp_log_map (uint32_t map, uint32_t cum, uint32_t high, int from)
 
void sctp_log_fr (uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int from)
 
void sctp_log_strm_del (struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from)
 
void sctp_log_cwnd (struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from)
 
void sctp_log_lock (struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from)
 
void sctp_log_maxburst (struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from)
 
void sctp_log_rwnd (uint8_t from, uint32_t peers_rwnd, uint32_t snd_size, uint32_t overhead)
 
void sctp_log_rwnd_set (uint8_t from, uint32_t peers_rwnd, uint32_t flight_size, uint32_t overhead, uint32_t a_rwndval)
 
void sctp_misc_ints (uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d)
 
void sctp_wakeup_log (struct sctp_tcb *stcb, uint32_t wake_cnt, int from)
 
void sctp_log_block (uint8_t from, struct sctp_association *asoc, size_t sendlen)
 
int sctp_fill_stat_log (void *optval SCTP_UNUSED, size_t *optsize SCTP_UNUSED)
 
void sctp_stop_timers_for_shutdown (struct sctp_tcb *stcb)
 
uint32_t sctp_get_prev_mtu (uint32_t val)
 
uint32_t sctp_get_next_mtu (uint32_t val)
 
void sctp_fill_random_store (struct sctp_pcb *m)
 
uint32_t sctp_select_initial_TSN (struct sctp_pcb *inp)
 
uint32_t sctp_select_a_tag (struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check)
 
int32_t sctp_map_assoc_state (int kernel_state)
 
int sctp_init_asoc (struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint32_t override_tag, uint32_t vrf_id, uint16_t o_strms)
 
void sctp_print_mapping_array (struct sctp_association *asoc)
 
int sctp_expand_mapping_array (struct sctp_association *asoc, uint32_t needed)
 
void sctp_iterator_worker (void)
 
void sctp_timeout_handler (void *t)
 
void sctp_timer_start (int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net)
 
void sctp_timer_stop (int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t from)
 
uint32_t sctp_calculate_len (struct mbuf *m)
 
void sctp_mtu_size_reset (struct sctp_inpcb *inp, struct sctp_association *asoc, uint32_t mtu)
 
uint32_t sctp_calculate_rto (struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_nets *net, struct timeval *told, int safe, int rtt_from_sack)
 
caddr_t sctp_m_getptr (struct mbuf *m, int off, int len, uint8_t *in_ptr)
 
struct sctp_paramhdrsctp_get_next_param (struct mbuf *m, int offset, struct sctp_paramhdr *pull, int pull_limit)
 
struct mbufsctp_add_pad_tombuf (struct mbuf *m, int padlen)
 
struct mbufsctp_pad_lastmbuf (struct mbuf *m, int padval, struct mbuf *last_mbuf)
 
void sctp_notify_stream_reset_add (struct sctp_tcb *stcb, uint16_t numberin, uint16_t numberout, int flag)
 
void sctp_notify_stream_reset_tsn (struct sctp_tcb *stcb, uint32_t sending_tsn, uint32_t recv_tsn, int flag)
 
void sctp_ulp_notify (uint32_t notification, struct sctp_tcb *stcb, uint32_t error, void *data, int so_locked SCTP_UNUSED)
 
void sctp_report_all_outbound (struct sctp_tcb *stcb, uint16_t error, int holds_lock, int so_locked SCTP_UNUSED)
 
void sctp_abort_notification (struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, struct sctp_abort_chunk *abort, int so_locked SCTP_UNUSED)
 
void sctp_abort_association (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *m, int iphlen, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct mbuf *op_err, uint32_t vrf_id, uint16_t port)
 
void sctp_abort_an_association (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct mbuf *op_err, int so_locked SCTP_UNUSED)
 
void sctp_handle_ootb (struct mbuf *m, int iphlen, int offset, struct sockaddr *src, struct sockaddr *dst, struct sctphdr *sh, struct sctp_inpcb *inp, struct mbuf *cause, uint32_t vrf_id, uint16_t port)
 
int sctp_is_there_an_abort_here (struct mbuf *m, int iphlen, uint32_t *vtagfill)
 
int sctp_cmpaddr (struct sockaddr *sa1, struct sockaddr *sa2)
 
void sctp_print_address (struct sockaddr *sa)
 
void sctp_pull_off_control_to_new_inp (struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, struct sctp_tcb *stcb, int waitflags)
 
void sctp_wakeup_the_read_socket (struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked SCTP_UNUSED)
 
void sctp_add_to_readq (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_queued_to_read *control, struct sockbuf *sb, int end, int inp_read_lock_held, int so_locked SCTP_UNUSED)
 
struct mbufsctp_generate_cause (uint16_t code, char *info)
 
struct mbufsctp_generate_no_user_data_cause (uint32_t tsn)
 
int sctp_release_pr_sctp_chunk (struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, uint8_t sent, int so_locked SCTP_UNUSED)
 
struct sctp_ifasctp_find_ifa_in_ep (struct sctp_inpcb *inp, struct sockaddr *addr, int holds_lock)
 
uint32_t sctp_get_ifa_hash_val (struct sockaddr *addr)
 
struct sctp_ifasctp_find_ifa_by_addr (struct sockaddr *addr, uint32_t vrf_id, int holds_lock)
 
int sctp_sorecvmsg (struct socket *so, struct uio *uio, struct mbuf **mp, struct sockaddr *from, int fromlen, int *msg_flags, struct sctp_sndrcvinfo *sinfo, int filling_sinfo)
 
int sctp_dynamic_set_primary (struct sockaddr *sa, uint32_t vrf_id)
 
int sctp_soreceive (struct socket *so, struct sockaddr **psa, struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, int *flagsp)
 
int sctp_connectx_helper_add (struct sctp_tcb *stcb, struct sockaddr *addr, int totaddr, int *error)
 
struct sctp_tcbsctp_connectx_helper_find (struct sctp_inpcb *inp, struct sockaddr *addr, unsigned int *totaddr, unsigned int *num_v4, unsigned int *num_v6, int *error, unsigned int limit, int *bad_addr)
 
void sctp_bindx_add_address (struct socket *so, struct sctp_inpcb *inp, struct sockaddr *sa, sctp_assoc_t assoc_id, uint32_t vrf_id, int *error, void *p)
 
void sctp_bindx_delete_address (struct sctp_inpcb *inp, struct sockaddr *sa, sctp_assoc_t assoc_id, uint32_t vrf_id, int *error)
 
int sctp_local_addr_count (struct sctp_tcb *stcb)
 

Variables

const struct sctp_cc_functions sctp_cc_functions []
 
const struct sctp_ss_functions sctp_ss_functions []
 

Macro Definition Documentation

◆ KTR_SCTP

#define KTR_SCTP   KTR_SUBSYS

Function Documentation

◆ rto_logging()

void rto_logging ( struct sctp_nets net,
int  from 
)

◆ sctp_abort_an_association()

void sctp_abort_an_association ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct mbuf op_err,
int so_locked  SCTP_UNUSED 
)

◆ sctp_abort_association()

void sctp_abort_association ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct mbuf m,
int  iphlen,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct mbuf op_err,
uint32_t  vrf_id,
uint16_t  port 
)

◆ sctp_abort_notification()

void sctp_abort_notification ( struct sctp_tcb stcb,
uint8_t  from_peer,
uint16_t  error,
struct sctp_abort_chunk abort,
int so_locked  SCTP_UNUSED 
)

◆ sctp_add_pad_tombuf()

struct mbuf* sctp_add_pad_tombuf ( struct mbuf m,
int  padlen 
)

◆ sctp_add_to_readq()

void sctp_add_to_readq ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct sctp_queued_to_read control,
struct sockbuf *  sb,
int  end,
int  inp_read_lock_held,
int so_locked  SCTP_UNUSED 
)

◆ sctp_bindx_add_address()

void sctp_bindx_add_address ( struct socket so,
struct sctp_inpcb inp,
struct sockaddr *  sa,
sctp_assoc_t  assoc_id,
uint32_t  vrf_id,
int *  error,
void p 
)

◆ sctp_bindx_delete_address()

void sctp_bindx_delete_address ( struct sctp_inpcb inp,
struct sockaddr *  sa,
sctp_assoc_t  assoc_id,
uint32_t  vrf_id,
int *  error 
)

◆ sctp_calculate_len()

uint32_t sctp_calculate_len ( struct mbuf m)

◆ sctp_calculate_rto()

uint32_t sctp_calculate_rto ( struct sctp_tcb stcb,
struct sctp_association asoc,
struct sctp_nets net,
struct timeval *  told,
int  safe,
int  rtt_from_sack 
)

◆ sctp_cmpaddr()

int sctp_cmpaddr ( struct sockaddr *  sa1,
struct sockaddr *  sa2 
)

◆ sctp_connectx_helper_add()

int sctp_connectx_helper_add ( struct sctp_tcb stcb,
struct sockaddr *  addr,
int  totaddr,
int *  error 
)

◆ sctp_connectx_helper_find()

struct sctp_tcb* sctp_connectx_helper_find ( struct sctp_inpcb inp,
struct sockaddr *  addr,
unsigned int *  totaddr,
unsigned int *  num_v4,
unsigned int *  num_v6,
int *  error,
unsigned int  limit,
int *  bad_addr 
)

◆ sctp_dynamic_set_primary()

int sctp_dynamic_set_primary ( struct sockaddr *  sa,
uint32_t  vrf_id 
)

◆ sctp_expand_mapping_array()

int sctp_expand_mapping_array ( struct sctp_association asoc,
uint32_t  needed 
)

◆ sctp_fill_random_store()

void sctp_fill_random_store ( struct sctp_pcb m)

◆ sctp_fill_stat_log()

int sctp_fill_stat_log ( void *optval  SCTP_UNUSED,
size_t *optsize  SCTP_UNUSED 
)

◆ sctp_find_ifa_by_addr()

struct sctp_ifa* sctp_find_ifa_by_addr ( struct sockaddr *  addr,
uint32_t  vrf_id,
int  holds_lock 
)

◆ sctp_find_ifa_in_ep()

struct sctp_ifa* sctp_find_ifa_in_ep ( struct sctp_inpcb inp,
struct sockaddr *  addr,
int  holds_lock 
)

◆ sctp_generate_cause()

struct mbuf* sctp_generate_cause ( uint16_t  code,
char *  info 
)

◆ sctp_generate_no_user_data_cause()

struct mbuf* sctp_generate_no_user_data_cause ( uint32_t  tsn)

◆ sctp_get_ifa_hash_val()

uint32_t sctp_get_ifa_hash_val ( struct sockaddr *  addr)

◆ sctp_get_next_mtu()

uint32_t sctp_get_next_mtu ( uint32_t  val)

◆ sctp_get_next_param()

struct sctp_paramhdr* sctp_get_next_param ( struct mbuf m,
int  offset,
struct sctp_paramhdr pull,
int  pull_limit 
)

◆ sctp_get_prev_mtu()

uint32_t sctp_get_prev_mtu ( uint32_t  val)

◆ sctp_handle_ootb()

void sctp_handle_ootb ( struct mbuf m,
int  iphlen,
int  offset,
struct sockaddr *  src,
struct sockaddr *  dst,
struct sctphdr sh,
struct sctp_inpcb inp,
struct mbuf cause,
uint32_t  vrf_id,
uint16_t  port 
)

◆ sctp_init_asoc()

int sctp_init_asoc ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
uint32_t  override_tag,
uint32_t  vrf_id,
uint16_t  o_strms 
)

◆ sctp_is_there_an_abort_here()

int sctp_is_there_an_abort_here ( struct mbuf m,
int  iphlen,
uint32_t vtagfill 
)

◆ sctp_iterator_worker()

void sctp_iterator_worker ( void  )

◆ sctp_local_addr_count()

int sctp_local_addr_count ( struct sctp_tcb stcb)

◆ sctp_log_block()

void sctp_log_block ( uint8_t  from,
struct sctp_association asoc,
size_t  sendlen 
)

◆ sctp_log_closing()

void sctp_log_closing ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
int16_t  loc 
)

◆ sctp_log_cwnd()

void sctp_log_cwnd ( struct sctp_tcb stcb,
struct sctp_nets net,
int  augment,
uint8_t  from 
)

◆ sctp_log_fr()

void sctp_log_fr ( uint32_t  biggest_tsn,
uint32_t  biggest_new_tsn,
uint32_t  tsn,
int  from 
)

◆ sctp_log_lock()

void sctp_log_lock ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
uint8_t  from 
)

◆ sctp_log_map()

void sctp_log_map ( uint32_t  map,
uint32_t  cum,
uint32_t  high,
int  from 
)

◆ sctp_log_maxburst()

void sctp_log_maxburst ( struct sctp_tcb stcb,
struct sctp_nets net,
int  error,
int  burst,
uint8_t  from 
)

◆ sctp_log_nagle_event()

void sctp_log_nagle_event ( struct sctp_tcb stcb,
int  action 
)

◆ sctp_log_rwnd()

void sctp_log_rwnd ( uint8_t  from,
uint32_t  peers_rwnd,
uint32_t  snd_size,
uint32_t  overhead 
)

◆ sctp_log_rwnd_set()

void sctp_log_rwnd_set ( uint8_t  from,
uint32_t  peers_rwnd,
uint32_t  flight_size,
uint32_t  overhead,
uint32_t  a_rwndval 
)

◆ sctp_log_sack()

void sctp_log_sack ( uint32_t  old_cumack,
uint32_t  cumack,
uint32_t  tsn,
uint16_t  gaps,
uint16_t  dups,
int  from 
)

◆ sctp_log_strm_del()

void sctp_log_strm_del ( struct sctp_queued_to_read control,
struct sctp_queued_to_read poschk,
int  from 
)

◆ sctp_log_strm_del_alt()

void sctp_log_strm_del_alt ( struct sctp_tcb stcb,
uint32_t  tsn,
uint16_t  sseq,
uint16_t  stream,
int  from 
)

◆ sctp_m_getptr()

caddr_t sctp_m_getptr ( struct mbuf m,
int  off,
int  len,
uint8_t in_ptr 
)

◆ sctp_map_assoc_state()

int32_t sctp_map_assoc_state ( int  kernel_state)

◆ sctp_misc_ints()

void sctp_misc_ints ( uint8_t  from,
uint32_t  a,
uint32_t  b,
uint32_t  c,
uint32_t  d 
)

◆ sctp_mtu_size_reset()

void sctp_mtu_size_reset ( struct sctp_inpcb inp,
struct sctp_association asoc,
uint32_t  mtu 
)

◆ sctp_notify_stream_reset_add()

void sctp_notify_stream_reset_add ( struct sctp_tcb stcb,
uint16_t  numberin,
uint16_t  numberout,
int  flag 
)

◆ sctp_notify_stream_reset_tsn()

void sctp_notify_stream_reset_tsn ( struct sctp_tcb stcb,
uint32_t  sending_tsn,
uint32_t  recv_tsn,
int  flag 
)

◆ sctp_pad_lastmbuf()

struct mbuf* sctp_pad_lastmbuf ( struct mbuf m,
int  padval,
struct mbuf last_mbuf 
)

◆ sctp_print_address()

void sctp_print_address ( struct sockaddr *  sa)

◆ sctp_print_mapping_array()

void sctp_print_mapping_array ( struct sctp_association asoc)

◆ sctp_pull_off_control_to_new_inp()

void sctp_pull_off_control_to_new_inp ( struct sctp_inpcb old_inp,
struct sctp_inpcb new_inp,
struct sctp_tcb stcb,
int  waitflags 
)

◆ sctp_release_pr_sctp_chunk()

int sctp_release_pr_sctp_chunk ( struct sctp_tcb stcb,
struct sctp_tmit_chunk tp1,
uint8_t  sent,
int so_locked  SCTP_UNUSED 
)

◆ sctp_report_all_outbound()

void sctp_report_all_outbound ( struct sctp_tcb stcb,
uint16_t  error,
int  holds_lock,
int so_locked  SCTP_UNUSED 
)

◆ sctp_sblog()

void sctp_sblog ( struct sockbuf *  sb,
struct sctp_tcb stcb,
int  from,
int  incr 
)

◆ sctp_select_a_tag()

uint32_t sctp_select_a_tag ( struct sctp_inpcb inp,
uint16_t  lport,
uint16_t  rport,
int  check 
)

◆ sctp_select_initial_TSN()

uint32_t sctp_select_initial_TSN ( struct sctp_pcb inp)

◆ sctp_soreceive()

int sctp_soreceive ( struct socket so,
struct sockaddr **  psa,
struct uio uio,
struct mbuf **  mp0,
struct mbuf **  controlp,
int *  flagsp 
)

◆ sctp_sorecvmsg()

int sctp_sorecvmsg ( struct socket so,
struct uio uio,
struct mbuf **  mp,
struct sockaddr *  from,
int  fromlen,
int *  msg_flags,
struct sctp_sndrcvinfo sinfo,
int  filling_sinfo 
)

◆ sctp_stop_timers_for_shutdown()

void sctp_stop_timers_for_shutdown ( struct sctp_tcb stcb)

◆ sctp_timeout_handler()

void sctp_timeout_handler ( void t)

◆ sctp_timer_start()

void sctp_timer_start ( int  t_type,
struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct sctp_nets net 
)

◆ sctp_timer_stop()

void sctp_timer_stop ( int  t_type,
struct sctp_inpcb inp,
struct sctp_tcb stcb,
struct sctp_nets net,
uint32_t  from 
)

◆ sctp_ulp_notify()

void sctp_ulp_notify ( uint32_t  notification,
struct sctp_tcb stcb,
uint32_t  error,
void data,
int so_locked  SCTP_UNUSED 
)

◆ sctp_wakeup_log()

void sctp_wakeup_log ( struct sctp_tcb stcb,
uint32_t  wake_cnt,
int  from 
)

◆ sctp_wakeup_the_read_socket()

void sctp_wakeup_the_read_socket ( struct sctp_inpcb inp,
struct sctp_tcb stcb,
int so_locked  SCTP_UNUSED 
)

Variable Documentation

◆ sctp_cc_functions

◆ sctp_ss_functions