diff options
| author | Daisy Chang <daisy@teetime.dynamic.austin.ibm.com> | 2002-10-01 09:05:12 -0500 |
|---|---|---|
| committer | Jon Grimm <jgrimm@touki.austin.ibm.com> | 2002-10-01 09:05:12 -0500 |
| commit | a4cae070b155d9738ca207330b579bfec840720a (patch) | |
| tree | 016d16be266880096b34e8879ad5703b116683c9 /include | |
| parent | 22bf2be73655535f19bd282bc12a639672c39558 (diff) | |
sctp: Added the 'Unrecognized Parameter' handling.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sctp.h | 3 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 11 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 14 |
3 files changed, 26 insertions, 2 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 77502f62b660..ba784913fb09 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -155,7 +155,7 @@ typedef struct sctp_paramhdr { typedef enum { /* RFC 2960 Section 3.3.5 */ - SCTP_PARAM_HEATBEAT_INFO = __constant_htons(1), + SCTP_PARAM_HEARTBEAT_INFO = __constant_htons(1), /* RFC 2960 Section 3.3.2.1 */ SCTP_PARAM_IPV4_ADDRESS = __constant_htons(5), SCTP_PARAM_IPV6_ADDRESS = __constant_htons(6), @@ -190,6 +190,7 @@ typedef enum { SCTP_PARAM_ACTION_SKIP_ERR = __constant_htons(0xc000), } sctp_param_action_t; +enum { SCTP_PARAM_ACTION_MASK = __constant_htons(0xc000), }; /* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 5cb4858fac34..9459322a411b 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -215,7 +215,8 @@ sctp_chunk_t *sctp_make_init(const sctp_association_t *, int priority); sctp_chunk_t *sctp_make_init_ack(const sctp_association_t *, const sctp_chunk_t *, - const int priority); + const int priority, + const int unkparam_len); sctp_chunk_t *sctp_make_cookie_echo(const sctp_association_t *, const sctp_chunk_t *); sctp_chunk_t *sctp_make_cookie_ack(const sctp_association_t *, @@ -304,6 +305,14 @@ void sctp_generate_t3_rtx_event(unsigned long peer); void sctp_generate_heartbeat_event(unsigned long peer); sctp_sackhdr_t *sctp_sm_pull_sack(sctp_chunk_t *); +sctp_packet_t *sctp_abort_pkt_new(const sctp_endpoint_t *ep, + const sctp_association_t *asoc, + sctp_chunk_t *chunk, + const void *payload, + size_t paylen); +sctp_packet_t *sctp_ootb_pkt_new(const sctp_association_t *asoc, + const sctp_chunk_t *chunk); +void sctp_ootb_pkt_free(sctp_packet_t *packet); sctp_cookie_param_t * sctp_pack_cookie(const sctp_endpoint_t *, const sctp_association_t *, diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 69f99bba1d9b..89898ddb0db7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -1044,6 +1044,20 @@ sctp_association_t *sctp_endpoint_lookup_assoc(const sctp_endpoint_t *ep, sctp_endpoint_t *sctp_endpoint_is_match(sctp_endpoint_t *, const sockaddr_storage_t *); +int sctp_verify_init(const sctp_association_t *asoc, + sctp_cid_t cid, + sctp_init_chunk_t *peer_init, + sctp_chunk_t *chunk, + sctp_chunk_t **err_chunk); +int sctp_verify_param(const sctp_association_t *asoc, + sctpParam_t param, + sctp_cid_t cid, + sctp_chunk_t *chunk, + sctp_chunk_t **err_chunk); +int sctp_process_unk_param(const sctp_association_t *asoc, + sctpParam_t param, + sctp_chunk_t *chunk, + sctp_chunk_t **err_chunk); void sctp_process_init(sctp_association_t *asoc, sctp_cid_t cid, const sockaddr_storage_t *peer_addr, sctp_init_chunk_t *peer_init, int priority); |
