sctp: implement prsctp TTL policy
[deliverable/linux.git] / include / net / sctp / structs.h
index 5a404c354f4c787e57a6ab6ca68b3ffc537eb1cc..6bcda715008e55456e3fa1abc978dccd0f2f8979 100644 (file)
@@ -210,14 +210,15 @@ struct sctp_sock {
        int user_frag;
 
        __u32 autoclose;
-       __u8 nodelay;
-       __u8 disable_fragments;
-       __u8 v4mapped;
-       __u8 frag_interleave;
        __u32 adaptation_ind;
        __u32 pd_point;
-       __u8 recvrcvinfo;
-       __u8 recvnxtinfo;
+       __u16   nodelay:1,
+               disable_fragments:1,
+               v4mapped:1,
+               frag_interleave:1,
+               recvrcvinfo:1,
+               recvnxtinfo:1,
+               data_ready_signalled:1;
 
        atomic_t pd_mode;
        /* Receive to here while partial delivery is in effect. */
@@ -565,6 +566,9 @@ struct sctp_chunk {
        /* This points to the sk_buff containing the actual data.  */
        struct sk_buff *skb;
 
+       /* In case of GSO packets, this will store the head one */
+       struct sk_buff *head_skb;
+
        /* These are the SCTP headers by reverse order in a packet.
         * Note that some of these may happen more than once.  In that
         * case, we point at the "current" one, whatever that means
@@ -598,6 +602,16 @@ struct sctp_chunk {
        /* This needs to be recoverable for SCTP_SEND_FAILED events. */
        struct sctp_sndrcvinfo sinfo;
 
+       /* We use this field to record param for prsctp policies,
+        * for TTL policy, it is the time_to_drop of this chunk,
+        * for RTX policy, it is the max_sent_count of this chunk,
+        * for PRIO policy, it is the priority of this chunk.
+        */
+       unsigned long prsctp_param;
+
+       /* How many times this chunk have been sent, for prsctp RTX policy */
+       int sent_count;
+
        /* Which association does this belong to?  */
        struct sctp_association *asoc;
 
@@ -695,6 +709,8 @@ struct sctp_packet {
        size_t overhead;
        /* This is the total size of all chunks INCLUDING padding.  */
        size_t size;
+       /* This is the maximum size this packet may have */
+       size_t max_size;
 
        /* The packet is destined for this transport address.
         * The function we finally use to pass down to the next lower
@@ -1250,7 +1266,8 @@ struct sctp_endpoint {
        /* SCTP-AUTH: endpoint shared keys */
        struct list_head endpoint_shared_keys;
        __u16 active_key_id;
-       __u8  auth_enable;
+       __u8  auth_enable:1,
+             prsctp_enable:1;
 };
 
 /* Recover the outter endpoint structure. */
@@ -1842,9 +1859,13 @@ struct sctp_association {
        __u16 active_key_id;
 
        __u8 need_ecne:1,       /* Need to send an ECNE Chunk? */
-            temp:1;            /* Is it a temporary association? */
+            temp:1,            /* Is it a temporary association? */
+            prsctp_enable:1;
 
        struct sctp_priv_assoc_stats stats;
+
+       __u64 abandoned_unsent[SCTP_PR_INDEX(MAX) + 1];
+       __u64 abandoned_sent[SCTP_PR_INDEX(MAX) + 1];
 };
 
 
This page took 0.025445 seconds and 5 git commands to generate.