diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2003-08-06 02:58:57 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-08-06 02:58:57 -0700 |
| commit | f6578e8d047c9e01d8cb883dbcc35918f7a42076 (patch) | |
| tree | 9e3e5c7f7d70b173815a57f896af247911ec4e39 /include/net | |
| parent | aa2b4427c355acaf86d2c7e6faea3472005e3cff (diff) | |
| parent | 2d14da6a15b53eda921f4cee0f82802fdbb5a7ea (diff) | |
Merge http://linux-lksctp.bkbits.net/lksctp-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/sctp/command.h | 1 | ||||
| -rw-r--r-- | include/net/sctp/constants.h | 7 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 16 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 30 |
4 files changed, 34 insertions, 20 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 1320363d12d2..420f9cf919a6 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h @@ -87,6 +87,7 @@ typedef enum { SCTP_CMD_RTO_PENDING, /* Set transport's rto_pending. */ SCTP_CMD_PART_DELIVER, /* Partial data delivery considerations. */ SCTP_CMD_RENEGE, /* Renege data on an association. */ + SCTP_CMD_SETUP_T4, /* ADDIP, setup T4 RTO timer parms. */ SCTP_CMD_LAST } sctp_verb_t; diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index d71fcafcfdc4..5e17983fffdc 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -75,6 +75,9 @@ enum { SCTP_DEFAULT_INSTREAMS = SCTP_MAX_STREAM }; #define SCTP_NUM_BASE_CHUNK_TYPES (SCTP_CID_BASE_MAX + 1) #define SCTP_NUM_CHUNK_TYPES (SCTP_NUM_BASE_CHUNKTYPES + 2) +#define SCTP_CID_ADDIP_MIN SCTP_CID_ASCONF +#define SCTP_CID_ADDIP_MAX SCTP_CID_ASCONF_ACK +#define SCTP_NUM_ADDIP_CHUNK_TYPES 2 /* These are the different flavours of event. */ typedef enum { @@ -99,6 +102,7 @@ typedef enum { SCTP_EVENT_TIMEOUT_T1_INIT, SCTP_EVENT_TIMEOUT_T2_SHUTDOWN, SCTP_EVENT_TIMEOUT_T3_RTX, + SCTP_EVENT_TIMEOUT_T4_RTO, SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD, SCTP_EVENT_TIMEOUT_HEARTBEAT, SCTP_EVENT_TIMEOUT_SACK, @@ -122,9 +126,10 @@ typedef enum { SCTP_PRIMITIVE_ABORT, SCTP_PRIMITIVE_SEND, SCTP_PRIMITIVE_REQUESTHEARTBEAT, + SCTP_PRIMITIVE_ASCONF, } sctp_event_primitive_t; -#define SCTP_EVENT_PRIMITIVE_MAX SCTP_PRIMITIVE_REQUESTHEARTBEAT +#define SCTP_EVENT_PRIMITIVE_MAX SCTP_PRIMITIVE_ASCONF #define SCTP_NUM_PRIMITIVE_TYPES (SCTP_EVENT_PRIMITIVE_MAX + 1) /* We define here a utility type for manipulating subtypes. diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index a779754deaf6..28d4c6409247 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -117,6 +117,7 @@ sctp_state_fn_t sctp_sf_tabort_8_4_8; sctp_state_fn_t sctp_sf_operr_notify; sctp_state_fn_t sctp_sf_t1_timer_expire; sctp_state_fn_t sctp_sf_t2_timer_expire; +sctp_state_fn_t sctp_sf_t4_timer_expire; sctp_state_fn_t sctp_sf_t5_timer_expire; sctp_state_fn_t sctp_sf_sendbeat_8_3; sctp_state_fn_t sctp_sf_beat_8_3; @@ -137,6 +138,8 @@ sctp_state_fn_t sctp_sf_unk_chunk; sctp_state_fn_t sctp_sf_do_8_5_1_E_sa; sctp_state_fn_t sctp_sf_cookie_echoed_err; sctp_state_fn_t sctp_sf_do_5_2_6_stale; +sctp_state_fn_t sctp_sf_do_asconf; +sctp_state_fn_t sctp_sf_do_asconf_ack; /* Prototypes for primitive event state functions. */ sctp_state_fn_t sctp_sf_do_prm_asoc; @@ -154,6 +157,7 @@ sctp_state_fn_t sctp_sf_error_closed; sctp_state_fn_t sctp_sf_error_shutdown; sctp_state_fn_t sctp_sf_ignore_primitive; sctp_state_fn_t sctp_sf_do_prm_requestheartbeat; +sctp_state_fn_t sctp_sf_do_prm_asconf; /* Prototypes for other event state functions. */ sctp_state_fn_t sctp_sf_do_9_2_start_shutdown; @@ -184,10 +188,6 @@ sctp_state_fn_t sctp_do_9_2_reshutack; sctp_state_fn_t sctp_do_8_3_hb_err; sctp_state_fn_t sctp_heartoff; -/* Prototypes for addip related state functions. Not in use. */ -sctp_state_fn_t sctp_addip_do_asconf; -sctp_state_fn_t sctp_addip_do_asconf_ack; - /* Prototypes for utility support functions. */ __u8 sctp_get_chunk_type(struct sctp_chunk *chunk); const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t, @@ -260,6 +260,14 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *, __u16 cause_code, const void *payload, size_t paylen); + +struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc, + union sctp_addr *addr, + int vparam_len); +struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc, + struct sctp_chunk *asconf, + int vparam_len); + void sctp_chunk_assign_tsn(struct sctp_chunk *); void sctp_chunk_assign_ssn(struct sctp_chunk *); diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index aae255de586b..f77373f18e7e 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -169,11 +169,11 @@ extern struct sctp_globals { /* This is the hash of all endpoints. */ int ep_hashsize; - struct sctp_hashbucket *ep_hashbucket; + struct sctp_hashbucket *ep_hashtable; /* This is the hash of all associations. */ int assoc_hashsize; - struct sctp_hashbucket *assoc_hashbucket; + struct sctp_hashbucket *assoc_hashtable; /* This is the sctp port control hash. */ int port_hashsize; @@ -207,9 +207,9 @@ extern struct sctp_globals { #define sctp_max_outstreams (sctp_globals.max_outstreams) #define sctp_address_families (sctp_globals.address_families) #define sctp_ep_hashsize (sctp_globals.ep_hashsize) -#define sctp_ep_hashbucket (sctp_globals.ep_hashbucket) +#define sctp_ep_hashtable (sctp_globals.ep_hashtable) #define sctp_assoc_hashsize (sctp_globals.assoc_hashsize) -#define sctp_assoc_hashbucket (sctp_globals.assoc_hashbucket) +#define sctp_assoc_hashtable (sctp_globals.assoc_hashtable) #define sctp_port_hashsize (sctp_globals.port_hashsize) #define sctp_port_rover (sctp_globals.port_rover) #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) @@ -571,6 +571,7 @@ struct sctp_chunk { struct sctp_ecnehdr *ecne_hdr; struct sctp_cwrhdr *ecn_cwr_hdr; struct sctp_errhdr *err_hdr; + struct sctp_addiphdr *addip_hdr; } subh; __u8 *chunk_end; @@ -1385,8 +1386,10 @@ struct sctp_association { int cookie_len; void *cookie; - /* ADDIP Extention (ADDIP) --xguo */ - /* <expected peer-serial-number> minus 1 (ADDIP sec. 4.2 C1) */ + /* ADDIP Section 4.2 Upon reception of an ASCONF Chunk. + * C1) ... "Peer-Serial-Number'. This value MUST be initialized to the + * Initial TSN Value minus 1 + */ __u32 addip_serial; } peer; @@ -1623,12 +1626,12 @@ struct sctp_association { /* ADDIP Section 4.1 ASCONF Chunk Procedures * * A2) A serial number should be assigned to the Chunk. The - * serial number should be a monotonically increasing - * number. All serial numbers are defined to be initialized at + * serial number SHOULD be a monotonically increasing + * number. The serial number SHOULD be initialized at * the start of the association to the same value as the - * Initial TSN. - * - * [and] + * Initial TSN and every time a new ASCONF chunk is created + * it is incremented by one after assigning the serial number + * to the newly created chunk. * * ADDIP * 3.1.1 Address/Stream Configuration Change Chunk (ASCONF) @@ -1637,14 +1640,11 @@ struct sctp_association { * * This value represents a Serial Number for the ASCONF * Chunk. The valid range of Serial Number is from 0 to - * 4294967295 (2**32 - 1). Serial Numbers wrap back to 0 + * 4294967295 (2^32 - 1). Serial Numbers wrap back to 0 * after reaching 4294967295. */ __u32 addip_serial; - /* Is the ADDIP extension enabled for this association? */ - char addip_enable; - /* Need to send an ECNE Chunk? */ char need_ecne; |
