diff options
| author | Sridhar Samudrala <sri@us.ibm.com> | 2003-09-22 00:29:35 -0700 |
|---|---|---|
| committer | Sridhar Samudrala <sri@us.ibm.com> | 2003-09-22 00:29:35 -0700 |
| commit | 633dba2b1debe2b0660f6bd03a92bd90a7dbd575 (patch) | |
| tree | 1a40a6a6dfdfb7bf8686992ca66d5c449e3e77a6 /include | |
| parent | f0f06257f977b910a4870b1ef88a949b16732bf7 (diff) | |
[SCTP] ADDIP: Support for the creation of ASCONF_ACK chunk (Kevin).
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sctp.h | 109 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 10 |
2 files changed, 6 insertions, 113 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 6131e3c9aa45..a022f9f629f6 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -524,113 +524,4 @@ typedef struct sctp_addip_chunk { sctp_addiphdr_t addip_hdr; } sctp_addip_chunk_t __attribute__((packed)); -/* FIXME: Cleanup needs to continue below this line. */ - - -/* ADDIP Section 3.1.1 - * - * ASCONF-Request Correlation ID: 32 bits (unsigned integer) - * - * This is an opaque integer assigned by the sender to identify each - * request parameter. It is in host byte order and is only meaningful - * to the sender. The receiver of the ASCONF Chunk will copy this 32 - * bit value into the ASCONF Correlation ID field of the - * ASCONF-ACK. The sender of the ASCONF can use this same value in the - * ASCONF-ACK to find which request the response is for. - * - * ASCONF Parameter: TLV format - * - * Each Address configuration change is represented by a TLV parameter - * as defined in Section 3.2. One or more requests may be present in - * an ASCONF Chunk. - */ -typedef struct { - __u32 correlation; - sctp_paramhdr_t p; - __u8 payload[0]; -} sctpAsconfReq_t; - -/* ADDIP - * 3.1.1 Address/Stream Configuration Change Chunk (ASCONF) - * - * This chunk is used to communicate to the remote endpoint one of the - * configuration change requests that MUST be acknowledged. The - * information carried in the ASCONF Chunk uses the form of a - * Tag-Length-Value (TLV), as described in "3.2.1 - * Optional/Variable-length Parameter Format" in [RFC2960], for all - * variable parameters. - */ -typedef struct { - __u32 serial; - __u8 reserved[3]; - __u8 addr_type; - __u32 addr[4]; - sctpAsconfReq_t requests[0]; -} sctpAsconf_t; - -/* ADDIP - * 3.1.2 Address/Stream Configuration Acknowledgment Chunk (ASCONF-ACK) - * - * ASCONF-Request Correlation ID: 32 bits (unsigned integer) - * - * This value is copied from the ASCONF Correlation ID received in the - * ASCONF Chunk. It is used by the receiver of the ASCONF-ACK to identify - * which ASCONF parameter this response is associated with. - * - * ASCONF Parameter Response : TLV format - * - * The ASCONF Parameter Response is used in the ASCONF-ACK to report - * status of ASCONF processing. By default, if a responding endpoint - * does not include any Error Cause, a success is indicated. Thus a - * sender of an ASCONF-ACK MAY indicate complete success of all TLVs in - * an ASCONF by returning only the Chunk Type, Chunk Flags, Chunk Length - * (set to 8) and the Serial Number. - */ -typedef union { - struct { - __u32 correlation; - sctp_paramhdr_t header; /* success report */ - } success; - struct { - __u32 correlation; - sctp_paramhdr_t header; /* error cause indication */ - sctp_paramhdr_t errcause; - uint8_t request[0]; /* original request from ASCONF */ - } error; -#define __correlation success.correlation -#define __header success.header -#define __cause error.errcause -#define __request error.request -} sctpAsconfAckRsp_t; - -/* ADDIP - * 3.1.2 Address/Stream Configuration Acknowledgment Chunk (ASCONF-ACK) - * - * This chunk is used by the receiver of an ASCONF Chunk to - * acknowledge the reception. It carries zero or more results for any - * ASCONF Parameters that were processed by the receiver. - */ -typedef struct { - __u32 serial; - sctpAsconfAckRsp_t responses[0]; -} sctpAsconfAck_t; - -/********************************************************************* - * Internal structures - * - * These are data structures which never go out on the wire. - *********************************************************************/ - -/* What is this data structure for? The TLV isn't one--it is just a - * value. Perhaps this data structure ought to have a type--otherwise - * it is not unambigiously parseable. --piggy - */ -typedef struct { - struct list_head hook; - int length; /* length of the TLV */ - - /* the actually TLV to be copied into ASCONF_ACK */ - sctpAsconfAckRsp_t TLV; -} sctpAsconfAckRspNode_t; - #endif /* __LINUX_SCTP_H__ */ diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index c1ef3ee8f7ba..2b62b1afef2a 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -265,16 +265,18 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *, 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); - struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, union sctp_addr *, struct sockaddr *, int, int); struct sctp_chunk *sctp_make_asconf_set_prim(struct sctp_association *asoc, union sctp_addr *addr); +struct sctp_chunk *sctp_make_asconf_ack(struct sctp_association *asoc, + int serial, 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 *); |
