diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-01-19 19:53:02 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-19 19:53:02 -0500 |
commit | cf9e50a920be24b734fb91f19b8844f8509cb981 (patch) | |
tree | a077c31bcfe9844bcfa7ff1fe07364b5b7958622 /include | |
parent | 0f36b018b2e314d45af86449f1a97facb1fbe300 (diff) | |
parent | a7d1f1b66c05ef4ebb58a34be7caad9af15546a4 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/sridhar/lksctp-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sctp/sctp.h | 2 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 89 |
2 files changed, 53 insertions, 38 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index a553f39f6aee..e673b2c984e9 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -175,6 +175,8 @@ void sctp_icmp_frag_needed(struct sock *, struct sctp_association *, | |||
175 | void sctp_icmp_proto_unreachable(struct sock *sk, | 175 | void sctp_icmp_proto_unreachable(struct sock *sk, |
176 | struct sctp_association *asoc, | 176 | struct sctp_association *asoc, |
177 | struct sctp_transport *t); | 177 | struct sctp_transport *t); |
178 | void sctp_backlog_migrate(struct sctp_association *assoc, | ||
179 | struct sock *oldsk, struct sock *newsk); | ||
178 | 180 | ||
179 | /* | 181 | /* |
180 | * Section: Macros, externs, and inlines | 182 | * Section: Macros, externs, and inlines |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index f5c22d77feab..8c522ae031bb 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -127,9 +127,9 @@ extern struct sctp_globals { | |||
127 | * RTO.Alpha - 1/8 (3 when converted to right shifts.) | 127 | * RTO.Alpha - 1/8 (3 when converted to right shifts.) |
128 | * RTO.Beta - 1/4 (2 when converted to right shifts.) | 128 | * RTO.Beta - 1/4 (2 when converted to right shifts.) |
129 | */ | 129 | */ |
130 | __u32 rto_initial; | 130 | unsigned long rto_initial; |
131 | __u32 rto_min; | 131 | unsigned long rto_min; |
132 | __u32 rto_max; | 132 | unsigned long rto_max; |
133 | 133 | ||
134 | /* Note: rto_alpha and rto_beta are really defined as inverse | 134 | /* Note: rto_alpha and rto_beta are really defined as inverse |
135 | * powers of two to facilitate integer operations. | 135 | * powers of two to facilitate integer operations. |
@@ -140,12 +140,18 @@ extern struct sctp_globals { | |||
140 | /* Max.Burst - 4 */ | 140 | /* Max.Burst - 4 */ |
141 | int max_burst; | 141 | int max_burst; |
142 | 142 | ||
143 | /* Valid.Cookie.Life - 60 seconds */ | ||
144 | int valid_cookie_life; | ||
145 | |||
146 | /* Whether Cookie Preservative is enabled(1) or not(0) */ | 143 | /* Whether Cookie Preservative is enabled(1) or not(0) */ |
147 | int cookie_preserve_enable; | 144 | int cookie_preserve_enable; |
148 | 145 | ||
146 | /* Valid.Cookie.Life - 60 seconds */ | ||
147 | unsigned long valid_cookie_life; | ||
148 | |||
149 | /* Delayed SACK timeout 200ms default*/ | ||
150 | unsigned long sack_timeout; | ||
151 | |||
152 | /* HB.interval - 30 seconds */ | ||
153 | unsigned long hb_interval; | ||
154 | |||
149 | /* Association.Max.Retrans - 10 attempts | 155 | /* Association.Max.Retrans - 10 attempts |
150 | * Path.Max.Retrans - 5 attempts (per destination address) | 156 | * Path.Max.Retrans - 5 attempts (per destination address) |
151 | * Max.Init.Retransmits - 8 attempts | 157 | * Max.Init.Retransmits - 8 attempts |
@@ -168,12 +174,6 @@ extern struct sctp_globals { | |||
168 | */ | 174 | */ |
169 | int rcvbuf_policy; | 175 | int rcvbuf_policy; |
170 | 176 | ||
171 | /* Delayed SACK timeout 200ms default*/ | ||
172 | int sack_timeout; | ||
173 | |||
174 | /* HB.interval - 30 seconds */ | ||
175 | int hb_interval; | ||
176 | |||
177 | /* The following variables are implementation specific. */ | 177 | /* The following variables are implementation specific. */ |
178 | 178 | ||
179 | /* Default initialization values to be applied to new associations. */ | 179 | /* Default initialization values to be applied to new associations. */ |
@@ -405,8 +405,9 @@ struct sctp_cookie { | |||
405 | /* The format of our cookie that we send to our peer. */ | 405 | /* The format of our cookie that we send to our peer. */ |
406 | struct sctp_signed_cookie { | 406 | struct sctp_signed_cookie { |
407 | __u8 signature[SCTP_SECRET_SIZE]; | 407 | __u8 signature[SCTP_SECRET_SIZE]; |
408 | __u32 __pad; /* force sctp_cookie alignment to 64 bits */ | ||
408 | struct sctp_cookie c; | 409 | struct sctp_cookie c; |
409 | }; | 410 | } __attribute__((packed)); |
410 | 411 | ||
411 | /* This is another convenience type to allocate memory for address | 412 | /* This is another convenience type to allocate memory for address |
412 | * params for the maximum size and pass such structures around | 413 | * params for the maximum size and pass such structures around |
@@ -827,7 +828,7 @@ struct sctp_transport { | |||
827 | __u32 rtt; /* This is the most recent RTT. */ | 828 | __u32 rtt; /* This is the most recent RTT. */ |
828 | 829 | ||
829 | /* RTO : The current retransmission timeout value. */ | 830 | /* RTO : The current retransmission timeout value. */ |
830 | __u32 rto; | 831 | unsigned long rto; |
831 | 832 | ||
832 | /* RTTVAR : The current RTT variation. */ | 833 | /* RTTVAR : The current RTT variation. */ |
833 | __u32 rttvar; | 834 | __u32 rttvar; |
@@ -877,22 +878,10 @@ struct sctp_transport { | |||
877 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | 878 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to |
878 | * the destination address every heartbeat interval. | 879 | * the destination address every heartbeat interval. |
879 | */ | 880 | */ |
880 | __u32 hbinterval; | 881 | unsigned long 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 | 882 | ||
891 | /* SACK delay timeout */ | 883 | /* SACK delay timeout */ |
892 | __u32 sackdelay; | 884 | unsigned long sackdelay; |
893 | |||
894 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | ||
895 | __u32 param_flags; | ||
896 | 885 | ||
897 | /* When was the last time (in jiffies) that we heard from this | 886 | /* When was the last time (in jiffies) that we heard from this |
898 | * transport? We use this to pick new active and retran paths. | 887 | * transport? We use this to pick new active and retran paths. |
@@ -904,6 +893,18 @@ struct sctp_transport { | |||
904 | */ | 893 | */ |
905 | unsigned long last_time_ecne_reduced; | 894 | unsigned long last_time_ecne_reduced; |
906 | 895 | ||
896 | /* This is the max_retrans value for the transport and will | ||
897 | * be initialized from the assocs value. This can be changed | ||
898 | * using SCTP_SET_PEER_ADDR_PARAMS socket option. | ||
899 | */ | ||
900 | __u16 pathmaxrxt; | ||
901 | |||
902 | /* PMTU : The current known path MTU. */ | ||
903 | __u32 pathmtu; | ||
904 | |||
905 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | ||
906 | __u32 param_flags; | ||
907 | |||
907 | /* The number of times INIT has been sent on this transport. */ | 908 | /* The number of times INIT has been sent on this transport. */ |
908 | int init_sent_count; | 909 | int init_sent_count; |
909 | 910 | ||
@@ -1249,6 +1250,14 @@ struct sctp_endpoint { | |||
1249 | int last_key; | 1250 | int last_key; |
1250 | int key_changed_at; | 1251 | int key_changed_at; |
1251 | 1252 | ||
1253 | /* digest: This is a digest of the sctp cookie. This field is | ||
1254 | * only used on the receive path when we try to validate | ||
1255 | * that the cookie has not been tampered with. We put | ||
1256 | * this here so we pre-allocate this once and can re-use | ||
1257 | * on every receive. | ||
1258 | */ | ||
1259 | __u8 digest[SCTP_SIGNATURE_SIZE]; | ||
1260 | |||
1252 | /* sendbuf acct. policy. */ | 1261 | /* sendbuf acct. policy. */ |
1253 | __u32 sndbuf_policy; | 1262 | __u32 sndbuf_policy; |
1254 | 1263 | ||
@@ -1499,9 +1508,9 @@ struct sctp_association { | |||
1499 | * These values will be initialized by system defaults, but can | 1508 | * These values will be initialized by system defaults, but can |
1500 | * be modified via the SCTP_RTOINFO socket option. | 1509 | * be modified via the SCTP_RTOINFO socket option. |
1501 | */ | 1510 | */ |
1502 | __u32 rto_initial; | 1511 | unsigned long rto_initial; |
1503 | __u32 rto_max; | 1512 | unsigned long rto_max; |
1504 | __u32 rto_min; | 1513 | unsigned long rto_min; |
1505 | 1514 | ||
1506 | /* Maximum number of new data packets that can be sent in a burst. */ | 1515 | /* Maximum number of new data packets that can be sent in a burst. */ |
1507 | int max_burst; | 1516 | int max_burst; |
@@ -1519,13 +1528,13 @@ struct sctp_association { | |||
1519 | __u16 init_retries; | 1528 | __u16 init_retries; |
1520 | 1529 | ||
1521 | /* The largest timeout or RTO value to use in attempting an INIT */ | 1530 | /* The largest timeout or RTO value to use in attempting an INIT */ |
1522 | __u16 max_init_timeo; | 1531 | unsigned long max_init_timeo; |
1523 | 1532 | ||
1524 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to | 1533 | /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to |
1525 | * the destination address every heartbeat interval. This value | 1534 | * the destination address every heartbeat interval. This value |
1526 | * will be inherited by all new transports. | 1535 | * will be inherited by all new transports. |
1527 | */ | 1536 | */ |
1528 | __u32 hbinterval; | 1537 | unsigned long hbinterval; |
1529 | 1538 | ||
1530 | /* This is the max_retrans value for new transports in the | 1539 | /* This is the max_retrans value for new transports in the |
1531 | * association. | 1540 | * association. |
@@ -1537,13 +1546,14 @@ struct sctp_association { | |||
1537 | */ | 1546 | */ |
1538 | __u32 pathmtu; | 1547 | __u32 pathmtu; |
1539 | 1548 | ||
1540 | /* SACK delay timeout */ | ||
1541 | __u32 sackdelay; | ||
1542 | |||
1543 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ | 1549 | /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ |
1544 | __u32 param_flags; | 1550 | __u32 param_flags; |
1545 | 1551 | ||
1546 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; | 1552 | /* SACK delay timeout */ |
1553 | unsigned long sackdelay; | ||
1554 | |||
1555 | |||
1556 | unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES]; | ||
1547 | struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; | 1557 | struct timer_list timers[SCTP_NUM_TIMEOUT_TYPES]; |
1548 | 1558 | ||
1549 | /* Transport to which SHUTDOWN chunk was last sent. */ | 1559 | /* Transport to which SHUTDOWN chunk was last sent. */ |
@@ -1648,7 +1658,10 @@ struct sctp_association { | |||
1648 | /* How many duplicated TSNs have we seen? */ | 1658 | /* How many duplicated TSNs have we seen? */ |
1649 | int numduptsns; | 1659 | int numduptsns; |
1650 | 1660 | ||
1651 | /* Number of seconds of idle time before an association is closed. */ | 1661 | /* Number of seconds of idle time before an association is closed. |
1662 | * In the association context, this is really used as a boolean | ||
1663 | * since the real timeout is stored in the timeouts array | ||
1664 | */ | ||
1652 | __u32 autoclose; | 1665 | __u32 autoclose; |
1653 | 1666 | ||
1654 | /* These are to support | 1667 | /* These are to support |