sctp.h   sctp.h 
skipping to change at line 30 skipping to change at line 30
* Written or modified by: * Written or modified by:
* La Monte H.P. Yarroll <piggy@acm.org> * La Monte H.P. Yarroll <piggy@acm.org>
* R. Stewart <randall@sctp.chicago.il.us> * R. Stewart <randall@sctp.chicago.il.us>
* K. Morneau <kmorneau@cisco.com> * K. Morneau <kmorneau@cisco.com>
* Q. Xie <qxie1@email.mot.com> * Q. Xie <qxie1@email.mot.com>
* Karl Knutson <karl@athena.chicago.il.us> * Karl Knutson <karl@athena.chicago.il.us>
* Jon Grimm <jgrimm@austin.ibm.com> * Jon Grimm <jgrimm@austin.ibm.com>
* Daisy Chang <daisyc@us.ibm.com> * Daisy Chang <daisyc@us.ibm.com>
* Inaky Perez-Gonzalez <inaky.gonzalez@intel.com> * Inaky Perez-Gonzalez <inaky.gonzalez@intel.com>
* Sridhar Samudrala <sri@us.ibm.com> * Sridhar Samudrala <sri@us.ibm.com>
* Vlad Yasevich <vladislav.yasevich@hp.com>
*/ */
#ifndef __linux_sctp_h__ #ifndef __linux_sctp_h__
#define __linux_sctp_h__ #define __linux_sctp_h__
#include <stdint.h> #include <stdint.h>
#include <linux/types.h> #include <linux/types.h>
#include <sys/socket.h> #include <sys/socket.h>
__BEGIN_DECLS __BEGIN_DECLS
skipping to change at line 79 skipping to change at line 80
SCTP_INITMSG, SCTP_INITMSG,
#define SCTP_INITMSG SCTP_INITMSG #define SCTP_INITMSG SCTP_INITMSG
SCTP_NODELAY, /* Get/set nodelay option. */ SCTP_NODELAY, /* Get/set nodelay option. */
#define SCTP_NODELAY SCTP_NODELAY #define SCTP_NODELAY SCTP_NODELAY
SCTP_AUTOCLOSE, SCTP_AUTOCLOSE,
#define SCTP_AUTOCLOSE SCTP_AUTOCLOSE #define SCTP_AUTOCLOSE SCTP_AUTOCLOSE
SCTP_SET_PEER_PRIMARY_ADDR, SCTP_SET_PEER_PRIMARY_ADDR,
#define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR #define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR
SCTP_PRIMARY_ADDR, SCTP_PRIMARY_ADDR,
#define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR #define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR
SCTP_ADAPTION_LAYER, SCTP_ADAPTATION_LAYER,
#define SCTP_ADAPTION_LAYER SCTP_ADAPTION_LAYER #define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER
SCTP_DISABLE_FRAGMENTS, SCTP_DISABLE_FRAGMENTS,
#define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS #define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS
SCTP_PEER_ADDR_PARAMS, SCTP_PEER_ADDR_PARAMS,
#define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS #define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS
SCTP_DEFAULT_SEND_PARAM, SCTP_DEFAULT_SEND_PARAM,
#define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM #define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM
SCTP_EVENTS, SCTP_EVENTS,
#define SCTP_EVENTS SCTP_EVENTS #define SCTP_EVENTS SCTP_EVENTS
SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */ SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */
#define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR #define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR
SCTP_MAXSEG, /* Get/set maximum fragment. */ SCTP_MAXSEG, /* Get/set maximum fragment. */
#define SCTP_MAXSEG SCTP_MAXSEG #define SCTP_MAXSEG SCTP_MAXSEG
SCTP_STATUS, SCTP_STATUS,
#define SCTP_STATUS SCTP_STATUS #define SCTP_STATUS SCTP_STATUS
SCTP_GET_PEER_ADDR_INFO, SCTP_GET_PEER_ADDR_INFO,
#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO #define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
SCTP_DELAYED_ACK_TIME, SCTP_DELAYED_ACK_TIME,
#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK_TIME #define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK_TIME
SCTP_CONTEXT, /* Receive Context */
#define SCTP_CONTEXT SCTP_CONTEXT
SCTP_FRAGMENT_INTERLEAVE,
#define SCTP_FRAGMENT_INTERLEAVE SCTP_FRAGMENT_INTERLEAVE
SCTP_PARTIAL_DELIVERY_POINT, /* Set/Get partial delivery point */
#define SCTP_PARTIAL_DELIVERY_POINT SCTP_PARTIAL_DELIVERY_POINT
SCTP_MAX_BURST, /* Set/Get max burst */
#define SCTP_MAX_BURST SCTP_MAX_BURST
/* Internal Socket Options. Some of the sctp library functions are /* Internal Socket Options. Some of the sctp library functions are
* implemented using these socket options. * implemented using these socket options.
*/ */
SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */ SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */
#define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD #define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD
SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */ SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */
#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM
SCTP_SOCKOPT_PEELOFF, /* peel off association. */ SCTP_SOCKOPT_PEELOFF, /* peel off association. */
#define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF
SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */ SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */
#define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD #define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD
SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */ SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */
#define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD #define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD
SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */ SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */
#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD #define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD
SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */
#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD #define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD
SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */
#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS
SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
}; };
/* /*
* 5.2.1 SCTP Initiation Structure (SCTP_INIT) * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
* *
* This cmsghdr structure provides information for initializing new * This cmsghdr structure provides information for initializing new
* SCTP associations with sendmsg(). The SCTP_INITMSG socket option * SCTP associations with sendmsg(). The SCTP_INITMSG socket option
* uses this same data structure. This structure is not used for * uses this same data structure. This structure is not used for
* recvmsg(). * recvmsg().
* *
skipping to change at line 192 skipping to change at line 201
typedef union { typedef union {
__u8 raw; __u8 raw;
struct sctp_initmsg init; struct sctp_initmsg init;
struct sctp_sndrcvinfo sndrcv; struct sctp_sndrcvinfo sndrcv;
} sctp_cmsg_data_t; } sctp_cmsg_data_t;
/* These are cmsg_types. */ /* These are cmsg_types. */
typedef enum sctp_cmsg_type { typedef enum sctp_cmsg_type {
SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */
#define SCTP_INIT SCTP_INIT
SCTP_SNDRCV, /* 5.2.2 SCTP Header Information Structure * / SCTP_SNDRCV, /* 5.2.2 SCTP Header Information Structure * /
#define SCTP_SNDRCV SCTP_SNDRCV
} sctp_cmsg_t; } sctp_cmsg_t;
/* /*
* 5.3.1.1 SCTP_ASSOC_CHANGE * 5.3.1.1 SCTP_ASSOC_CHANGE
* *
* Communication notifications inform the ULP that an SCTP association * Communication notifications inform the ULP that an SCTP association
* has either begun or ended. The identifier for a new association is * has either begun or ended. The identifier for a new association is
* provided by this notificaion. The notification information has the * provided by this notificaion. The notification information has the
* following format: * following format:
* *
*/ */
struct sctp_assoc_change { struct sctp_assoc_change {
__u16 sac_type; __u16 sac_type;
__u16 sac_flags; __u16 sac_flags;
__u32 sac_length; __u32 sac_length;
__u16 sac_state; __u16 sac_state;
__u16 sac_error; __u16 sac_error;
__u16 sac_outbound_streams; __u16 sac_outbound_streams;
__u16 sac_inbound_streams; __u16 sac_inbound_streams;
sctp_assoc_t sac_assoc_id; sctp_assoc_t sac_assoc_id;
__u8 sac_info[0];
}; };
/* /*
* sac_state: 32 bits (signed integer) * sac_state: 32 bits (signed integer)
* *
* This field holds one of a number of values that communicate the * This field holds one of a number of values that communicate the
* event that happened to the association. They include: * event that happened to the association. They include:
* *
* Note: The following state names deviate from the API draft as * Note: The following state names deviate from the API draft as
* the names clash too easily with other kernel symbols. * the names clash too easily with other kernel symbols.
skipping to change at line 261 skipping to change at line 273
* *
* This field holds one of a number of values that communicate the * This field holds one of a number of values that communicate the
* event that happened to the address. They include: * event that happened to the address. They include:
*/ */
enum sctp_spc_state { enum sctp_spc_state {
SCTP_ADDR_AVAILABLE, SCTP_ADDR_AVAILABLE,
SCTP_ADDR_UNREACHABLE, SCTP_ADDR_UNREACHABLE,
SCTP_ADDR_REMOVED, SCTP_ADDR_REMOVED,
SCTP_ADDR_ADDED, SCTP_ADDR_ADDED,
SCTP_ADDR_MADE_PRIM, SCTP_ADDR_MADE_PRIM,
SCTP_ADDR_CONFIRMED,
}; };
/* /*
* 5.3.1.3 SCTP_REMOTE_ERROR * 5.3.1.3 SCTP_REMOTE_ERROR
* *
* A remote peer may send an Operational Error message to its peer. * A remote peer may send an Operational Error message to its peer.
* This message indicates a variety of error conditions on an * This message indicates a variety of error conditions on an
* association. The entire error TLV as it appears on the wire is * association. The entire error TLV as it appears on the wire is
* included in a SCTP_REMOTE_ERROR event. Please refer to the SCTP * included in a SCTP_REMOTE_ERROR event. Please refer to the SCTP
* specification [SCTP] and any extensions for a list of possible * specification [SCTP] and any extensions for a list of possible
skipping to change at line 329 skipping to change at line 342
* inform the application that it should cease sending data. * inform the application that it should cease sending data.
*/ */
struct sctp_shutdown_event { struct sctp_shutdown_event {
__u16 sse_type; __u16 sse_type;
__u16 sse_flags; __u16 sse_flags;
__u32 sse_length; __u32 sse_length;
sctp_assoc_t sse_assoc_id; sctp_assoc_t sse_assoc_id;
}; };
/* /*
* 5.3.1.6 SCTP_ADAPTION_INDICATION * 5.3.1.6 SCTP_ADAPTATION_INDICATION
* *
* When a peer sends a Adaption Layer Indication parameter , SCTP * When a peer sends a Adaptation Layer Indication parameter , SCTP
* delivers this notification to inform the application * delivers this notification to inform the application
* that of the peers requested adaption layer. * that of the peers requested adaptation layer.
*/ */
struct sctp_adaption_event { struct sctp_adaptation_event {
__u16 sai_type; __u16 sai_type;
__u16 sai_flags; __u16 sai_flags;
__u32 sai_length; __u32 sai_length;
__u32 sai_adaption_ind; __u32 sai_adaptation_ind;
sctp_assoc_t sai_assoc_id; sctp_assoc_t sai_assoc_id;
}; };
/* /*
* 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT * 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT
* *
* When a reciever is engaged in a partial delivery of a * When a receiver is engaged in a partial delivery of a
* message this notification will be used to inidicate * message this notification will be used to indicate
* various events. * various events.
*/ */
struct sctp_pdapi_event { struct sctp_pdapi_event {
__u16 pdapi_type; __u16 pdapi_type;
__u16 pdapi_flags; __u16 pdapi_flags;
__u32 pdapi_length; __u32 pdapi_length;
__u32 pdapi_indication; __u32 pdapi_indication;
sctp_assoc_t pdapi_assoc_id; sctp_assoc_t pdapi_assoc_id;
}; };
skipping to change at line 372 skipping to change at line 385
* Ancillary Data and Notification Interest Options * Ancillary Data and Notification Interest Options
*/ */
struct sctp_event_subscribe { struct sctp_event_subscribe {
__u8 sctp_data_io_event; __u8 sctp_data_io_event;
__u8 sctp_association_event; __u8 sctp_association_event;
__u8 sctp_address_event; __u8 sctp_address_event;
__u8 sctp_send_failure_event; __u8 sctp_send_failure_event;
__u8 sctp_peer_error_event; __u8 sctp_peer_error_event;
__u8 sctp_shutdown_event; __u8 sctp_shutdown_event;
__u8 sctp_partial_delivery_event; __u8 sctp_partial_delivery_event;
__u8 sctp_adaption_layer_event; __u8 sctp_adaptation_layer_event;
}; };
/* /*
* 5.3.1 SCTP Notification Structure * 5.3.1 SCTP Notification Structure
* *
* The notification structure is defined as the union of all * The notification structure is defined as the union of all
* notification types. * notification types.
* *
*/ */
union sctp_notification { union sctp_notification {
struct { struct {
__u16 sn_type; /* Notification type. */ __u16 sn_type; /* Notification type. */
__u16 sn_flags; __u16 sn_flags;
__u32 sn_length; __u32 sn_length;
} sn_header; } sn_header;
struct sctp_assoc_change sn_assoc_change; struct sctp_assoc_change sn_assoc_change;
struct sctp_paddr_change sn_paddr_change; struct sctp_paddr_change sn_paddr_change;
struct sctp_remote_error sn_remote_error; struct sctp_remote_error sn_remote_error;
struct sctp_send_failed sn_send_failed; struct sctp_send_failed sn_send_failed;
struct sctp_shutdown_event sn_shutdown_event; struct sctp_shutdown_event sn_shutdown_event;
struct sctp_adaption_event sn_adaption_event; struct sctp_adaptation_event sn_adaptation_event;
struct sctp_pdapi_event sn_pdapi_event; struct sctp_pdapi_event sn_pdapi_event;
}; };
/* Section 5.3.1 /* Section 5.3.1
* All standard values for sn_type flags are greater than 2^15. * All standard values for sn_type flags are greater than 2^15.
* Values from 2^15 and down are reserved. * Values from 2^15 and down are reserved.
*/ */
enum sctp_sn_type { enum sctp_sn_type {
SCTP_SN_TYPE_BASE = (1<<15), SCTP_SN_TYPE_BASE = (1<<15),
SCTP_ASSOC_CHANGE, SCTP_ASSOC_CHANGE,
SCTP_PEER_ADDR_CHANGE, SCTP_PEER_ADDR_CHANGE,
SCTP_SEND_FAILED, SCTP_SEND_FAILED,
SCTP_REMOTE_ERROR, SCTP_REMOTE_ERROR,
SCTP_SHUTDOWN_EVENT, SCTP_SHUTDOWN_EVENT,
SCTP_PARTIAL_DELIVERY_EVENT, SCTP_PARTIAL_DELIVERY_EVENT,
SCTP_ADAPTION_INDICATION, SCTP_ADAPTATION_INDICATION,
}; };
/* Notification error codes used to fill up the error fields in some /* Notification error codes used to fill up the error fields in some
* notifications. * notifications.
* SCTP_PEER_ADDRESS_CHAGE : spc_error * SCTP_PEER_ADDRESS_CHAGE : spc_error
* SCTP_ASSOC_CHANGE : sac_error * SCTP_ASSOC_CHANGE : sac_error
* These names should be potentially included in the draft 04 of the SCTP * These names should be potentially included in the draft 04 of the SCTP
* sockets API specification. * sockets API specification.
*/ */
typedef enum sctp_sn_error { typedef enum sctp_sn_error {
skipping to change at line 480 skipping to change at line 493
} __attribute__((packed, aligned(4))); } __attribute__((packed, aligned(4)));
/* /*
* 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
* *
* Requests that the local SCTP stack use the enclosed peer address as * Requests that the local SCTP stack use the enclosed peer address as
* the association primary. The enclosed address must be one of the * the association primary. The enclosed address must be one of the
* association peer's addresses. The following structure is used to * association peer's addresses. The following structure is used to
* make a set peer primary request: * make a set peer primary request:
*/ */
struct sctp_prim { struct sctp_setprim {
sctp_assoc_t ssp_assoc_id; sctp_assoc_t ssp_assoc_id;
struct sockaddr_storage ssp_addr; struct sockaddr_storage ssp_addr;
} __attribute__((packed, aligned(4))); } __attribute__((packed, aligned(4)));
/* For backward compatibility use, define the old name too */
#define sctp_prim sctp_setprim
/* /*
* 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
* *
* Requests that the local endpoint set the specified Adaption Layer * Requests that the local endpoint set the specified Adaptation Layer
* Indication parameter for all future INIT and INIT-ACK exchanges. * Indication parameter for all future INIT and INIT-ACK exchanges.
*/ */
struct sctp_setadaption { struct sctp_setadaptation {
__u32 ssb_adaption_ind; __u32 ssb_adaptation_ind;
}; };
/* /*
* 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) * 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS)
* *
* Applications can enable or disable heartbeats for any peer address * Applications can enable or disable heartbeats for any peer address
* of an association, modify an address's heartbeat interval, force a * of an association, modify an address's heartbeat interval, force a
* heartbeat to be sent immediately, and adjust the address's maximum * heartbeat to be sent immediately, and adjust the address's maximum
* number of retransmissions sent before an address is considered * number of retransmissions sent before an address is considered
* unreachable. The following structure is used to access and modify an * unreachable. The following structure is used to access and modify an
* address's parameters: * address's parameters:
*/ */
enum sctp_spp_flags { enum sctp_spp_flags {
SPP_HB_ENABLE = 1, /*Enable heartbeats*/ SPP_HB_ENABLE = 1<<0, /*Enable heartbeats*/
SPP_HB_DISABLE = 2, /*Disable heartbeats*/ SPP_HB_DISABLE = 1<<1, /*Disable heartbeats*/
SPP_HB_DEMAND = 4, /*Send heartbeat immediately*/ SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE,
SPP_PMTUD_ENABLE = 8, /*Enable PMTU discovery*/ SPP_HB_DEMAND = 1<<2, /*Send heartbeat immediately*/
SPP_PMTUD_DISABLE = 16, /*Disable PMTU discovery*/ SPP_PMTUD_ENABLE = 1<<3, /*Enable PMTU discovery*/
SPP_SACKDELAY_ENABLE = 32, /*Enable SACK*/ SPP_PMTUD_DISABLE = 1<<4, /*Disable PMTU discovery*/
SPP_SACKDELAY_DISABLE = 64, /*Disable SACK*/ SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE,
SPP_SACKDELAY_ENABLE = 1<<5, /*Enable SACK*/
SPP_SACKDELAY_DISABLE = 1<<6, /*Disable SACK*/
SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE,
SPP_HB_TIME_IS_ZERO = 1<<7, /* Set HB delay to 0 */
}; };
struct sctp_paddrparams { struct sctp_paddrparams {
sctp_assoc_t spp_assoc_id; sctp_assoc_t spp_assoc_id;
struct sockaddr_storage spp_address; struct sockaddr_storage spp_address;
__u32 spp_hbinterval; __u32 spp_hbinterval;
__u16 spp_pathmaxrxt; __u16 spp_pathmaxrxt;
__u32 spp_pathmtu; __u32 spp_pathmtu;
__u32 spp_sackdelay; __u32 spp_sackdelay;
__u32 spp_flags; __u32 spp_flags;
skipping to change at line 560 skipping to change at line 580
__u32 spinfo_cwnd; __u32 spinfo_cwnd;
__u32 spinfo_srtt; __u32 spinfo_srtt;
__u32 spinfo_rto; __u32 spinfo_rto;
__u32 spinfo_mtu; __u32 spinfo_mtu;
} __attribute__((packed, aligned(4))); } __attribute__((packed, aligned(4)));
/* Peer addresses's state. */ /* Peer addresses's state. */
enum sctp_spinfo_state { enum sctp_spinfo_state {
SCTP_INACTIVE, SCTP_INACTIVE,
SCTP_ACTIVE, SCTP_ACTIVE,
SCTP_UNCONFIRMED
}; };
/* /*
* 7.2.1 Association Status (SCTP_STATUS) * 7.2.1 Association Status (SCTP_STATUS)
* *
* Applications can retrieve current status information about an * Applications can retrieve current status information about an
* association, including association state, peer receiver window size, * association, including association state, peer receiver window size,
* number of unacked data chunks, and number of data chunks pending * number of unacked data chunks, and number of data chunks pending
* receipt. This information is read-only. The following structure is * receipt. This information is read-only. The following structure is
* used to access this information: * used to access this information:
skipping to change at line 608 skipping to change at line 629
* This parameter struct is used by SCTP_GET_PEER_ADDRS and * This parameter struct is used by SCTP_GET_PEER_ADDRS and
* SCTP_GET_LOCAL_ADDRS socket options used internally to implement * SCTP_GET_LOCAL_ADDRS socket options used internally to implement
* sctp_getpaddrs() and sctp_getladdrs() API. * sctp_getpaddrs() and sctp_getladdrs() API.
*/ */
struct sctp_getaddrs_old { struct sctp_getaddrs_old {
sctp_assoc_t assoc_id; sctp_assoc_t assoc_id;
int addr_num; int addr_num;
struct sockaddr *addrs; struct sockaddr *addrs;
}; };
struct sctp_getaddrs { struct sctp_getaddrs {
sctp_assoc_t assoc_id; /*input*/ sctp_assoc_t assoc_id; /*input*/
__u32 addr_num; /*output*/ __u32 addr_num; /*output*/
__u8 addrs[0]; /*output, variable size*/ __u8 addrs[0]; /*output, variable size*/
}; };
/* These are bit fields for msghdr->msg_flags. See section 5.1. */ /* These are bit fields for msghdr->msg_flags. See section 5.1. */
/* On user space Linux, these live in <bits/socket.h> as an enum. */ /* On user space Linux, these live in <bits/socket.h> as an enum. */
enum sctp_msg_flags { enum sctp_msg_flags {
MSG_NOTIFICATION = 0x8000, MSG_NOTIFICATION = 0x8000,
#define MSG_NOTIFICATION MSG_NOTIFICATION #define MSG_NOTIFICATION MSG_NOTIFICATION
}; };
/* /*
skipping to change at line 694 skipping to change at line 715
/* This library function assists the user with the advanced features /* This library function assists the user with the advanced features
* of SCTP. This is a new SCTP API described in the section 8.8 of the * of SCTP. This is a new SCTP API described in the section 8.8 of the
* Sockets API Extensions for SCTP. This is implemented using the * Sockets API Extensions for SCTP. This is implemented using the
* recvmsg() interface. * recvmsg() interface.
*/ */
int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from, int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo,
int *msg_flags); int *msg_flags);
/* Return the address length for an address family. */
int sctp_getaddrlen(sa_family_t family);
__END_DECLS __END_DECLS
#endif /* __linux_sctp_h__ */ #endif /* __linux_sctp_h__ */
 End of changes. 26 change blocks. 
31 lines changed or deleted 55 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/