Merge ../linux-2.6-watchdog-mm
[pandora-kernel.git] / include / net / sctp / user.h
index 1c5f19f..67a30eb 100644 (file)
@@ -75,8 +75,8 @@ enum sctp_optname {
 #define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR
        SCTP_PRIMARY_ADDR,
 #define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR
-       SCTP_ADAPTION_LAYER,      
-#define SCTP_ADAPTION_LAYER SCTP_ADAPTION_LAYER
+       SCTP_ADAPTATION_LAYER,
+#define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER
        SCTP_DISABLE_FRAGMENTS,
 #define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS
        SCTP_PEER_ADDR_PARAMS,
@@ -93,6 +93,10 @@ enum sctp_optname {
 #define SCTP_STATUS SCTP_STATUS
        SCTP_GET_PEER_ADDR_INFO,
 #define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
+       SCTP_DELAYED_ACK_TIME,
+#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK_TIME
+       SCTP_CONTEXT,   /* Receive Context */
+#define SCTP_CONTEXT SCTP_CONTEXT
 
        /* Internal Socket Options. Some of the sctp library functions are 
         * implemented using these socket options.
@@ -171,10 +175,10 @@ struct sctp_sndrcvinfo {
  */
 
 enum sctp_sinfo_flags {
-       MSG_UNORDERED = 1,  /* Send/receive message unordered. */
-       MSG_ADDR_OVER = 2,  /* Override the primary destination. */
-       MSG_ABORT=4,        /* Send an ABORT message to the peer. */
-       /* MSG_EOF is already defined per socket.h */
+       SCTP_UNORDERED = 1,  /* Send/receive message unordered. */
+       SCTP_ADDR_OVER = 2,  /* Override the primary destination. */
+       SCTP_ABORT=4,        /* Send an ABORT message to the peer. */
+       SCTP_EOF=MSG_FIN,    /* Initiate graceful shutdown process. */  
 };
 
 
@@ -327,17 +331,17 @@ struct sctp_shutdown_event {
 };
 
 /*
- * 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
- *   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_flags;
        __u32 sai_length;
-       __u32 sai_adaption_ind;
+       __u32 sai_adaptation_ind;
        sctp_assoc_t sai_assoc_id;
 };
 
@@ -370,7 +374,7 @@ struct sctp_event_subscribe {
        __u8 sctp_peer_error_event;
        __u8 sctp_shutdown_event;
        __u8 sctp_partial_delivery_event;
-       __u8 sctp_adaption_layer_event;
+       __u8 sctp_adaptation_layer_event;
 };
 
 /*
@@ -391,7 +395,7 @@ union sctp_notification {
        struct sctp_remote_error sn_remote_error;
        struct sctp_send_failed sn_send_failed;
        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;
 };
 
@@ -408,7 +412,7 @@ enum sctp_sn_type {
        SCTP_REMOTE_ERROR,
        SCTP_SHUTDOWN_EVENT,
        SCTP_PARTIAL_DELIVERY_EVENT,
-       SCTP_ADAPTION_INDICATION,
+       SCTP_ADAPTATION_INDICATION,
 };
 
 /* Notification error codes used to fill up the error fields in some
@@ -484,13 +488,13 @@ struct sctp_prim {
 } __attribute__((packed, aligned(4)));
 
 /*
- * 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.
  */
-struct sctp_setadaption {
-       __u32   ssb_adaption_ind;
+struct sctp_setadaptation {
+       __u32   ssb_adaptation_ind;
 };
 
 /*
@@ -503,13 +507,41 @@ struct sctp_setadaption {
  *   unreachable. The following structure is used to access and modify an
  *   address's parameters:
  */
+enum  sctp_spp_flags {
+       SPP_HB_ENABLE = 1,              /*Enable heartbeats*/
+       SPP_HB_DISABLE = 2,             /*Disable heartbeats*/
+       SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE,
+       SPP_HB_DEMAND = 4,              /*Send heartbeat immediately*/
+       SPP_PMTUD_ENABLE = 8,           /*Enable PMTU discovery*/
+       SPP_PMTUD_DISABLE = 16,         /*Disable PMTU discovery*/
+       SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE,
+       SPP_SACKDELAY_ENABLE = 32,      /*Enable SACK*/
+       SPP_SACKDELAY_DISABLE = 64,     /*Disable SACK*/
+       SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE,
+};
+
 struct sctp_paddrparams {
        sctp_assoc_t            spp_assoc_id;
        struct sockaddr_storage spp_address;
        __u32                   spp_hbinterval;
        __u16                   spp_pathmaxrxt;
+       __u32                   spp_pathmtu;
+       __u32                   spp_sackdelay;
+       __u32                   spp_flags;
 } __attribute__((packed, aligned(4)));
 
+/* 7.1.24. Delayed Ack Timer (SCTP_DELAYED_ACK_TIME)
+ *
+ *   This options will get or set the delayed ack timer.  The time is set
+ *   in milliseconds.  If the assoc_id is 0, then this sets or gets the
+ *   endpoints default delayed ack timer value.  If the assoc_id field is
+ *   non-zero, then the set or get effects the specified association.
+ */
+struct sctp_assoc_value {
+    sctp_assoc_t            assoc_id;
+    uint32_t                assoc_value;
+};
+
 /*
  * 7.2.2 Peer Address Information
  *
@@ -530,9 +562,18 @@ struct sctp_paddrinfo {
 } __attribute__((packed, aligned(4)));
 
 /* Peer addresses's state. */
+/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
+ * calls.
+ * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
+ *              Not yet confirmed by a heartbeat and not available for data
+ *             transfers.
+ * ACTIVE : Peer address confirmed, active and available for data transfers.
+ * INACTIVE: Peer address inactive and not available for data transfers.
+ */
 enum sctp_spinfo_state {
        SCTP_INACTIVE,
        SCTP_ACTIVE,
+       SCTP_UNCONFIRMED,
        SCTP_UNKNOWN = 0xffff  /* Value used for transport state unknown */
 };