diff options
| author | Sridhar Samudrala <sri@us.ibm.com> | 2003-08-03 20:39:08 -0700 |
|---|---|---|
| committer | Sridhar Samudrala <sri@us.ibm.com> | 2003-08-03 20:39:08 -0700 |
| commit | 0d5567da54a78d5de6837fb4ed011666b3ea05b3 (patch) | |
| tree | 85ee683002a3f148e5bf7f0c82cc8624245c329a /include/net | |
| parent | 3a2b95149c36cb27d808ad90f9f3acb50dec1e08 (diff) | |
[SCTP] ADDIP basic infrastructure support. (Ardelle.Fan)
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 | 22 |
4 files changed, 30 insertions, 16 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..7b4f7f2d23ff 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -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; |
