Commit 1afec92b authored by David S. Miller's avatar David S. Miller

Merge branch 'sctp-remove-typedefs-from-structures-part-5'

Xin Long says:

====================
sctp: remove typedefs from structures part 5

As we know, typedef is suggested not to use in kernel, even checkpatch.pl
also gives warnings about it. Now sctp is using it for many structures.

All this kind of typedef's using should be removed. This patchset is the
part 5 to remove all typedefs in include/net/sctp/constants.h.

Just as the part 1-4, No any code's logic would be changed in these patches,
only cleaning up.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1126f470 bfc6f827
...@@ -126,8 +126,8 @@ typedef union { ...@@ -126,8 +126,8 @@ typedef union {
__u8 u8; __u8 u8;
int error; int error;
__be16 err; __be16 err;
sctp_state_t state; enum sctp_state state;
sctp_event_timeout_t to; enum sctp_event_timeout to;
struct sctp_chunk *chunk; struct sctp_chunk *chunk;
struct sctp_association *asoc; struct sctp_association *asoc;
struct sctp_transport *transport; struct sctp_transport *transport;
...@@ -167,8 +167,8 @@ SCTP_ARG_CONSTRUCTOR(U16, __u16, u16) ...@@ -167,8 +167,8 @@ SCTP_ARG_CONSTRUCTOR(U16, __u16, u16)
SCTP_ARG_CONSTRUCTOR(U8, __u8, u8) SCTP_ARG_CONSTRUCTOR(U8, __u8, u8)
SCTP_ARG_CONSTRUCTOR(ERROR, int, error) SCTP_ARG_CONSTRUCTOR(ERROR, int, error)
SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */ SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */
SCTP_ARG_CONSTRUCTOR(STATE, sctp_state_t, state) SCTP_ARG_CONSTRUCTOR(STATE, enum sctp_state, state)
SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to) SCTP_ARG_CONSTRUCTOR(TO, enum sctp_event_timeout, to)
SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk) SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk)
SCTP_ARG_CONSTRUCTOR(ASOC, struct sctp_association *, asoc) SCTP_ARG_CONSTRUCTOR(ASOC, struct sctp_association *, asoc)
SCTP_ARG_CONSTRUCTOR(TRANSPORT, struct sctp_transport *, transport) SCTP_ARG_CONSTRUCTOR(TRANSPORT, struct sctp_transport *, transport)
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <linux/sctp.h> #include <linux/sctp.h>
#include <linux/ipv6.h> /* For ipv6hdr. */ #include <linux/ipv6.h> /* For ipv6hdr. */
#include <net/tcp_states.h> /* For TCP states used in sctp_sock_state_t */ #include <net/tcp_states.h> /* For TCP states used in enum sctp_sock_state */
/* Value used for stream negotiation. */ /* Value used for stream negotiation. */
enum { SCTP_MAX_STREAM = 0xffff }; enum { SCTP_MAX_STREAM = 0xffff };
...@@ -71,20 +71,18 @@ enum { SCTP_DEFAULT_INSTREAMS = SCTP_MAX_STREAM }; ...@@ -71,20 +71,18 @@ enum { SCTP_DEFAULT_INSTREAMS = SCTP_MAX_STREAM };
SCTP_NUM_AUTH_CHUNK_TYPES) SCTP_NUM_AUTH_CHUNK_TYPES)
/* These are the different flavours of event. */ /* These are the different flavours of event. */
typedef enum { enum sctp_event {
SCTP_EVENT_T_CHUNK = 1, SCTP_EVENT_T_CHUNK = 1,
SCTP_EVENT_T_TIMEOUT, SCTP_EVENT_T_TIMEOUT,
SCTP_EVENT_T_OTHER, SCTP_EVENT_T_OTHER,
SCTP_EVENT_T_PRIMITIVE SCTP_EVENT_T_PRIMITIVE
};
} sctp_event_t;
/* As a convenience for the state machine, we append SCTP_EVENT_* and /* As a convenience for the state machine, we append SCTP_EVENT_* and
* SCTP_ULP_* to the list of possible chunks. * SCTP_ULP_* to the list of possible chunks.
*/ */
typedef enum { enum sctp_event_timeout {
SCTP_EVENT_TIMEOUT_NONE = 0, SCTP_EVENT_TIMEOUT_NONE = 0,
SCTP_EVENT_TIMEOUT_T1_COOKIE, SCTP_EVENT_TIMEOUT_T1_COOKIE,
SCTP_EVENT_TIMEOUT_T1_INIT, SCTP_EVENT_TIMEOUT_T1_INIT,
...@@ -96,21 +94,21 @@ typedef enum { ...@@ -96,21 +94,21 @@ typedef enum {
SCTP_EVENT_TIMEOUT_RECONF, SCTP_EVENT_TIMEOUT_RECONF,
SCTP_EVENT_TIMEOUT_SACK, SCTP_EVENT_TIMEOUT_SACK,
SCTP_EVENT_TIMEOUT_AUTOCLOSE, SCTP_EVENT_TIMEOUT_AUTOCLOSE,
} sctp_event_timeout_t; };
#define SCTP_EVENT_TIMEOUT_MAX SCTP_EVENT_TIMEOUT_AUTOCLOSE #define SCTP_EVENT_TIMEOUT_MAX SCTP_EVENT_TIMEOUT_AUTOCLOSE
#define SCTP_NUM_TIMEOUT_TYPES (SCTP_EVENT_TIMEOUT_MAX + 1) #define SCTP_NUM_TIMEOUT_TYPES (SCTP_EVENT_TIMEOUT_MAX + 1)
typedef enum { enum sctp_event_other {
SCTP_EVENT_NO_PENDING_TSN = 0, SCTP_EVENT_NO_PENDING_TSN = 0,
SCTP_EVENT_ICMP_PROTO_UNREACH, SCTP_EVENT_ICMP_PROTO_UNREACH,
} sctp_event_other_t; };
#define SCTP_EVENT_OTHER_MAX SCTP_EVENT_ICMP_PROTO_UNREACH #define SCTP_EVENT_OTHER_MAX SCTP_EVENT_ICMP_PROTO_UNREACH
#define SCTP_NUM_OTHER_TYPES (SCTP_EVENT_OTHER_MAX + 1) #define SCTP_NUM_OTHER_TYPES (SCTP_EVENT_OTHER_MAX + 1)
/* These are primitive requests from the ULP. */ /* These are primitive requests from the ULP. */
typedef enum { enum sctp_event_primitive {
SCTP_PRIMITIVE_ASSOCIATE = 0, SCTP_PRIMITIVE_ASSOCIATE = 0,
SCTP_PRIMITIVE_SHUTDOWN, SCTP_PRIMITIVE_SHUTDOWN,
SCTP_PRIMITIVE_ABORT, SCTP_PRIMITIVE_ABORT,
...@@ -118,7 +116,7 @@ typedef enum { ...@@ -118,7 +116,7 @@ typedef enum {
SCTP_PRIMITIVE_REQUESTHEARTBEAT, SCTP_PRIMITIVE_REQUESTHEARTBEAT,
SCTP_PRIMITIVE_ASCONF, SCTP_PRIMITIVE_ASCONF,
SCTP_PRIMITIVE_RECONF, SCTP_PRIMITIVE_RECONF,
} sctp_event_primitive_t; };
#define SCTP_EVENT_PRIMITIVE_MAX SCTP_PRIMITIVE_RECONF #define SCTP_EVENT_PRIMITIVE_MAX SCTP_PRIMITIVE_RECONF
#define SCTP_NUM_PRIMITIVE_TYPES (SCTP_EVENT_PRIMITIVE_MAX + 1) #define SCTP_NUM_PRIMITIVE_TYPES (SCTP_EVENT_PRIMITIVE_MAX + 1)
...@@ -126,25 +124,25 @@ typedef enum { ...@@ -126,25 +124,25 @@ typedef enum {
/* We define here a utility type for manipulating subtypes. /* We define here a utility type for manipulating subtypes.
* The subtype constructors all work like this: * The subtype constructors all work like this:
* *
* sctp_subtype_t foo = SCTP_ST_CHUNK(SCTP_CID_INIT); * union sctp_subtype foo = SCTP_ST_CHUNK(SCTP_CID_INIT);
*/ */
typedef union { union sctp_subtype {
enum sctp_cid chunk; enum sctp_cid chunk;
sctp_event_timeout_t timeout; enum sctp_event_timeout timeout;
sctp_event_other_t other; enum sctp_event_other other;
sctp_event_primitive_t primitive; enum sctp_event_primitive primitive;
} sctp_subtype_t; };
#define SCTP_SUBTYPE_CONSTRUCTOR(_name, _type, _elt) \ #define SCTP_SUBTYPE_CONSTRUCTOR(_name, _type, _elt) \
static inline sctp_subtype_t \ static inline union sctp_subtype \
SCTP_ST_## _name (_type _arg) \ SCTP_ST_## _name (_type _arg) \
{ sctp_subtype_t _retval; _retval._elt = _arg; return _retval; } { union sctp_subtype _retval; _retval._elt = _arg; return _retval; }
SCTP_SUBTYPE_CONSTRUCTOR(CHUNK, enum sctp_cid, chunk) SCTP_SUBTYPE_CONSTRUCTOR(CHUNK, enum sctp_cid, chunk)
SCTP_SUBTYPE_CONSTRUCTOR(TIMEOUT, sctp_event_timeout_t, timeout) SCTP_SUBTYPE_CONSTRUCTOR(TIMEOUT, enum sctp_event_timeout, timeout)
SCTP_SUBTYPE_CONSTRUCTOR(OTHER, sctp_event_other_t, other) SCTP_SUBTYPE_CONSTRUCTOR(OTHER, enum sctp_event_other, other)
SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive) SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, enum sctp_event_primitive, primitive)
#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA) #define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA)
...@@ -155,8 +153,7 @@ SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive) ...@@ -155,8 +153,7 @@ SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive)
- sizeof(struct sctp_data_chunk))) - sizeof(struct sctp_data_chunk)))
/* Internal error codes */ /* Internal error codes */
typedef enum { enum sctp_ierror {
SCTP_IERROR_NO_ERROR = 0, SCTP_IERROR_NO_ERROR = 0,
SCTP_IERROR_BASE = 1000, SCTP_IERROR_BASE = 1000,
SCTP_IERROR_NO_COOKIE, SCTP_IERROR_NO_COOKIE,
...@@ -177,12 +174,12 @@ typedef enum { ...@@ -177,12 +174,12 @@ typedef enum {
SCTP_IERROR_PROTO_VIOLATION, SCTP_IERROR_PROTO_VIOLATION,
SCTP_IERROR_ERROR, SCTP_IERROR_ERROR,
SCTP_IERROR_ABORT, SCTP_IERROR_ABORT,
} sctp_ierror_t; };
/* SCTP state defines for internal state machine */ /* SCTP state defines for internal state machine */
typedef enum { enum sctp_state {
SCTP_STATE_CLOSED = 0, SCTP_STATE_CLOSED = 0,
SCTP_STATE_COOKIE_WAIT = 1, SCTP_STATE_COOKIE_WAIT = 1,
...@@ -193,7 +190,7 @@ typedef enum { ...@@ -193,7 +190,7 @@ typedef enum {
SCTP_STATE_SHUTDOWN_RECEIVED = 6, SCTP_STATE_SHUTDOWN_RECEIVED = 6,
SCTP_STATE_SHUTDOWN_ACK_SENT = 7, SCTP_STATE_SHUTDOWN_ACK_SENT = 7,
} sctp_state_t; };
#define SCTP_STATE_MAX SCTP_STATE_SHUTDOWN_ACK_SENT #define SCTP_STATE_MAX SCTP_STATE_SHUTDOWN_ACK_SENT
#define SCTP_STATE_NUM_STATES (SCTP_STATE_MAX + 1) #define SCTP_STATE_NUM_STATES (SCTP_STATE_MAX + 1)
...@@ -214,19 +211,19 @@ typedef enum { ...@@ -214,19 +211,19 @@ typedef enum {
* - A socket in SCTP_SS_ESTABLISHED state indicates that it has a single * - A socket in SCTP_SS_ESTABLISHED state indicates that it has a single
* association. * association.
*/ */
typedef enum { enum sctp_sock_state {
SCTP_SS_CLOSED = TCP_CLOSE, SCTP_SS_CLOSED = TCP_CLOSE,
SCTP_SS_LISTENING = TCP_LISTEN, SCTP_SS_LISTENING = TCP_LISTEN,
SCTP_SS_ESTABLISHING = TCP_SYN_SENT, SCTP_SS_ESTABLISHING = TCP_SYN_SENT,
SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, SCTP_SS_ESTABLISHED = TCP_ESTABLISHED,
SCTP_SS_CLOSING = TCP_CLOSE_WAIT, SCTP_SS_CLOSING = TCP_CLOSE_WAIT,
} sctp_sock_state_t; };
/* These functions map various type to printable names. */ /* These functions map various type to printable names. */
const char *sctp_cname(const sctp_subtype_t); /* chunk types */ const char *sctp_cname(const union sctp_subtype id); /* chunk types */
const char *sctp_oname(const sctp_subtype_t); /* other events */ const char *sctp_oname(const union sctp_subtype id); /* other events */
const char *sctp_tname(const sctp_subtype_t); /* timeouts */ const char *sctp_tname(const union sctp_subtype id); /* timeouts */
const char *sctp_pname(const sctp_subtype_t); /* primitives */ const char *sctp_pname(const union sctp_subtype id); /* primitives */
/* This is a table of printable names of sctp_state_t's. */ /* This is a table of printable names of sctp_state_t's. */
extern const char *const sctp_state_tbl[]; extern const char *const sctp_state_tbl[];
...@@ -312,19 +309,19 @@ enum { SCTP_MAX_GABS = 16 }; ...@@ -312,19 +309,19 @@ enum { SCTP_MAX_GABS = 16 };
/* These return values describe the success or failure of a number of /* These return values describe the success or failure of a number of
* routines which form the lower interface to SCTP_outqueue. * routines which form the lower interface to SCTP_outqueue.
*/ */
typedef enum { enum sctp_xmit {
SCTP_XMIT_OK, SCTP_XMIT_OK,
SCTP_XMIT_PMTU_FULL, SCTP_XMIT_PMTU_FULL,
SCTP_XMIT_RWND_FULL, SCTP_XMIT_RWND_FULL,
SCTP_XMIT_DELAY, SCTP_XMIT_DELAY,
} sctp_xmit_t; };
/* These are the commands for manipulating transports. */ /* These are the commands for manipulating transports. */
typedef enum { enum sctp_transport_cmd {
SCTP_TRANSPORT_UP, SCTP_TRANSPORT_UP,
SCTP_TRANSPORT_DOWN, SCTP_TRANSPORT_DOWN,
SCTP_TRANSPORT_PF, SCTP_TRANSPORT_PF,
} sctp_transport_cmd_t; };
/* These are the address scopes defined mainly for IPv4 addresses /* These are the address scopes defined mainly for IPv4 addresses
* based on draft of SCTP IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>. * based on draft of SCTP IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>.
...@@ -333,20 +330,22 @@ typedef enum { ...@@ -333,20 +330,22 @@ typedef enum {
* At this point, the IPv6 scopes will be mapped to these internal scopes * At this point, the IPv6 scopes will be mapped to these internal scopes
* as much as possible. * as much as possible.
*/ */
typedef enum { enum sctp_scope {
SCTP_SCOPE_GLOBAL, /* IPv4 global addresses */ SCTP_SCOPE_GLOBAL, /* IPv4 global addresses */
SCTP_SCOPE_PRIVATE, /* IPv4 private addresses */ SCTP_SCOPE_PRIVATE, /* IPv4 private addresses */
SCTP_SCOPE_LINK, /* IPv4 link local address */ SCTP_SCOPE_LINK, /* IPv4 link local address */
SCTP_SCOPE_LOOPBACK, /* IPv4 loopback address */ SCTP_SCOPE_LOOPBACK, /* IPv4 loopback address */
SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */
} sctp_scope_t; };
typedef enum { enum {
SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */ SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */
SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */ SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */
SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */ SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */
SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */ SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */
} sctp_scope_policy_t; };
#define SCTP_SCOPE_POLICY_MAX SCTP_SCOPE_POLICY_LINK
/* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>,
* SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24,
...@@ -370,20 +369,20 @@ typedef enum { ...@@ -370,20 +369,20 @@ typedef enum {
peer */ peer */
/* Reasons to retransmit. */ /* Reasons to retransmit. */
typedef enum { enum sctp_retransmit_reason {
SCTP_RTXR_T3_RTX, SCTP_RTXR_T3_RTX,
SCTP_RTXR_FAST_RTX, SCTP_RTXR_FAST_RTX,
SCTP_RTXR_PMTUD, SCTP_RTXR_PMTUD,
SCTP_RTXR_T1_RTX, SCTP_RTXR_T1_RTX,
} sctp_retransmit_reason_t; };
/* Reasons to lower cwnd. */ /* Reasons to lower cwnd. */
typedef enum { enum sctp_lower_cwnd {
SCTP_LOWER_CWND_T3_RTX, SCTP_LOWER_CWND_T3_RTX,
SCTP_LOWER_CWND_FAST_RTX, SCTP_LOWER_CWND_FAST_RTX,
SCTP_LOWER_CWND_ECNE, SCTP_LOWER_CWND_ECNE,
SCTP_LOWER_CWND_INACTIVE, SCTP_LOWER_CWND_INACTIVE,
} sctp_lower_cwnd_t; };
/* SCTP-AUTH Necessary constants */ /* SCTP-AUTH Necessary constants */
......
...@@ -94,8 +94,8 @@ ...@@ -94,8 +94,8 @@
/* /*
* sctp/protocol.c * sctp/protocol.c
*/ */
int sctp_copy_local_addr_list(struct net *, struct sctp_bind_addr *, int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *addr,
sctp_scope_t, gfp_t gfp, int flags); enum sctp_scope, gfp_t gfp, int flags);
struct sctp_pf *sctp_get_pf_specific(sa_family_t family); struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
int sctp_register_pf(struct sctp_pf *, sa_family_t); int sctp_register_pf(struct sctp_pf *, sa_family_t);
void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int); void sctp_addr_wq_mgmt(struct net *, struct sctp_sockaddr_entry *, int);
...@@ -558,14 +558,15 @@ static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) ...@@ -558,14 +558,15 @@ static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style)
/* Is the association in this state? */ /* Is the association in this state? */
#define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state)) #define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state))
static inline int __sctp_state(const struct sctp_association *asoc, static inline int __sctp_state(const struct sctp_association *asoc,
sctp_state_t state) enum sctp_state state)
{ {
return asoc->state == state; return asoc->state == state;
} }
/* Is the socket in this state? */ /* Is the socket in this state? */
#define sctp_sstate(sk, state) __sctp_sstate((sk), (SCTP_SS_##state)) #define sctp_sstate(sk, state) __sctp_sstate((sk), (SCTP_SS_##state))
static inline int __sctp_sstate(const struct sock *sk, sctp_sock_state_t state) static inline int __sctp_sstate(const struct sock *sk,
enum sctp_sock_state state)
{ {
return sk->sk_state == state; return sk->sk_state == state;
} }
......
...@@ -73,7 +73,7 @@ typedef struct { ...@@ -73,7 +73,7 @@ typedef struct {
typedef sctp_disposition_t (sctp_state_fn_t) (struct net *, typedef sctp_disposition_t (sctp_state_fn_t) (struct net *,
const struct sctp_endpoint *, const struct sctp_endpoint *,
const struct sctp_association *, const struct sctp_association *,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *); sctp_cmd_seq_t *);
typedef void (sctp_timer_event_t) (unsigned long); typedef void (sctp_timer_event_t) (unsigned long);
...@@ -175,10 +175,11 @@ sctp_state_fn_t sctp_sf_autoclose_timer_expire; ...@@ -175,10 +175,11 @@ sctp_state_fn_t sctp_sf_autoclose_timer_expire;
/* Prototypes for utility support functions. */ /* Prototypes for utility support functions. */
__u8 sctp_get_chunk_type(struct sctp_chunk *chunk); __u8 sctp_get_chunk_type(struct sctp_chunk *chunk);
const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *, const sctp_sm_table_entry_t *sctp_sm_lookup_event(
sctp_event_t, struct net *net,
sctp_state_t, enum sctp_event event_type,
sctp_subtype_t); enum sctp_state state,
union sctp_subtype event_subtype);
int sctp_chunk_iif(const struct sctp_chunk *); int sctp_chunk_iif(const struct sctp_chunk *);
struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
struct sctp_chunk *, struct sctp_chunk *,
...@@ -312,12 +313,10 @@ struct sctp_chunk *sctp_process_strreset_resp( ...@@ -312,12 +313,10 @@ struct sctp_chunk *sctp_process_strreset_resp(
/* Prototypes for statetable processing. */ /* Prototypes for statetable processing. */
int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, int sctp_do_sm(struct net *net, enum sctp_event event_type,
sctp_state_t state, union sctp_subtype subtype, enum sctp_state state,
struct sctp_endpoint *, struct sctp_endpoint *ep, struct sctp_association *asoc,
struct sctp_association *asoc, void *event_arg, gfp_t gfp);
void *event_arg,
gfp_t gfp);
/* 2nd level prototypes */ /* 2nd level prototypes */
void sctp_generate_t3_rtx_event(unsigned long peer); void sctp_generate_t3_rtx_event(unsigned long peer);
......
...@@ -449,7 +449,7 @@ struct sctp_af { ...@@ -449,7 +449,7 @@ struct sctp_af {
int (*addr_valid) (union sctp_addr *, int (*addr_valid) (union sctp_addr *,
struct sctp_sock *, struct sctp_sock *,
const struct sk_buff *); const struct sk_buff *);
sctp_scope_t (*scope) (union sctp_addr *); enum sctp_scope (*scope)(union sctp_addr *);
void (*inaddr_any) (union sctp_addr *, __be16); void (*inaddr_any) (union sctp_addr *, __be16);
int (*is_any) (const union sctp_addr *); int (*is_any) (const union sctp_addr *);
int (*available) (union sctp_addr *, int (*available) (union sctp_addr *,
...@@ -697,10 +697,11 @@ struct sctp_packet { ...@@ -697,10 +697,11 @@ struct sctp_packet {
void sctp_packet_init(struct sctp_packet *, struct sctp_transport *, void sctp_packet_init(struct sctp_packet *, struct sctp_transport *,
__u16 sport, __u16 dport); __u16 sport, __u16 dport);
void sctp_packet_config(struct sctp_packet *, __u32 vtag, int); void sctp_packet_config(struct sctp_packet *, __u32 vtag, int);
sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *, enum sctp_xmit sctp_packet_transmit_chunk(struct sctp_packet *packet,
struct sctp_chunk *, int, gfp_t); struct sctp_chunk *chunk,
sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *, int one_packet, gfp_t gfp);
struct sctp_chunk *); enum sctp_xmit sctp_packet_append_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk);
int sctp_packet_transmit(struct sctp_packet *, gfp_t); int sctp_packet_transmit(struct sctp_packet *, gfp_t);
void sctp_packet_free(struct sctp_packet *); void sctp_packet_free(struct sctp_packet *);
...@@ -950,7 +951,8 @@ int sctp_transport_hold(struct sctp_transport *); ...@@ -950,7 +951,8 @@ int sctp_transport_hold(struct sctp_transport *);
void sctp_transport_put(struct sctp_transport *); void sctp_transport_put(struct sctp_transport *);
void sctp_transport_update_rto(struct sctp_transport *, __u32); void sctp_transport_update_rto(struct sctp_transport *, __u32);
void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32);
void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); void sctp_transport_lower_cwnd(struct sctp_transport *t,
enum sctp_lower_cwnd reason);
void sctp_transport_burst_limited(struct sctp_transport *); void sctp_transport_burst_limited(struct sctp_transport *);
void sctp_transport_burst_reset(struct sctp_transport *); void sctp_transport_burst_reset(struct sctp_transport *);
unsigned long sctp_transport_timeout(struct sctp_transport *); unsigned long sctp_transport_timeout(struct sctp_transport *);
...@@ -1053,8 +1055,8 @@ int sctp_outq_sack(struct sctp_outq *, struct sctp_chunk *); ...@@ -1053,8 +1055,8 @@ int sctp_outq_sack(struct sctp_outq *, struct sctp_chunk *);
int sctp_outq_is_empty(const struct sctp_outq *); int sctp_outq_is_empty(const struct sctp_outq *);
void sctp_outq_restart(struct sctp_outq *); void sctp_outq_restart(struct sctp_outq *);
void sctp_retransmit(struct sctp_outq *, struct sctp_transport *, void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
sctp_retransmit_reason_t); enum sctp_retransmit_reason reason);
void sctp_retransmit_mark(struct sctp_outq *, struct sctp_transport *, __u8); void sctp_retransmit_mark(struct sctp_outq *, struct sctp_transport *, __u8);
void sctp_outq_uncork(struct sctp_outq *, gfp_t gfp); void sctp_outq_uncork(struct sctp_outq *, gfp_t gfp);
void sctp_prsctp_prune(struct sctp_association *asoc, void sctp_prsctp_prune(struct sctp_association *asoc,
...@@ -1110,7 +1112,7 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port); ...@@ -1110,7 +1112,7 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port);
void sctp_bind_addr_free(struct sctp_bind_addr *); void sctp_bind_addr_free(struct sctp_bind_addr *);
int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src, const struct sctp_bind_addr *src,
sctp_scope_t scope, gfp_t gfp, enum sctp_scope scope, gfp_t gfp,
int flags); int flags);
int sctp_bind_addr_dup(struct sctp_bind_addr *dest, int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src, const struct sctp_bind_addr *src,
...@@ -1134,8 +1136,9 @@ union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, ...@@ -1134,8 +1136,9 @@ union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
__u16 port, gfp_t gfp); __u16 port, gfp_t gfp);
sctp_scope_t sctp_scope(const union sctp_addr *); enum sctp_scope sctp_scope(const union sctp_addr *addr);
int sctp_in_scope(struct net *net, const union sctp_addr *addr, const sctp_scope_t scope); int sctp_in_scope(struct net *net, const union sctp_addr *addr,
const enum sctp_scope scope);
int sctp_is_any(struct sock *sk, const union sctp_addr *addr); int sctp_is_any(struct sock *sk, const union sctp_addr *addr);
int sctp_is_ep_boundall(struct sock *sk); int sctp_is_ep_boundall(struct sock *sk);
...@@ -1574,7 +1577,7 @@ struct sctp_association { ...@@ -1574,7 +1577,7 @@ struct sctp_association {
* *
* State takes values from SCTP_STATE_*. * State takes values from SCTP_STATE_*.
*/ */
sctp_state_t state; enum sctp_state state;
/* Overall : The overall association error count. /* Overall : The overall association error count.
* Error Count : [Clear this any time I get something.] * Error Count : [Clear this any time I get something.]
...@@ -1924,8 +1927,8 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base) ...@@ -1924,8 +1927,8 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base)
struct sctp_association * struct sctp_association *
sctp_association_new(const struct sctp_endpoint *, const struct sock *, sctp_association_new(const struct sctp_endpoint *ep, const struct sock *sk,
sctp_scope_t scope, gfp_t gfp); enum sctp_scope scope, gfp_t gfp);
void sctp_association_free(struct sctp_association *); void sctp_association_free(struct sctp_association *);
void sctp_association_put(struct sctp_association *); void sctp_association_put(struct sctp_association *);
void sctp_association_hold(struct sctp_association *); void sctp_association_hold(struct sctp_association *);
...@@ -1945,9 +1948,10 @@ void sctp_assoc_del_peer(struct sctp_association *asoc, ...@@ -1945,9 +1948,10 @@ void sctp_assoc_del_peer(struct sctp_association *asoc,
const union sctp_addr *addr); const union sctp_addr *addr);
void sctp_assoc_rm_peer(struct sctp_association *asoc, void sctp_assoc_rm_peer(struct sctp_association *asoc,
struct sctp_transport *peer); struct sctp_transport *peer);
void sctp_assoc_control_transport(struct sctp_association *, void sctp_assoc_control_transport(struct sctp_association *asoc,
struct sctp_transport *, struct sctp_transport *transport,
sctp_transport_cmd_t, sctp_sn_error_t); enum sctp_transport_cmd command,
sctp_sn_error_t error);
struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *, __u32); struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *, __u32);
struct sctp_transport *sctp_assoc_is_match(struct sctp_association *, struct sctp_transport *sctp_assoc_is_match(struct sctp_association *,
struct net *, struct net *,
...@@ -1966,8 +1970,8 @@ void sctp_assoc_set_primary(struct sctp_association *, ...@@ -1966,8 +1970,8 @@ void sctp_assoc_set_primary(struct sctp_association *,
struct sctp_transport *); struct sctp_transport *);
void sctp_assoc_del_nonprimary_peers(struct sctp_association *, void sctp_assoc_del_nonprimary_peers(struct sctp_association *,
struct sctp_transport *); struct sctp_transport *);
int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc,
sctp_scope_t, gfp_t); enum sctp_scope scope, gfp_t gfp);
int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
struct sctp_cookie*, struct sctp_cookie*,
gfp_t gfp); gfp_t gfp);
......
...@@ -63,11 +63,11 @@ static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc); ...@@ -63,11 +63,11 @@ static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc);
/* 1st Level Abstractions. */ /* 1st Level Abstractions. */
/* Initialize a new association from provided memory. */ /* Initialize a new association from provided memory. */
static struct sctp_association *sctp_association_init(struct sctp_association *asoc, static struct sctp_association *sctp_association_init(
const struct sctp_endpoint *ep, struct sctp_association *asoc,
const struct sock *sk, const struct sctp_endpoint *ep,
sctp_scope_t scope, const struct sock *sk,
gfp_t gfp) enum sctp_scope scope, gfp_t gfp)
{ {
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
struct sctp_sock *sp; struct sctp_sock *sp;
...@@ -301,9 +301,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a ...@@ -301,9 +301,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
/* Allocate and initialize a new association */ /* Allocate and initialize a new association */
struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep, struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep,
const struct sock *sk, const struct sock *sk,
sctp_scope_t scope, enum sctp_scope scope, gfp_t gfp)
gfp_t gfp)
{ {
struct sctp_association *asoc; struct sctp_association *asoc;
...@@ -797,7 +796,7 @@ void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc, ...@@ -797,7 +796,7 @@ void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc,
*/ */
void sctp_assoc_control_transport(struct sctp_association *asoc, void sctp_assoc_control_transport(struct sctp_association *asoc,
struct sctp_transport *transport, struct sctp_transport *transport,
sctp_transport_cmd_t command, enum sctp_transport_cmd command,
sctp_sn_error_t error) sctp_sn_error_t error)
{ {
struct sctp_ulpevent *event; struct sctp_ulpevent *event;
...@@ -1022,11 +1021,11 @@ static void sctp_assoc_bh_rcv(struct work_struct *work) ...@@ -1022,11 +1021,11 @@ static void sctp_assoc_bh_rcv(struct work_struct *work)
container_of(work, struct sctp_association, container_of(work, struct sctp_association,
base.inqueue.immediate); base.inqueue.immediate);
struct net *net = sock_net(asoc->base.sk); struct net *net = sock_net(asoc->base.sk);
union sctp_subtype subtype;
struct sctp_endpoint *ep; struct sctp_endpoint *ep;
struct sctp_chunk *chunk; struct sctp_chunk *chunk;
struct sctp_inq *inqueue; struct sctp_inq *inqueue;
int state; int state;
sctp_subtype_t subtype;
int error = 0; int error = 0;
/* The association should be held so we should be safe. */ /* The association should be held so we should be safe. */
...@@ -1564,7 +1563,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned int len) ...@@ -1564,7 +1563,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned int len)
* local endpoint and the remote peer. * local endpoint and the remote peer.
*/ */
int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc,
sctp_scope_t scope, gfp_t gfp) enum sctp_scope scope, gfp_t gfp)
{ {
int flags; int flags;
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
#include <net/sctp/sm.h> #include <net/sctp/sm.h>
/* Forward declarations for internal helpers. */ /* Forward declarations for internal helpers. */
static int sctp_copy_one_addr(struct net *, struct sctp_bind_addr *, static int sctp_copy_one_addr(struct net *net, struct sctp_bind_addr *dest,
union sctp_addr *, sctp_scope_t scope, gfp_t gfp, union sctp_addr *addr, enum sctp_scope scope,
int flags); gfp_t gfp, int flags);
static void sctp_bind_addr_clean(struct sctp_bind_addr *); static void sctp_bind_addr_clean(struct sctp_bind_addr *);
/* First Level Abstractions. */ /* First Level Abstractions. */
...@@ -57,7 +57,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *); ...@@ -57,7 +57,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *);
*/ */
int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src, const struct sctp_bind_addr *src,
sctp_scope_t scope, gfp_t gfp, enum sctp_scope scope, gfp_t gfp,
int flags) int flags)
{ {
struct sctp_sockaddr_entry *addr; struct sctp_sockaddr_entry *addr;
...@@ -440,9 +440,8 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, ...@@ -440,9 +440,8 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
/* Copy out addresses from the global local address list. */ /* Copy out addresses from the global local address list. */
static int sctp_copy_one_addr(struct net *net, struct sctp_bind_addr *dest, static int sctp_copy_one_addr(struct net *net, struct sctp_bind_addr *dest,
union sctp_addr *addr, union sctp_addr *addr, enum sctp_scope scope,
sctp_scope_t scope, gfp_t gfp, gfp_t gfp, int flags)
int flags)
{ {
int error = 0; int error = 0;
...@@ -485,9 +484,10 @@ int sctp_is_any(struct sock *sk, const union sctp_addr *addr) ...@@ -485,9 +484,10 @@ int sctp_is_any(struct sock *sk, const union sctp_addr *addr)
} }
/* Is 'addr' valid for 'scope'? */ /* Is 'addr' valid for 'scope'? */
int sctp_in_scope(struct net *net, const union sctp_addr *addr, sctp_scope_t scope) int sctp_in_scope(struct net *net, const union sctp_addr *addr,
enum sctp_scope scope)
{ {
sctp_scope_t addr_scope = sctp_scope(addr); enum sctp_scope addr_scope = sctp_scope(addr);
/* The unusable SCTP addresses will not be considered with /* The unusable SCTP addresses will not be considered with
* any defined scopes. * any defined scopes.
...@@ -545,7 +545,7 @@ int sctp_is_ep_boundall(struct sock *sk) ...@@ -545,7 +545,7 @@ int sctp_is_ep_boundall(struct sock *sk)
********************************************************************/ ********************************************************************/
/* What is the scope of 'addr'? */ /* What is the scope of 'addr'? */
sctp_scope_t sctp_scope(const union sctp_addr *addr) enum sctp_scope sctp_scope(const union sctp_addr *addr)
{ {
struct sctp_af *af; struct sctp_af *af;
......
...@@ -60,7 +60,7 @@ static const char *const sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = { ...@@ -60,7 +60,7 @@ static const char *const sctp_cid_tbl[SCTP_NUM_BASE_CHUNK_TYPES] = {
}; };
/* Lookup "chunk type" debug name. */ /* Lookup "chunk type" debug name. */
const char *sctp_cname(const sctp_subtype_t cid) const char *sctp_cname(const union sctp_subtype cid)
{ {
if (cid.chunk <= SCTP_CID_BASE_MAX) if (cid.chunk <= SCTP_CID_BASE_MAX)
return sctp_cid_tbl[cid.chunk]; return sctp_cid_tbl[cid.chunk];
...@@ -130,7 +130,7 @@ static const char *const sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = { ...@@ -130,7 +130,7 @@ static const char *const sctp_primitive_tbl[SCTP_NUM_PRIMITIVE_TYPES] = {
}; };
/* Lookup primitive debug name. */ /* Lookup primitive debug name. */
const char *sctp_pname(const sctp_subtype_t id) const char *sctp_pname(const union sctp_subtype id)
{ {
if (id.primitive <= SCTP_EVENT_PRIMITIVE_MAX) if (id.primitive <= SCTP_EVENT_PRIMITIVE_MAX)
return sctp_primitive_tbl[id.primitive]; return sctp_primitive_tbl[id.primitive];
...@@ -143,7 +143,7 @@ static const char *const sctp_other_tbl[] = { ...@@ -143,7 +143,7 @@ static const char *const sctp_other_tbl[] = {
}; };
/* Lookup "other" debug name. */ /* Lookup "other" debug name. */
const char *sctp_oname(const sctp_subtype_t id) const char *sctp_oname(const union sctp_subtype id)
{ {
if (id.other <= SCTP_EVENT_OTHER_MAX) if (id.other <= SCTP_EVENT_OTHER_MAX)
return sctp_other_tbl[id.other]; return sctp_other_tbl[id.other];
...@@ -165,7 +165,7 @@ static const char *const sctp_timer_tbl[] = { ...@@ -165,7 +165,7 @@ static const char *const sctp_timer_tbl[] = {
}; };
/* Lookup timer debug name. */ /* Lookup timer debug name. */
const char *sctp_tname(const sctp_subtype_t id) const char *sctp_tname(const union sctp_subtype id)
{ {
BUILD_BUG_ON(SCTP_EVENT_TIMEOUT_MAX + 1 != ARRAY_SIZE(sctp_timer_tbl)); BUILD_BUG_ON(SCTP_EVENT_TIMEOUT_MAX + 1 != ARRAY_SIZE(sctp_timer_tbl));
......
...@@ -382,8 +382,8 @@ static void sctp_endpoint_bh_rcv(struct work_struct *work) ...@@ -382,8 +382,8 @@ static void sctp_endpoint_bh_rcv(struct work_struct *work)
struct sctp_transport *transport; struct sctp_transport *transport;
struct sctp_chunk *chunk; struct sctp_chunk *chunk;
struct sctp_inq *inqueue; struct sctp_inq *inqueue;
sctp_subtype_t subtype; union sctp_subtype subtype;
sctp_state_t state; enum sctp_state state;
int error = 0; int error = 0;
int first_time = 1; /* is this the first time through the loop */ int first_time = 1; /* is this the first time through the loop */
......
...@@ -243,8 +243,8 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr, ...@@ -243,8 +243,8 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
union sctp_addr *daddr = &t->ipaddr; union sctp_addr *daddr = &t->ipaddr;
union sctp_addr dst_saddr; union sctp_addr dst_saddr;
struct in6_addr *final_p, final; struct in6_addr *final_p, final;
enum sctp_scope scope;
__u8 matchlen = 0; __u8 matchlen = 0;
sctp_scope_t scope;
memset(fl6, 0, sizeof(struct flowi6)); memset(fl6, 0, sizeof(struct flowi6));
fl6->daddr = daddr->v6.sin6_addr; fl6->daddr = daddr->v6.sin6_addr;
...@@ -624,10 +624,10 @@ static int sctp_v6_addr_valid(union sctp_addr *addr, ...@@ -624,10 +624,10 @@ static int sctp_v6_addr_valid(union sctp_addr *addr,
} }
/* What is the scope of 'addr'? */ /* What is the scope of 'addr'? */
static sctp_scope_t sctp_v6_scope(union sctp_addr *addr) static enum sctp_scope sctp_v6_scope(union sctp_addr *addr)
{ {
enum sctp_scope retval;
int v6scope; int v6scope;
sctp_scope_t retval;
/* The IPv6 scope is really a set of bit fields. /* The IPv6 scope is really a set of bit fields.
* See IFA_* in <net/if_inet6.h>. Map to a generic SCTP scope. * See IFA_* in <net/if_inet6.h>. Map to a generic SCTP scope.
......
...@@ -57,15 +57,15 @@ ...@@ -57,15 +57,15 @@
#include <net/sctp/checksum.h> #include <net/sctp/checksum.h>
/* Forward declarations for private helpers. */ /* Forward declarations for private helpers. */
static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, static enum sctp_xmit __sctp_packet_append_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk); struct sctp_chunk *chunk);
static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, static enum sctp_xmit sctp_packet_can_append_data(struct sctp_packet *packet,
struct sctp_chunk *chunk); struct sctp_chunk *chunk);
static void sctp_packet_append_data(struct sctp_packet *packet, static void sctp_packet_append_data(struct sctp_packet *packet,
struct sctp_chunk *chunk); struct sctp_chunk *chunk);
static sctp_xmit_t sctp_packet_will_fit(struct sctp_packet *packet, static enum sctp_xmit sctp_packet_will_fit(struct sctp_packet *packet,
struct sctp_chunk *chunk, struct sctp_chunk *chunk,
u16 chunk_len); u16 chunk_len);
static void sctp_packet_reset(struct sctp_packet *packet) static void sctp_packet_reset(struct sctp_packet *packet)
{ {
...@@ -181,11 +181,11 @@ void sctp_packet_free(struct sctp_packet *packet) ...@@ -181,11 +181,11 @@ void sctp_packet_free(struct sctp_packet *packet)
* as it can fit in the packet, but any more data that does not fit in this * as it can fit in the packet, but any more data that does not fit in this
* packet can be sent only after receiving the COOKIE_ACK. * packet can be sent only after receiving the COOKIE_ACK.
*/ */
sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet, enum sctp_xmit sctp_packet_transmit_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk, struct sctp_chunk *chunk,
int one_packet, gfp_t gfp) int one_packet, gfp_t gfp)
{ {
sctp_xmit_t retval; enum sctp_xmit retval;
pr_debug("%s: packet:%p size:%zu chunk:%p size:%d\n", __func__, pr_debug("%s: packet:%p size:%zu chunk:%p size:%d\n", __func__,
packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1); packet, packet->size, chunk, chunk->skb ? chunk->skb->len : -1);
...@@ -218,12 +218,12 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet, ...@@ -218,12 +218,12 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet,
} }
/* Try to bundle an auth chunk into the packet. */ /* Try to bundle an auth chunk into the packet. */
static sctp_xmit_t sctp_packet_bundle_auth(struct sctp_packet *pkt, static enum sctp_xmit sctp_packet_bundle_auth(struct sctp_packet *pkt,
struct sctp_chunk *chunk) struct sctp_chunk *chunk)
{ {
struct sctp_association *asoc = pkt->transport->asoc; struct sctp_association *asoc = pkt->transport->asoc;
enum sctp_xmit retval = SCTP_XMIT_OK;
struct sctp_chunk *auth; struct sctp_chunk *auth;
sctp_xmit_t retval = SCTP_XMIT_OK;
/* if we don't have an association, we can't do authentication */ /* if we don't have an association, we can't do authentication */
if (!asoc) if (!asoc)
...@@ -254,10 +254,10 @@ static sctp_xmit_t sctp_packet_bundle_auth(struct sctp_packet *pkt, ...@@ -254,10 +254,10 @@ static sctp_xmit_t sctp_packet_bundle_auth(struct sctp_packet *pkt,
} }
/* Try to bundle a SACK with the packet. */ /* Try to bundle a SACK with the packet. */
static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt, static enum sctp_xmit sctp_packet_bundle_sack(struct sctp_packet *pkt,
struct sctp_chunk *chunk) struct sctp_chunk *chunk)
{ {
sctp_xmit_t retval = SCTP_XMIT_OK; enum sctp_xmit retval = SCTP_XMIT_OK;
/* If sending DATA and haven't aleady bundled a SACK, try to /* If sending DATA and haven't aleady bundled a SACK, try to
* bundle one in to the packet. * bundle one in to the packet.
...@@ -299,11 +299,11 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt, ...@@ -299,11 +299,11 @@ static sctp_xmit_t sctp_packet_bundle_sack(struct sctp_packet *pkt,
/* Append a chunk to the offered packet reporting back any inability to do /* Append a chunk to the offered packet reporting back any inability to do
* so. * so.
*/ */
static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, static enum sctp_xmit __sctp_packet_append_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk) struct sctp_chunk *chunk)
{ {
sctp_xmit_t retval = SCTP_XMIT_OK;
__u16 chunk_len = SCTP_PAD4(ntohs(chunk->chunk_hdr->length)); __u16 chunk_len = SCTP_PAD4(ntohs(chunk->chunk_hdr->length));
enum sctp_xmit retval = SCTP_XMIT_OK;
/* Check to see if this chunk will fit into the packet */ /* Check to see if this chunk will fit into the packet */
retval = sctp_packet_will_fit(packet, chunk, chunk_len); retval = sctp_packet_will_fit(packet, chunk, chunk_len);
...@@ -353,10 +353,10 @@ static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet, ...@@ -353,10 +353,10 @@ static sctp_xmit_t __sctp_packet_append_chunk(struct sctp_packet *packet,
/* Append a chunk to the offered packet reporting back any inability to do /* Append a chunk to the offered packet reporting back any inability to do
* so. * so.
*/ */
sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *packet, enum sctp_xmit sctp_packet_append_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk) struct sctp_chunk *chunk)
{ {
sctp_xmit_t retval = SCTP_XMIT_OK; enum sctp_xmit retval = SCTP_XMIT_OK;
pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk); pr_debug("%s: packet:%p chunk:%p\n", __func__, packet, chunk);
...@@ -653,8 +653,8 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp) ...@@ -653,8 +653,8 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)
********************************************************************/ ********************************************************************/
/* This private function check to see if a chunk can be added */ /* This private function check to see if a chunk can be added */
static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, static enum sctp_xmit sctp_packet_can_append_data(struct sctp_packet *packet,
struct sctp_chunk *chunk) struct sctp_chunk *chunk)
{ {
size_t datasize, rwnd, inflight, flight_size; size_t datasize, rwnd, inflight, flight_size;
struct sctp_transport *transport = packet->transport; struct sctp_transport *transport = packet->transport;
...@@ -762,12 +762,12 @@ static void sctp_packet_append_data(struct sctp_packet *packet, ...@@ -762,12 +762,12 @@ static void sctp_packet_append_data(struct sctp_packet *packet,
sctp_chunk_assign_ssn(chunk); sctp_chunk_assign_ssn(chunk);
} }
static sctp_xmit_t sctp_packet_will_fit(struct sctp_packet *packet, static enum sctp_xmit sctp_packet_will_fit(struct sctp_packet *packet,
struct sctp_chunk *chunk, struct sctp_chunk *chunk,
u16 chunk_len) u16 chunk_len)
{ {
enum sctp_xmit retval = SCTP_XMIT_OK;
size_t psize, pmtu, maxsize; size_t psize, pmtu, maxsize;
sctp_xmit_t retval = SCTP_XMIT_OK;
psize = packet->size; psize = packet->size;
if (packet->transport->asoc) if (packet->transport->asoc)
......
...@@ -534,7 +534,7 @@ void sctp_retransmit_mark(struct sctp_outq *q, ...@@ -534,7 +534,7 @@ void sctp_retransmit_mark(struct sctp_outq *q,
* one packet out. * one packet out.
*/ */
void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
sctp_retransmit_reason_t reason) enum sctp_retransmit_reason reason)
{ {
struct net *net = sock_net(q->asoc->base.sk); struct net *net = sock_net(q->asoc->base.sk);
...@@ -594,14 +594,14 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, ...@@ -594,14 +594,14 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
int rtx_timeout, int *start_timer) int rtx_timeout, int *start_timer)
{ {
struct list_head *lqueue;
struct sctp_transport *transport = pkt->transport; struct sctp_transport *transport = pkt->transport;
sctp_xmit_t status;
struct sctp_chunk *chunk, *chunk1; struct sctp_chunk *chunk, *chunk1;
int fast_rtx; struct list_head *lqueue;
enum sctp_xmit status;
int error = 0; int error = 0;
int timer = 0; int timer = 0;
int done = 0; int done = 0;
int fast_rtx;
lqueue = &q->retransmit; lqueue = &q->retransmit;
fast_rtx = q->fast_rtx; fast_rtx = q->fast_rtx;
...@@ -781,7 +781,7 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) ...@@ -781,7 +781,7 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp)
struct sctp_transport *transport = NULL; struct sctp_transport *transport = NULL;
struct sctp_transport *new_transport; struct sctp_transport *new_transport;
struct sctp_chunk *chunk, *tmp; struct sctp_chunk *chunk, *tmp;
sctp_xmit_t status; enum sctp_xmit status;
int error = 0; int error = 0;
int start_timer = 0; int start_timer = 0;
int one_packet = 0; int one_packet = 0;
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
int sctp_primitive_ ## name(struct net *net, struct sctp_association *asoc, \ int sctp_primitive_ ## name(struct net *net, struct sctp_association *asoc, \
void *arg) { \ void *arg) { \
int error = 0; \ int error = 0; \
sctp_event_t event_type; sctp_subtype_t subtype; \ enum sctp_event event_type; union sctp_subtype subtype; \
sctp_state_t state; \ enum sctp_state state; \
struct sctp_endpoint *ep; \ struct sctp_endpoint *ep; \
\ \
event_type = SCTP_EVENT_T_PRIMITIVE; \ event_type = SCTP_EVENT_T_PRIMITIVE; \
......
...@@ -130,7 +130,7 @@ static const struct file_operations sctpprobe_fops = { ...@@ -130,7 +130,7 @@ static const struct file_operations sctpprobe_fops = {
static sctp_disposition_t jsctp_sf_eat_sack(struct net *net, static sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
......
...@@ -196,7 +196,7 @@ static void sctp_free_local_addr_list(struct net *net) ...@@ -196,7 +196,7 @@ static void sctp_free_local_addr_list(struct net *net)
/* Copy the local addresses which are valid for 'scope' into 'bp'. */ /* Copy the local addresses which are valid for 'scope' into 'bp'. */
int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp, int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
sctp_scope_t scope, gfp_t gfp, int copy_flags) enum sctp_scope scope, gfp_t gfp, int copy_flags)
{ {
struct sctp_sockaddr_entry *addr; struct sctp_sockaddr_entry *addr;
union sctp_addr laddr; union sctp_addr laddr;
...@@ -400,9 +400,9 @@ static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp) ...@@ -400,9 +400,9 @@ static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp)
* IPv4 scoping can be controlled through sysctl option * IPv4 scoping can be controlled through sysctl option
* net.sctp.addr_scope_policy * net.sctp.addr_scope_policy
*/ */
static sctp_scope_t sctp_v4_scope(union sctp_addr *addr) static enum sctp_scope sctp_v4_scope(union sctp_addr *addr)
{ {
sctp_scope_t retval; enum sctp_scope retval;
/* Check for unusable SCTP addresses. */ /* Check for unusable SCTP addresses. */
if (IS_IPV4_UNUSABLE_ADDRESS(addr->v4.sin_addr.s_addr)) { if (IS_IPV4_UNUSABLE_ADDRESS(addr->v4.sin_addr.s_addr)) {
......
...@@ -1578,8 +1578,8 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, ...@@ -1578,8 +1578,8 @@ struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep,
gfp_t gfp) gfp_t gfp)
{ {
struct sctp_association *asoc; struct sctp_association *asoc;
enum sctp_scope scope;
struct sk_buff *skb; struct sk_buff *skb;
sctp_scope_t scope;
/* Create the bare association. */ /* Create the bare association. */
scope = sctp_scope(sctp_source(chunk)); scope = sctp_scope(sctp_source(chunk));
...@@ -1701,7 +1701,7 @@ struct sctp_association *sctp_unpack_cookie( ...@@ -1701,7 +1701,7 @@ struct sctp_association *sctp_unpack_cookie(
int headersize, bodysize, fixed_size; int headersize, bodysize, fixed_size;
__u8 *digest = ep->digest; __u8 *digest = ep->digest;
unsigned int len; unsigned int len;
sctp_scope_t scope; enum sctp_scope scope;
struct sk_buff *skb = chunk->skb; struct sk_buff *skb = chunk->skb;
ktime_t kt; ktime_t kt;
...@@ -2065,10 +2065,11 @@ static void sctp_process_ext_param(struct sctp_association *asoc, ...@@ -2065,10 +2065,11 @@ static void sctp_process_ext_param(struct sctp_association *asoc,
* SCTP_IERROR_ERROR - stop and report an error. * SCTP_IERROR_ERROR - stop and report an error.
* SCTP_IERROR_NOMEME - out of memory. * SCTP_IERROR_NOMEME - out of memory.
*/ */
static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc, static enum sctp_ierror sctp_process_unk_param(
union sctp_params param, const struct sctp_association *asoc,
struct sctp_chunk *chunk, union sctp_params param,
struct sctp_chunk **errp) struct sctp_chunk *chunk,
struct sctp_chunk **errp)
{ {
int retval = SCTP_IERROR_NO_ERROR; int retval = SCTP_IERROR_NO_ERROR;
...@@ -2117,13 +2118,13 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc, ...@@ -2117,13 +2118,13 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,
* SCTP_IERROR_ERROR - stop processing, trigger an ERROR * SCTP_IERROR_ERROR - stop processing, trigger an ERROR
* SCTP_IERROR_NO_ERROR - continue with the chunk * SCTP_IERROR_NO_ERROR - continue with the chunk
*/ */
static sctp_ierror_t sctp_verify_param(struct net *net, static enum sctp_ierror sctp_verify_param(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
union sctp_params param, union sctp_params param,
enum sctp_cid cid, enum sctp_cid cid,
struct sctp_chunk *chunk, struct sctp_chunk *chunk,
struct sctp_chunk **err_chunk) struct sctp_chunk **err_chunk)
{ {
struct sctp_hmac_algo_param *hmacs; struct sctp_hmac_algo_param *hmacs;
int retval = SCTP_IERROR_NO_ERROR; int retval = SCTP_IERROR_NO_ERROR;
...@@ -2502,7 +2503,7 @@ static int sctp_process_param(struct sctp_association *asoc, ...@@ -2502,7 +2503,7 @@ static int sctp_process_param(struct sctp_association *asoc,
int i; int i;
__u16 sat; __u16 sat;
int retval = 1; int retval = 1;
sctp_scope_t scope; enum sctp_scope scope;
u32 stale; u32 stale;
struct sctp_af *af; struct sctp_af *af;
union sctp_addr_param *addr_param; union sctp_addr_param *addr_param;
......
...@@ -51,17 +51,18 @@ ...@@ -51,17 +51,18 @@
#include <net/sctp/sctp.h> #include <net/sctp/sctp.h>
#include <net/sctp/sm.h> #include <net/sctp/sm.h>
static int sctp_cmd_interpreter(sctp_event_t event_type, static int sctp_cmd_interpreter(enum sctp_event event_type,
sctp_subtype_t subtype, union sctp_subtype subtype,
sctp_state_t state, enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_endpoint *ep,
struct sctp_association *asoc, struct sctp_association *asoc,
void *event_arg, void *event_arg,
sctp_disposition_t status, sctp_disposition_t status,
sctp_cmd_seq_t *commands, sctp_cmd_seq_t *commands,
gfp_t gfp); gfp_t gfp);
static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, static int sctp_side_effects(enum sctp_event event_type,
sctp_state_t state, union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_endpoint *ep,
struct sctp_association **asoc, struct sctp_association **asoc,
void *event_arg, void *event_arg,
...@@ -280,7 +281,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer) ...@@ -280,7 +281,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer)
* for timeouts which use the association as their parameter. * for timeouts which use the association as their parameter.
*/ */
static void sctp_generate_timeout_event(struct sctp_association *asoc, static void sctp_generate_timeout_event(struct sctp_association *asoc,
sctp_event_timeout_t timeout_type) enum sctp_event_timeout timeout_type)
{ {
struct sock *sk = asoc->base.sk; struct sock *sk = asoc->base.sk;
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
...@@ -602,8 +603,8 @@ static void sctp_cmd_init_failed(sctp_cmd_seq_t *commands, ...@@ -602,8 +603,8 @@ static void sctp_cmd_init_failed(sctp_cmd_seq_t *commands,
/* Worker routine to handle SCTP_CMD_ASSOC_FAILED. */ /* Worker routine to handle SCTP_CMD_ASSOC_FAILED. */
static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands, static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands,
struct sctp_association *asoc, struct sctp_association *asoc,
sctp_event_t event_type, enum sctp_event event_type,
sctp_subtype_t subtype, union sctp_subtype subtype,
struct sctp_chunk *chunk, struct sctp_chunk *chunk,
unsigned int error) unsigned int error)
{ {
...@@ -843,7 +844,7 @@ static void sctp_cmd_assoc_update(sctp_cmd_seq_t *cmds, ...@@ -843,7 +844,7 @@ static void sctp_cmd_assoc_update(sctp_cmd_seq_t *cmds,
/* Helper function to change the state of an association. */ /* Helper function to change the state of an association. */
static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds, static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds,
struct sctp_association *asoc, struct sctp_association *asoc,
sctp_state_t state) enum sctp_state state)
{ {
struct sock *sk = asoc->base.sk; struct sock *sk = asoc->base.sk;
...@@ -1052,8 +1053,8 @@ static void sctp_cmd_adaptation_ind(sctp_cmd_seq_t *commands, ...@@ -1052,8 +1053,8 @@ static void sctp_cmd_adaptation_ind(sctp_cmd_seq_t *commands,
static void sctp_cmd_t1_timer_update(struct sctp_association *asoc, static void sctp_cmd_t1_timer_update(struct sctp_association *asoc,
sctp_event_timeout_t timer, enum sctp_event_timeout timer,
char *name) char *name)
{ {
struct sctp_transport *t; struct sctp_transport *t;
...@@ -1139,18 +1140,16 @@ static void sctp_cmd_send_asconf(struct sctp_association *asoc) ...@@ -1139,18 +1140,16 @@ static void sctp_cmd_send_asconf(struct sctp_association *asoc)
* If you want to understand all of lksctp, this is a * If you want to understand all of lksctp, this is a
* good place to start. * good place to start.
*/ */
int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, int sctp_do_sm(struct net *net, enum sctp_event event_type,
sctp_state_t state, union sctp_subtype subtype, enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_endpoint *ep, struct sctp_association *asoc,
struct sctp_association *asoc, void *event_arg, gfp_t gfp)
void *event_arg,
gfp_t gfp)
{ {
sctp_cmd_seq_t commands; sctp_cmd_seq_t commands;
const sctp_sm_table_entry_t *state_fn; const sctp_sm_table_entry_t *state_fn;
sctp_disposition_t status; sctp_disposition_t status;
int error = 0; int error = 0;
typedef const char *(printfn_t)(sctp_subtype_t); typedef const char *(printfn_t)(union sctp_subtype);
static printfn_t *table[] = { static printfn_t *table[] = {
NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname, NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname,
}; };
...@@ -1178,8 +1177,9 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, ...@@ -1178,8 +1177,9 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
/***************************************************************** /*****************************************************************
* This the master state function side effect processing function. * This the master state function side effect processing function.
*****************************************************************/ *****************************************************************/
static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, static int sctp_side_effects(enum sctp_event event_type,
sctp_state_t state, union sctp_subtype subtype,
enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_endpoint *ep,
struct sctp_association **asoc, struct sctp_association **asoc,
void *event_arg, void *event_arg,
...@@ -1263,9 +1263,9 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, ...@@ -1263,9 +1263,9 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
********************************************************************/ ********************************************************************/
/* This is the side-effect interpreter. */ /* This is the side-effect interpreter. */
static int sctp_cmd_interpreter(sctp_event_t event_type, static int sctp_cmd_interpreter(enum sctp_event event_type,
sctp_subtype_t subtype, union sctp_subtype subtype,
sctp_state_t state, enum sctp_state state,
struct sctp_endpoint *ep, struct sctp_endpoint *ep,
struct sctp_association *asoc, struct sctp_association *asoc,
void *event_arg, void *event_arg,
......
...@@ -80,19 +80,19 @@ static void sctp_send_stale_cookie_err(struct net *net, ...@@ -80,19 +80,19 @@ static void sctp_send_stale_cookie_err(struct net *net,
static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net, static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net, static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net, static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk); static struct sctp_sackhdr *sctp_sm_pull_sack(struct sctp_chunk *chunk);
...@@ -116,7 +116,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen( ...@@ -116,7 +116,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
...@@ -124,7 +124,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen( ...@@ -124,7 +124,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *ext, void *arg, void *ext,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
...@@ -132,7 +132,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn( ...@@ -132,7 +132,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
...@@ -140,20 +140,21 @@ static sctp_disposition_t sctp_sf_violation_chunk( ...@@ -140,20 +140,21 @@ static sctp_disposition_t sctp_sf_violation_chunk(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
static sctp_ierror_t sctp_sf_authenticate(struct net *net, static enum sctp_ierror sctp_sf_authenticate(
const struct sctp_endpoint *ep, struct net *net,
const struct sctp_association *asoc, const struct sctp_endpoint *ep,
const sctp_subtype_t type, const struct sctp_association *asoc,
struct sctp_chunk *chunk); const union sctp_subtype type,
struct sctp_chunk *chunk);
static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net, static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands); sctp_cmd_seq_t *commands);
...@@ -216,7 +217,7 @@ sctp_chunk_length_valid(struct sctp_chunk *chunk, __u16 required_length) ...@@ -216,7 +217,7 @@ sctp_chunk_length_valid(struct sctp_chunk *chunk, __u16 required_length)
sctp_disposition_t sctp_sf_do_4_C(struct net *net, sctp_disposition_t sctp_sf_do_4_C(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -302,7 +303,7 @@ sctp_disposition_t sctp_sf_do_4_C(struct net *net, ...@@ -302,7 +303,7 @@ sctp_disposition_t sctp_sf_do_4_C(struct net *net,
sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net, sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -496,7 +497,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net, ...@@ -496,7 +497,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(struct net *net,
sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net, sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -646,7 +647,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net, ...@@ -646,7 +647,7 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(struct net *net,
sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg;
...@@ -756,7 +757,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, ...@@ -756,7 +757,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
*/ */
if (chunk->auth_chunk) { if (chunk->auth_chunk) {
struct sctp_chunk auth; struct sctp_chunk auth;
sctp_ierror_t ret; enum sctp_ierror ret;
/* Make sure that we and the peer are AUTH capable */ /* Make sure that we and the peer are AUTH capable */
if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) { if (!net->sctp.auth_enable || !new_asoc->peer.auth_capable) {
...@@ -873,7 +874,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net, ...@@ -873,7 +874,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(struct net *net,
sctp_disposition_t sctp_sf_do_5_1E_ca(struct net *net, sctp_disposition_t sctp_sf_do_5_1E_ca(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg;
...@@ -950,7 +951,7 @@ sctp_disposition_t sctp_sf_do_5_1E_ca(struct net *net, ...@@ -950,7 +951,7 @@ sctp_disposition_t sctp_sf_do_5_1E_ca(struct net *net,
/* Generate and sendout a heartbeat packet. */ /* Generate and sendout a heartbeat packet. */
static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep, static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -976,7 +977,7 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep, ...@@ -976,7 +977,7 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep,
sctp_disposition_t sctp_sf_sendbeat_8_3(struct net *net, sctp_disposition_t sctp_sf_sendbeat_8_3(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -1024,7 +1025,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(struct net *net, ...@@ -1024,7 +1025,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(struct net *net,
sctp_disposition_t sctp_sf_send_reconf(struct net *net, sctp_disposition_t sctp_sf_send_reconf(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_transport *transport = arg; struct sctp_transport *transport = arg;
...@@ -1075,7 +1076,7 @@ sctp_disposition_t sctp_sf_send_reconf(struct net *net, ...@@ -1075,7 +1076,7 @@ sctp_disposition_t sctp_sf_send_reconf(struct net *net,
sctp_disposition_t sctp_sf_beat_8_3(struct net *net, sctp_disposition_t sctp_sf_beat_8_3(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -1150,7 +1151,7 @@ sctp_disposition_t sctp_sf_beat_8_3(struct net *net, ...@@ -1150,7 +1151,7 @@ sctp_disposition_t sctp_sf_beat_8_3(struct net *net,
sctp_disposition_t sctp_sf_backbeat_8_3(struct net *net, sctp_disposition_t sctp_sf_backbeat_8_3(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -1415,7 +1416,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( ...@@ -1415,7 +1416,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, sctp_cmd_seq_t *commands) void *arg, sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg, *repl, *err_chunk; struct sctp_chunk *chunk = arg, *repl, *err_chunk;
...@@ -1626,7 +1627,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( ...@@ -1626,7 +1627,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
sctp_disposition_t sctp_sf_do_5_2_1_siminit(struct net *net, sctp_disposition_t sctp_sf_do_5_2_1_siminit(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -1680,7 +1681,7 @@ sctp_disposition_t sctp_sf_do_5_2_1_siminit(struct net *net, ...@@ -1680,7 +1681,7 @@ sctp_disposition_t sctp_sf_do_5_2_1_siminit(struct net *net,
sctp_disposition_t sctp_sf_do_5_2_2_dupinit(struct net *net, sctp_disposition_t sctp_sf_do_5_2_2_dupinit(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -1703,7 +1704,7 @@ sctp_disposition_t sctp_sf_do_5_2_2_dupinit(struct net *net, ...@@ -1703,7 +1704,7 @@ sctp_disposition_t sctp_sf_do_5_2_2_dupinit(struct net *net,
sctp_disposition_t sctp_sf_do_5_2_3_initack(struct net *net, sctp_disposition_t sctp_sf_do_5_2_3_initack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, sctp_cmd_seq_t *commands) void *arg, sctp_cmd_seq_t *commands)
{ {
/* Per the above section, we'll discard the chunk if we have an /* Per the above section, we'll discard the chunk if we have an
...@@ -2026,7 +2027,7 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(struct net *net, ...@@ -2026,7 +2027,7 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(struct net *net,
sctp_disposition_t sctp_sf_do_5_2_4_dupcook(struct net *net, sctp_disposition_t sctp_sf_do_5_2_4_dupcook(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2145,7 +2146,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort( ...@@ -2145,7 +2146,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2187,7 +2188,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort( ...@@ -2187,7 +2188,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_abort(
sctp_disposition_t sctp_sf_shutdown_sent_abort(struct net *net, sctp_disposition_t sctp_sf_shutdown_sent_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2238,7 +2239,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_abort( ...@@ -2238,7 +2239,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2265,7 +2266,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_abort( ...@@ -2265,7 +2266,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_abort(
sctp_disposition_t sctp_sf_cookie_echoed_err(struct net *net, sctp_disposition_t sctp_sf_cookie_echoed_err(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2329,7 +2330,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_err(struct net *net, ...@@ -2329,7 +2330,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_err(struct net *net,
static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net, static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2451,7 +2452,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net, ...@@ -2451,7 +2452,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net,
sctp_disposition_t sctp_sf_do_9_1_abort(struct net *net, sctp_disposition_t sctp_sf_do_9_1_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2488,7 +2489,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(struct net *net, ...@@ -2488,7 +2489,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(struct net *net,
static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net, static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2526,7 +2527,7 @@ static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net, ...@@ -2526,7 +2527,7 @@ static sctp_disposition_t __sctp_sf_do_9_1_abort(struct net *net,
sctp_disposition_t sctp_sf_cookie_wait_abort(struct net *net, sctp_disposition_t sctp_sf_cookie_wait_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2565,7 +2566,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(struct net *net, ...@@ -2565,7 +2566,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(struct net *net,
sctp_disposition_t sctp_sf_cookie_wait_icmp_abort(struct net *net, sctp_disposition_t sctp_sf_cookie_wait_icmp_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2580,7 +2581,7 @@ sctp_disposition_t sctp_sf_cookie_wait_icmp_abort(struct net *net, ...@@ -2580,7 +2581,7 @@ sctp_disposition_t sctp_sf_cookie_wait_icmp_abort(struct net *net,
sctp_disposition_t sctp_sf_cookie_echoed_abort(struct net *net, sctp_disposition_t sctp_sf_cookie_echoed_abort(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2652,7 +2653,7 @@ static sctp_disposition_t sctp_stop_t1_and_abort(struct net *net, ...@@ -2652,7 +2653,7 @@ static sctp_disposition_t sctp_stop_t1_and_abort(struct net *net,
sctp_disposition_t sctp_sf_do_9_2_shutdown(struct net *net, sctp_disposition_t sctp_sf_do_9_2_shutdown(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2741,7 +2742,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(struct net *net, ...@@ -2741,7 +2742,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(struct net *net,
sctp_disposition_t sctp_sf_do_9_2_shut_ctsn(struct net *net, sctp_disposition_t sctp_sf_do_9_2_shut_ctsn(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2794,7 +2795,7 @@ sctp_disposition_t sctp_sf_do_9_2_shut_ctsn(struct net *net, ...@@ -2794,7 +2795,7 @@ sctp_disposition_t sctp_sf_do_9_2_shut_ctsn(struct net *net,
sctp_disposition_t sctp_sf_do_9_2_reshutack(struct net *net, sctp_disposition_t sctp_sf_do_9_2_reshutack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2858,7 +2859,7 @@ sctp_disposition_t sctp_sf_do_9_2_reshutack(struct net *net, ...@@ -2858,7 +2859,7 @@ sctp_disposition_t sctp_sf_do_9_2_reshutack(struct net *net,
sctp_disposition_t sctp_sf_do_ecn_cwr(struct net *net, sctp_disposition_t sctp_sf_do_ecn_cwr(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2914,7 +2915,7 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(struct net *net, ...@@ -2914,7 +2915,7 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(struct net *net,
sctp_disposition_t sctp_sf_do_ecne(struct net *net, sctp_disposition_t sctp_sf_do_ecne(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -2971,7 +2972,7 @@ sctp_disposition_t sctp_sf_do_ecne(struct net *net, ...@@ -2971,7 +2972,7 @@ sctp_disposition_t sctp_sf_do_ecne(struct net *net,
sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net, sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3091,7 +3092,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net, ...@@ -3091,7 +3092,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net,
sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net, sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3182,7 +3183,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net, ...@@ -3182,7 +3183,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
sctp_disposition_t sctp_sf_eat_sack_6_2(struct net *net, sctp_disposition_t sctp_sf_eat_sack_6_2(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3256,7 +3257,7 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(struct net *net, ...@@ -3256,7 +3257,7 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(struct net *net,
static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net, static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3306,7 +3307,7 @@ static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net, ...@@ -3306,7 +3307,7 @@ static sctp_disposition_t sctp_sf_tabort_8_4_8(struct net *net,
sctp_disposition_t sctp_sf_operr_notify(struct net *net, sctp_disposition_t sctp_sf_operr_notify(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3344,7 +3345,7 @@ sctp_disposition_t sctp_sf_operr_notify(struct net *net, ...@@ -3344,7 +3345,7 @@ sctp_disposition_t sctp_sf_operr_notify(struct net *net,
sctp_disposition_t sctp_sf_do_9_2_final(struct net *net, sctp_disposition_t sctp_sf_do_9_2_final(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3427,7 +3428,7 @@ sctp_disposition_t sctp_sf_do_9_2_final(struct net *net, ...@@ -3427,7 +3428,7 @@ sctp_disposition_t sctp_sf_do_9_2_final(struct net *net,
sctp_disposition_t sctp_sf_ootb(struct net *net, sctp_disposition_t sctp_sf_ootb(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3520,7 +3521,7 @@ sctp_disposition_t sctp_sf_ootb(struct net *net, ...@@ -3520,7 +3521,7 @@ sctp_disposition_t sctp_sf_ootb(struct net *net,
static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net, static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3582,7 +3583,7 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net, ...@@ -3582,7 +3583,7 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(struct net *net,
sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net, sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3607,7 +3608,7 @@ sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net, ...@@ -3607,7 +3608,7 @@ sctp_disposition_t sctp_sf_do_8_5_1_E_sa(struct net *net,
sctp_disposition_t sctp_sf_do_asconf(struct net *net, sctp_disposition_t sctp_sf_do_asconf(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg;
...@@ -3724,7 +3725,8 @@ sctp_disposition_t sctp_sf_do_asconf(struct net *net, ...@@ -3724,7 +3725,8 @@ sctp_disposition_t sctp_sf_do_asconf(struct net *net,
sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net, sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type,
void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *asconf_ack = arg; struct sctp_chunk *asconf_ack = arg;
...@@ -3842,7 +3844,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net, ...@@ -3842,7 +3844,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net,
sctp_disposition_t sctp_sf_do_reconf(struct net *net, sctp_disposition_t sctp_sf_do_reconf(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg, const union sctp_subtype type, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_paramhdr *err_param = NULL; struct sctp_paramhdr *err_param = NULL;
...@@ -3918,7 +3920,7 @@ sctp_disposition_t sctp_sf_do_reconf(struct net *net, ...@@ -3918,7 +3920,7 @@ sctp_disposition_t sctp_sf_do_reconf(struct net *net,
sctp_disposition_t sctp_sf_eat_fwd_tsn(struct net *net, sctp_disposition_t sctp_sf_eat_fwd_tsn(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -3989,7 +3991,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast( ...@@ -3989,7 +3991,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4077,11 +4079,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast( ...@@ -4077,11 +4079,12 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
* *
* The return value is the disposition of the chunk. * The return value is the disposition of the chunk.
*/ */
static sctp_ierror_t sctp_sf_authenticate(struct net *net, static enum sctp_ierror sctp_sf_authenticate(
const struct sctp_endpoint *ep, struct net *net,
const struct sctp_association *asoc, const struct sctp_endpoint *ep,
const sctp_subtype_t type, const struct sctp_association *asoc,
struct sctp_chunk *chunk) const union sctp_subtype type,
struct sctp_chunk *chunk)
{ {
struct sctp_authhdr *auth_hdr; struct sctp_authhdr *auth_hdr;
struct sctp_hmac *hmac; struct sctp_hmac *hmac;
...@@ -4155,14 +4158,14 @@ static sctp_ierror_t sctp_sf_authenticate(struct net *net, ...@@ -4155,14 +4158,14 @@ static sctp_ierror_t sctp_sf_authenticate(struct net *net,
sctp_disposition_t sctp_sf_eat_auth(struct net *net, sctp_disposition_t sctp_sf_eat_auth(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
struct sctp_authhdr *auth_hdr;
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg;
struct sctp_authhdr *auth_hdr;
struct sctp_chunk *err_chunk; struct sctp_chunk *err_chunk;
sctp_ierror_t error; enum sctp_ierror error;
/* Make sure that the peer has AUTH capable */ /* Make sure that the peer has AUTH capable */
if (!asoc->peer.auth_capable) if (!asoc->peer.auth_capable)
...@@ -4252,7 +4255,7 @@ sctp_disposition_t sctp_sf_eat_auth(struct net *net, ...@@ -4252,7 +4255,7 @@ sctp_disposition_t sctp_sf_eat_auth(struct net *net,
sctp_disposition_t sctp_sf_unk_chunk(struct net *net, sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4332,7 +4335,7 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net, ...@@ -4332,7 +4335,7 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
sctp_disposition_t sctp_sf_discard_chunk(struct net *net, sctp_disposition_t sctp_sf_discard_chunk(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4372,7 +4375,7 @@ sctp_disposition_t sctp_sf_discard_chunk(struct net *net, ...@@ -4372,7 +4375,7 @@ sctp_disposition_t sctp_sf_discard_chunk(struct net *net,
sctp_disposition_t sctp_sf_pdiscard(struct net *net, sctp_disposition_t sctp_sf_pdiscard(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4400,7 +4403,7 @@ sctp_disposition_t sctp_sf_pdiscard(struct net *net, ...@@ -4400,7 +4403,7 @@ sctp_disposition_t sctp_sf_pdiscard(struct net *net,
sctp_disposition_t sctp_sf_violation(struct net *net, sctp_disposition_t sctp_sf_violation(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4538,7 +4541,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen( ...@@ -4538,7 +4541,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4558,7 +4561,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen( ...@@ -4558,7 +4561,7 @@ static sctp_disposition_t sctp_sf_violation_paramlen(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *ext, void *arg, void *ext,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4601,7 +4604,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn( ...@@ -4601,7 +4604,7 @@ static sctp_disposition_t sctp_sf_violation_ctsn(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4621,7 +4624,7 @@ static sctp_disposition_t sctp_sf_violation_chunk( ...@@ -4621,7 +4624,7 @@ static sctp_disposition_t sctp_sf_violation_chunk(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4696,7 +4699,7 @@ static sctp_disposition_t sctp_sf_violation_chunk( ...@@ -4696,7 +4699,7 @@ static sctp_disposition_t sctp_sf_violation_chunk(
sctp_disposition_t sctp_sf_do_prm_asoc(struct net *net, sctp_disposition_t sctp_sf_do_prm_asoc(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4808,7 +4811,7 @@ sctp_disposition_t sctp_sf_do_prm_asoc(struct net *net, ...@@ -4808,7 +4811,7 @@ sctp_disposition_t sctp_sf_do_prm_asoc(struct net *net,
sctp_disposition_t sctp_sf_do_prm_send(struct net *net, sctp_disposition_t sctp_sf_do_prm_send(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4848,7 +4851,7 @@ sctp_disposition_t sctp_sf_do_9_2_prm_shutdown( ...@@ -4848,7 +4851,7 @@ sctp_disposition_t sctp_sf_do_9_2_prm_shutdown(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4904,7 +4907,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort( ...@@ -4904,7 +4907,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4941,7 +4944,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort( ...@@ -4941,7 +4944,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
sctp_disposition_t sctp_sf_error_closed(struct net *net, sctp_disposition_t sctp_sf_error_closed(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4955,7 +4958,7 @@ sctp_disposition_t sctp_sf_error_closed(struct net *net, ...@@ -4955,7 +4958,7 @@ sctp_disposition_t sctp_sf_error_closed(struct net *net,
sctp_disposition_t sctp_sf_error_shutdown(struct net *net, sctp_disposition_t sctp_sf_error_shutdown(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -4982,7 +4985,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_shutdown( ...@@ -4982,7 +4985,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_shutdown(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5017,7 +5020,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_prm_shutdown( ...@@ -5017,7 +5020,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_prm_shutdown(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, sctp_cmd_seq_t *commands) void *arg, sctp_cmd_seq_t *commands)
{ {
/* There is a single T1 timer, so we should be able to use /* There is a single T1 timer, so we should be able to use
...@@ -5044,7 +5047,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort( ...@@ -5044,7 +5047,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5093,7 +5096,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_prm_abort( ...@@ -5093,7 +5096,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5119,7 +5122,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_prm_abort( ...@@ -5119,7 +5122,7 @@ sctp_disposition_t sctp_sf_shutdown_pending_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5146,7 +5149,7 @@ sctp_disposition_t sctp_sf_shutdown_sent_prm_abort( ...@@ -5146,7 +5149,7 @@ sctp_disposition_t sctp_sf_shutdown_sent_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5177,7 +5180,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_prm_abort( ...@@ -5177,7 +5180,7 @@ sctp_disposition_t sctp_sf_shutdown_ack_sent_prm_abort(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5213,7 +5216,7 @@ sctp_disposition_t sctp_sf_do_prm_requestheartbeat( ...@@ -5213,7 +5216,7 @@ sctp_disposition_t sctp_sf_do_prm_requestheartbeat(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5245,7 +5248,7 @@ sctp_disposition_t sctp_sf_do_prm_requestheartbeat( ...@@ -5245,7 +5248,7 @@ sctp_disposition_t sctp_sf_do_prm_requestheartbeat(
sctp_disposition_t sctp_sf_do_prm_asconf(struct net *net, sctp_disposition_t sctp_sf_do_prm_asconf(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5262,7 +5265,7 @@ sctp_disposition_t sctp_sf_do_prm_asconf(struct net *net, ...@@ -5262,7 +5265,7 @@ sctp_disposition_t sctp_sf_do_prm_asconf(struct net *net,
sctp_disposition_t sctp_sf_do_prm_reconf(struct net *net, sctp_disposition_t sctp_sf_do_prm_reconf(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, sctp_cmd_seq_t *commands) void *arg, sctp_cmd_seq_t *commands)
{ {
struct sctp_chunk *chunk = arg; struct sctp_chunk *chunk = arg;
...@@ -5280,7 +5283,7 @@ sctp_disposition_t sctp_sf_ignore_primitive( ...@@ -5280,7 +5283,7 @@ sctp_disposition_t sctp_sf_ignore_primitive(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5304,7 +5307,7 @@ sctp_disposition_t sctp_sf_do_no_pending_tsn( ...@@ -5304,7 +5307,7 @@ sctp_disposition_t sctp_sf_do_no_pending_tsn(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5336,7 +5339,7 @@ sctp_disposition_t sctp_sf_do_9_2_start_shutdown( ...@@ -5336,7 +5339,7 @@ sctp_disposition_t sctp_sf_do_9_2_start_shutdown(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5406,7 +5409,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack( ...@@ -5406,7 +5409,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5479,7 +5482,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack( ...@@ -5479,7 +5482,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack(
sctp_disposition_t sctp_sf_ignore_other(struct net *net, sctp_disposition_t sctp_sf_ignore_other(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5507,7 +5510,7 @@ sctp_disposition_t sctp_sf_ignore_other(struct net *net, ...@@ -5507,7 +5510,7 @@ sctp_disposition_t sctp_sf_ignore_other(struct net *net,
sctp_disposition_t sctp_sf_do_6_3_3_rtx(struct net *net, sctp_disposition_t sctp_sf_do_6_3_3_rtx(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5595,7 +5598,7 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(struct net *net, ...@@ -5595,7 +5598,7 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(struct net *net,
sctp_disposition_t sctp_sf_do_6_2_sack(struct net *net, sctp_disposition_t sctp_sf_do_6_2_sack(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5626,7 +5629,7 @@ sctp_disposition_t sctp_sf_do_6_2_sack(struct net *net, ...@@ -5626,7 +5629,7 @@ sctp_disposition_t sctp_sf_do_6_2_sack(struct net *net,
sctp_disposition_t sctp_sf_t1_init_timer_expire(struct net *net, sctp_disposition_t sctp_sf_t1_init_timer_expire(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5690,7 +5693,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(struct net *net, ...@@ -5690,7 +5693,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(struct net *net,
sctp_disposition_t sctp_sf_t1_cookie_timer_expire(struct net *net, sctp_disposition_t sctp_sf_t1_cookie_timer_expire(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5740,7 +5743,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(struct net *net, ...@@ -5740,7 +5743,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(struct net *net,
sctp_disposition_t sctp_sf_t2_timer_expire(struct net *net, sctp_disposition_t sctp_sf_t2_timer_expire(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5811,7 +5814,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire( ...@@ -5811,7 +5814,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5882,7 +5885,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire( ...@@ -5882,7 +5885,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire(
sctp_disposition_t sctp_sf_t5_timer_expire(struct net *net, sctp_disposition_t sctp_sf_t5_timer_expire(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5919,7 +5922,7 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire( ...@@ -5919,7 +5922,7 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire(
struct net *net, struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5961,7 +5964,7 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire( ...@@ -5961,7 +5964,7 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire(
sctp_disposition_t sctp_sf_not_impl(struct net *net, sctp_disposition_t sctp_sf_not_impl(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -5979,7 +5982,7 @@ sctp_disposition_t sctp_sf_not_impl(struct net *net, ...@@ -5979,7 +5982,7 @@ sctp_disposition_t sctp_sf_not_impl(struct net *net,
sctp_disposition_t sctp_sf_bug(struct net *net, sctp_disposition_t sctp_sf_bug(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
...@@ -6000,7 +6003,7 @@ sctp_disposition_t sctp_sf_bug(struct net *net, ...@@ -6000,7 +6003,7 @@ sctp_disposition_t sctp_sf_bug(struct net *net,
sctp_disposition_t sctp_sf_timer_ignore(struct net *net, sctp_disposition_t sctp_sf_timer_ignore(struct net *net,
const struct sctp_endpoint *ep, const struct sctp_endpoint *ep,
const struct sctp_association *asoc, const struct sctp_association *asoc,
const sctp_subtype_t type, const union sctp_subtype type,
void *arg, void *arg,
sctp_cmd_seq_t *commands) sctp_cmd_seq_t *commands)
{ {
......
...@@ -52,9 +52,10 @@ other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES]; ...@@ -52,9 +52,10 @@ other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES];
static const sctp_sm_table_entry_t static const sctp_sm_table_entry_t
timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES];
static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(
enum sctp_cid cid, struct net *net,
sctp_state_t state); enum sctp_cid cid,
enum sctp_state state);
static const sctp_sm_table_entry_t bug = { static const sctp_sm_table_entry_t bug = {
...@@ -76,10 +77,11 @@ static const sctp_sm_table_entry_t bug = { ...@@ -76,10 +77,11 @@ static const sctp_sm_table_entry_t bug = {
rtn; \ rtn; \
}) })
const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *net, const sctp_sm_table_entry_t *sctp_sm_lookup_event(
sctp_event_t event_type, struct net *net,
sctp_state_t state, enum sctp_event event_type,
sctp_subtype_t event_subtype) enum sctp_state state,
union sctp_subtype event_subtype)
{ {
switch (event_type) { switch (event_type) {
case SCTP_EVENT_T_CHUNK: case SCTP_EVENT_T_CHUNK:
...@@ -967,9 +969,10 @@ static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][S ...@@ -967,9 +969,10 @@ static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][S
TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE,
}; };
static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(
enum sctp_cid cid, struct net *net,
sctp_state_t state) enum sctp_cid cid,
enum sctp_state state)
{ {
if (state > SCTP_STATE_MAX) if (state > SCTP_STATE_MAX)
return &bug; return &bug;
......
...@@ -1055,7 +1055,7 @@ static int __sctp_connect(struct sock *sk, ...@@ -1055,7 +1055,7 @@ static int __sctp_connect(struct sock *sk,
struct sctp_association *asoc2; struct sctp_association *asoc2;
struct sctp_transport *transport; struct sctp_transport *transport;
union sctp_addr to; union sctp_addr to;
sctp_scope_t scope; enum sctp_scope scope;
long timeo; long timeo;
int err = 0; int err = 0;
int addrcnt = 0; int addrcnt = 0;
...@@ -1610,7 +1610,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) ...@@ -1610,7 +1610,7 @@ static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
struct sctp_initmsg *sinit; struct sctp_initmsg *sinit;
sctp_assoc_t associd = 0; sctp_assoc_t associd = 0;
sctp_cmsgs_t cmsgs = { NULL }; sctp_cmsgs_t cmsgs = { NULL };
sctp_scope_t scope; enum sctp_scope scope;
bool fill_sinfo_ttl = false, wait_connect = false; bool fill_sinfo_ttl = false, wait_connect = false;
struct sctp_datamsg *datamsg; struct sctp_datamsg *datamsg;
int msg_flags = msg->msg_flags; int msg_flags = msg->msg_flags;
......
...@@ -46,7 +46,7 @@ static int timer_max = 86400000; /* ms in one day */ ...@@ -46,7 +46,7 @@ static int timer_max = 86400000; /* ms in one day */
static int int_max = INT_MAX; static int int_max = INT_MAX;
static int sack_timer_min = 1; static int sack_timer_min = 1;
static int sack_timer_max = 500; static int sack_timer_max = 500;
static int addr_scope_max = 3; /* check sctp_scope_policy_t in include/net/sctp/constants.h for max entries */ static int addr_scope_max = SCTP_SCOPE_POLICY_MAX;
static int rwnd_scale_max = 16; static int rwnd_scale_max = 16;
static int rto_alpha_min = 0; static int rto_alpha_min = 0;
static int rto_beta_min = 0; static int rto_beta_min = 0;
......
...@@ -490,7 +490,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport, ...@@ -490,7 +490,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport,
* detected. * detected.
*/ */
void sctp_transport_lower_cwnd(struct sctp_transport *transport, void sctp_transport_lower_cwnd(struct sctp_transport *transport,
sctp_lower_cwnd_t reason) enum sctp_lower_cwnd reason)
{ {
struct sctp_association *asoc = transport->asoc; struct sctp_association *asoc = transport->asoc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment