#define pr_fmt(fmt) …
#include <linux/skbuff.h>
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/ip.h>
#include <linux/gfp.h>
#include <net/sock.h>
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>
#include <net/sctp/stream_sched.h>
static int sctp_cmd_interpreter(enum sctp_event_type event_type,
union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep,
struct sctp_association *asoc,
void *event_arg,
enum sctp_disposition status,
struct sctp_cmd_seq *commands,
gfp_t gfp);
static int sctp_side_effects(enum sctp_event_type event_type,
union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep,
struct sctp_association **asoc,
void *event_arg,
enum sctp_disposition status,
struct sctp_cmd_seq *commands,
gfp_t gfp);
static void sctp_do_ecn_ce_work(struct sctp_association *asoc,
__u32 lowest_tsn)
{ … }
static struct sctp_chunk *sctp_do_ecn_ecne_work(struct sctp_association *asoc,
__u32 lowest_tsn,
struct sctp_chunk *chunk)
{ … }
static void sctp_do_ecn_cwr_work(struct sctp_association *asoc,
__u32 lowest_tsn)
{ … }
static int sctp_gen_sack(struct sctp_association *asoc, int force,
struct sctp_cmd_seq *commands)
{ … }
void sctp_generate_t3_rtx_event(struct timer_list *t)
{ … }
static void sctp_generate_timeout_event(struct sctp_association *asoc,
enum sctp_event_timeout timeout_type)
{ … }
static void sctp_generate_t1_cookie_event(struct timer_list *t)
{ … }
static void sctp_generate_t1_init_event(struct timer_list *t)
{ … }
static void sctp_generate_t2_shutdown_event(struct timer_list *t)
{ … }
static void sctp_generate_t4_rto_event(struct timer_list *t)
{ … }
static void sctp_generate_t5_shutdown_guard_event(struct timer_list *t)
{ … }
static void sctp_generate_autoclose_event(struct timer_list *t)
{ … }
void sctp_generate_heartbeat_event(struct timer_list *t)
{ … }
void sctp_generate_proto_unreach_event(struct timer_list *t)
{ … }
void sctp_generate_reconf_event(struct timer_list *t)
{ … }
void sctp_generate_probe_event(struct timer_list *t)
{ … }
static void sctp_generate_sack_event(struct timer_list *t)
{ … }
sctp_timer_event_t *sctp_timer_events[SCTP_NUM_TIMEOUT_TYPES] = …;
static void sctp_do_8_2_transport_strike(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
struct sctp_transport *transport,
int is_hb)
{ … }
static void sctp_cmd_init_failed(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
unsigned int error)
{ … }
static void sctp_cmd_assoc_failed(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
enum sctp_event_type event_type,
union sctp_subtype subtype,
struct sctp_chunk *chunk,
unsigned int error)
{ … }
static int sctp_cmd_process_init(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
struct sctp_chunk *chunk,
struct sctp_init_chunk *peer_init,
gfp_t gfp)
{ … }
static void sctp_cmd_hb_timers_start(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_hb_timers_stop(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_t3_rtx_timers_stop(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_transport_on(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_transport *t,
struct sctp_chunk *chunk)
{ … }
static int sctp_cmd_process_sack(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk)
{ … }
static void sctp_cmd_setup_t2(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk)
{ … }
static void sctp_cmd_new_state(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
enum sctp_state state)
{ … }
static void sctp_cmd_delete_tcb(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_setup_t4(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk)
{ … }
static void sctp_cmd_process_operr(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk)
{ … }
static void sctp_cmd_del_non_primary(struct sctp_association *asoc)
{ … }
static void sctp_cmd_set_sk_err(struct sctp_association *asoc, int error)
{ … }
static void sctp_cmd_assoc_change(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
u8 state)
{ … }
static void sctp_cmd_peer_no_auth(struct sctp_cmd_seq *commands,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_adaptation_ind(struct sctp_cmd_seq *commands,
struct sctp_association *asoc)
{ … }
static void sctp_cmd_t1_timer_update(struct sctp_association *asoc,
enum sctp_event_timeout timer,
char *name)
{ … }
static void sctp_cmd_send_msg(struct sctp_association *asoc,
struct sctp_datamsg *msg, gfp_t gfp)
{ … }
#define debug_pre_sfn() …
#define debug_post_sfn() …
#define debug_post_sfx() …
int sctp_do_sm(struct net *net, enum sctp_event_type event_type,
union sctp_subtype subtype, enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_association *asoc,
void *event_arg, gfp_t gfp)
{ … }
static int sctp_side_effects(enum sctp_event_type event_type,
union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep,
struct sctp_association **asoc,
void *event_arg,
enum sctp_disposition status,
struct sctp_cmd_seq *commands,
gfp_t gfp)
{ … }
static int sctp_cmd_interpreter(enum sctp_event_type event_type,
union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep,
struct sctp_association *asoc,
void *event_arg,
enum sctp_disposition status,
struct sctp_cmd_seq *commands,
gfp_t gfp)
{ … }