aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2008-05-09 18:13:26 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-09 18:13:26 -0400
commitd364d9276b54af16fcb4db83f1315b620daec102 (patch)
tree1554b1e3f951cdbde62500056f3b26630c8e09ab /include
parent5c5e12898af0978a780991950be12d0d73c02f04 (diff)
sctp: Bring SCTP_DELAYED_ACK socket option into API compliance
Brings delayed_ack socket option set/get into line with the latest ietf socket extensions API draft, while maintaining backwards compatibility. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/structs.h4
-rw-r--r--include/net/sctp/user.h28
2 files changed, 25 insertions, 7 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 0ce0443c5b79..e11151702bee 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -300,6 +300,7 @@ struct sctp_sock {
300 300
301 /* The default SACK delay timeout for new associations. */ 301 /* The default SACK delay timeout for new associations. */
302 __u32 sackdelay; 302 __u32 sackdelay;
303 __u32 sackfreq;
303 304
304 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */ 305 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
305 __u32 param_flags; 306 __u32 param_flags;
@@ -938,6 +939,7 @@ struct sctp_transport {
938 939
939 /* SACK delay timeout */ 940 /* SACK delay timeout */
940 unsigned long sackdelay; 941 unsigned long sackdelay;
942 __u32 sackfreq;
941 943
942 /* When was the last time (in jiffies) that we heard from this 944 /* When was the last time (in jiffies) that we heard from this
943 * transport? We use this to pick new active and retran paths. 945 * transport? We use this to pick new active and retran paths.
@@ -1542,6 +1544,7 @@ struct sctp_association {
1542 * : SACK's are not delayed (see Section 6). 1544 * : SACK's are not delayed (see Section 6).
1543 */ 1545 */
1544 __u8 sack_needed; /* Do we need to sack the peer? */ 1546 __u8 sack_needed; /* Do we need to sack the peer? */
1547 __u32 sack_cnt;
1545 1548
1546 /* These are capabilities which our peer advertised. */ 1549 /* These are capabilities which our peer advertised. */
1547 __u8 ecn_capable; /* Can peer do ECN? */ 1550 __u8 ecn_capable; /* Can peer do ECN? */
@@ -1651,6 +1654,7 @@ struct sctp_association {
1651 1654
1652 /* SACK delay timeout */ 1655 /* SACK delay timeout */
1653 unsigned long sackdelay; 1656 unsigned long sackdelay;
1657 __u32 sackfreq;
1654 1658
1655 1659
1656 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES]; 1660 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES];
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 9619b9d35c9e..31371d2553e8 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -93,8 +93,9 @@ enum sctp_optname {
93#define SCTP_STATUS SCTP_STATUS 93#define SCTP_STATUS SCTP_STATUS
94 SCTP_GET_PEER_ADDR_INFO, 94 SCTP_GET_PEER_ADDR_INFO,
95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO 95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
96 SCTP_DELAYED_ACK_TIME, 96 SCTP_DELAYED_ACK,
97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK_TIME 97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK
98#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK
98 SCTP_CONTEXT, /* Receive Context */ 99 SCTP_CONTEXT, /* Receive Context */
99#define SCTP_CONTEXT SCTP_CONTEXT 100#define SCTP_CONTEXT SCTP_CONTEXT
100 SCTP_FRAGMENT_INTERLEAVE, 101 SCTP_FRAGMENT_INTERLEAVE,
@@ -618,13 +619,26 @@ struct sctp_authkeyid {
618}; 619};
619 620
620 621
621/* 7.1.23. Delayed Ack Timer (SCTP_DELAYED_ACK_TIME) 622/*
623 * 7.1.23. Get or set delayed ack timer (SCTP_DELAYED_SACK)
622 * 624 *
623 * This options will get or set the delayed ack timer. The time is set 625 * This option will effect the way delayed acks are performed. This
624 * in milliseconds. If the assoc_id is 0, then this sets or gets the 626 * option allows you to get or set the delayed ack time, in
625 * endpoints default delayed ack timer value. If the assoc_id field is 627 * milliseconds. It also allows changing the delayed ack frequency.
626 * non-zero, then the set or get effects the specified association. 628 * Changing the frequency to 1 disables the delayed sack algorithm. If
629 * the assoc_id is 0, then this sets or gets the endpoints default
630 * values. If the assoc_id field is non-zero, then the set or get
631 * effects the specified association for the one to many model (the
632 * assoc_id field is ignored by the one to one model). Note that if
633 * sack_delay or sack_freq are 0 when setting this option, then the
634 * current values will remain unchanged.
627 */ 635 */
636struct sctp_sack_info {
637 sctp_assoc_t sack_assoc_id;
638 uint32_t sack_delay;
639 uint32_t sack_freq;
640};
641
628struct sctp_assoc_value { 642struct sctp_assoc_value {
629 sctp_assoc_t assoc_id; 643 sctp_assoc_t assoc_id;
630 uint32_t assoc_value; 644 uint32_t assoc_value;