diff options
author | Frank Filz <ffilz@us.ibm.com> | 2005-12-22 14:36:46 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-03 16:11:11 -0500 |
commit | 52ccb8e90c0ace233b8b740f2fc5de0dbd706b27 (patch) | |
tree | d2c06dd7b26e70c8dccf31971508005fdc82cbb2 /include/net/sctp | |
parent | fd9662555cc35f8bf9242cd7bba8b44ae168a68b (diff) |
[SCTP]: Update SCTP_PEER_ADDR_PARAMS socket option to the latest api draft.
This patch adds support to set/get heartbeat interval, maximum number of
retransmissions, pathmtu, sackdelay time for a particular transport/
association/socket as per the latest SCTP sockets api draft11.
Signed-off-by: Frank Filz <ffilz@us.ibm.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/structs.h | 76 | ||||
-rw-r--r-- | include/net/sctp/user.h | 16 |
2 files changed, 72 insertions, 20 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8e7794ee27ff..f5c22d77feab 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -277,6 +277,24 @@ struct sctp_sock { | |||
277 | __u32 default_context; | 277 | __u32 default_context; |
278 | __u32 default_timetolive; | 278 | __u32 default_timetolive; |
279 | 279 | ||
280 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | ||
281 | * the destination address every heartbeat interval. This value | ||
282 | * will be inherited by all new associations. | ||
283 | */ | ||
284 | __u32 hbinterval; | ||
285 | |||
286 | /* This is the max_retrans value for new associations. */ | ||
287 | __u16 pathmaxrxt; | ||
288 | |||
289 | /* The initial Path MTU to use for new associations. */ | ||
290 | __u32 pathmtu; | ||
291 | |||
292 | /* The default SACK delay timeout for new associations. */ | ||
293 | __u32 sackdelay; | ||
294 | |||
295 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | ||
296 | __u32 param_flags; | ||
297 | |||
280 | struct sctp_initmsg initmsg; | 298 | struct sctp_initmsg initmsg; |
281 | struct sctp_rtoinfo rtoinfo; | 299 | struct sctp_rtoinfo rtoinfo; |
282 | struct sctp_paddrparams paddrparam; | 300 | struct sctp_paddrparams paddrparam; |
@@ -845,9 +863,6 @@ struct sctp_transport { | |||
845 | /* Data that has been sent, but not acknowledged. */ | 863 | /* Data that has been sent, but not acknowledged. */ |
846 | __u32 flight_size; | 864 | __u32 flight_size; |
847 | 865 | ||
848 | /* PMTU : The current known path MTU. */ | ||
849 | __u32 pmtu; | ||
850 | |||
851 | /* Destination */ | 866 | /* Destination */ |
852 | struct dst_entry *dst; | 867 | struct dst_entry *dst; |
853 | /* Source address. */ | 868 | /* Source address. */ |
@@ -862,7 +877,22 @@ struct sctp_transport { | |||
862 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | 877 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to |
863 | * the destination address every heartbeat interval. | 878 | * the destination address every heartbeat interval. |
864 | */ | 879 | */ |
865 | int hb_interval; | 880 | __u32 hbinterval; |
881 | |||
882 | /* This is the max_retrans value for the transport and will | ||
883 | * be initialized from the assocs value. This can be changed | ||
884 | * using SCTP_SET_PEER_ADDR_PARAMS socket option. | ||
885 | */ | ||
886 | __u16 pathmaxrxt; | ||
887 | |||
888 | /* PMTU : The current known path MTU. */ | ||
889 | __u32 pathmtu; | ||
890 | |||
891 | /* SACK delay timeout */ | ||
892 | __u32 sackdelay; | ||
893 | |||
894 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | ||
895 | __u32 param_flags; | ||
866 | 896 | ||
867 | /* When was the last time (in jiffies) that we heard from this | 897 | /* When was the last time (in jiffies) that we heard from this |
868 | * transport? We use this to pick new active and retran paths. | 898 | * transport? We use this to pick new active and retran paths. |
@@ -882,22 +912,11 @@ struct sctp_transport { | |||
882 | */ | 912 | */ |
883 | int state; | 913 | int state; |
884 | 914 | ||
885 | /* hb_allowed : The current heartbeat state of this destination, | ||
886 | * : i.e. ALLOW-HB, NO-HEARTBEAT, etc. | ||
887 | */ | ||
888 | int hb_allowed; | ||
889 | |||
890 | /* These are the error stats for this destination. */ | 915 | /* These are the error stats for this destination. */ |
891 | 916 | ||
892 | /* Error count : The current error count for this destination. */ | 917 | /* Error count : The current error count for this destination. */ |
893 | unsigned short error_count; | 918 | unsigned short error_count; |
894 | 919 | ||
895 | /* This is the max_retrans value for the transport and will | ||
896 | * be initialized to proto.max_retrans.path. This can be changed | ||
897 | * using SCTP_SET_PEER_ADDR_PARAMS socket option. | ||
898 | */ | ||
899 | int max_retrans; | ||
900 | |||
901 | /* Per : A timer used by each destination. | 920 | /* Per : A timer used by each destination. |
902 | * Destination : | 921 | * Destination : |
903 | * Timer : | 922 | * Timer : |
@@ -1502,6 +1521,28 @@ struct sctp_association { | |||
1502 | /* The largest timeout or RTO value to use in attempting an INIT */ | 1521 | /* The largest timeout or RTO value to use in attempting an INIT */ |
1503 | __u16 max_init_timeo; | 1522 | __u16 max_init_timeo; |
1504 | 1523 | ||
1524 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | ||
1525 | * the destination address every heartbeat interval. This value | ||
1526 | * will be inherited by all new transports. | ||
1527 | */ | ||
1528 | __u32 hbinterval; | ||
1529 | |||
1530 | /* This is the max_retrans value for new transports in the | ||
1531 | * association. | ||
1532 | */ | ||
1533 | __u16 pathmaxrxt; | ||
1534 | |||
1535 | /* Association : The smallest PMTU discovered for all of the | ||
1536 | * PMTU : peer's transport addresses. | ||
1537 | */ | ||
1538 | __u32 pathmtu; | ||
1539 | |||
1540 | /* SACK delay timeout */ | ||
1541 | __u32 sackdelay; | ||
1542 | |||
1543 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | ||
1544 | __u32 param_flags; | ||
1545 | |||
1505 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; | 1546 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; |
1506 | struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; | 1547 | struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; |
1507 | 1548 | ||
@@ -1571,11 +1612,6 @@ struct sctp_association { | |||
1571 | */ | 1612 | */ |
1572 | wait_queue_head_t wait; | 1613 | wait_queue_head_t wait; |
1573 | 1614 | ||
1574 | /* Association : The smallest PMTU discovered for all of the | ||
1575 | * PMTU : peer's transport addresses. | ||
1576 | */ | ||
1577 | __u32 pmtu; | ||
1578 | |||
1579 | /* The message size at which SCTP fragmentation will occur. */ | 1615 | /* The message size at which SCTP fragmentation will occur. */ |
1580 | __u32 frag_point; | 1616 | __u32 frag_point; |
1581 | 1617 | ||
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index f1c3bc54526a..b9052864fa5a 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -503,11 +503,27 @@ struct sctp_setadaption { | |||
503 | * unreachable. The following structure is used to access and modify an | 503 | * unreachable. The following structure is used to access and modify an |
504 | * address's parameters: | 504 | * address's parameters: |
505 | */ | 505 | */ |
506 | enum sctp_spp_flags { | ||
507 | SPP_HB_ENABLE = 1, /*Enable heartbeats*/ | ||
508 | SPP_HB_DISABLE = 2, /*Disable heartbeats*/ | ||
509 | SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE, | ||
510 | SPP_HB_DEMAND = 4, /*Send heartbeat immediately*/ | ||
511 | SPP_PMTUD_ENABLE = 8, /*Enable PMTU discovery*/ | ||
512 | SPP_PMTUD_DISABLE = 16, /*Disable PMTU discovery*/ | ||
513 | SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE, | ||
514 | SPP_SACKDELAY_ENABLE = 32, /*Enable SACK*/ | ||
515 | SPP_SACKDELAY_DISABLE = 64, /*Disable SACK*/ | ||
516 | SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE, | ||
517 | }; | ||
518 | |||
506 | struct sctp_paddrparams { | 519 | struct sctp_paddrparams { |
507 | sctp_assoc_t spp_assoc_id; | 520 | sctp_assoc_t spp_assoc_id; |
508 | struct sockaddr_storage spp_address; | 521 | struct sockaddr_storage spp_address; |
509 | __u32 spp_hbinterval; | 522 | __u32 spp_hbinterval; |
510 | __u16 spp_pathmaxrxt; | 523 | __u16 spp_pathmaxrxt; |
524 | __u32 spp_pathmtu; | ||
525 | __u32 spp_sackdelay; | ||
526 | __u32 spp_flags; | ||
511 | } __attribute__((packed, aligned(4))); | 527 | } __attribute__((packed, aligned(4))); |
512 | 528 | ||
513 | /* | 529 | /* |