aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r--include/net/sctp/structs.h70
1 files changed, 36 insertions, 34 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 219043a67bf7..f9e7473613bd 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -443,7 +443,7 @@ struct sctp_signed_cookie {
443 __u8 signature[SCTP_SECRET_SIZE]; 443 __u8 signature[SCTP_SECRET_SIZE];
444 __u32 __pad; /* force sctp_cookie alignment to 64 bits */ 444 __u32 __pad; /* force sctp_cookie alignment to 64 bits */
445 struct sctp_cookie c; 445 struct sctp_cookie c;
446} __attribute__((packed)); 446} __packed;
447 447
448/* This is another convenience type to allocate memory for address 448/* This is another convenience type to allocate memory for address
449 * params for the maximum size and pass such structures around 449 * params for the maximum size and pass such structures around
@@ -488,7 +488,7 @@ typedef struct sctp_sender_hb_info {
488 union sctp_addr daddr; 488 union sctp_addr daddr;
489 unsigned long sent_at; 489 unsigned long sent_at;
490 __u64 hb_nonce; 490 __u64 hb_nonce;
491} __attribute__((packed)) sctp_sender_hb_info_t; 491} __packed sctp_sender_hb_info_t;
492 492
493/* 493/*
494 * RFC 2960 1.3.2 Sequenced Delivery within Streams 494 * RFC 2960 1.3.2 Sequenced Delivery within Streams
@@ -643,17 +643,15 @@ struct sctp_pf {
643struct sctp_datamsg { 643struct sctp_datamsg {
644 /* Chunks waiting to be submitted to lower layer. */ 644 /* Chunks waiting to be submitted to lower layer. */
645 struct list_head chunks; 645 struct list_head chunks;
646 /* Chunks that have been transmitted. */
647 size_t msg_size;
648 /* Reference counting. */ 646 /* Reference counting. */
649 atomic_t refcnt; 647 atomic_t refcnt;
650 /* When is this message no longer interesting to the peer? */ 648 /* When is this message no longer interesting to the peer? */
651 unsigned long expires_at; 649 unsigned long expires_at;
652 /* Did the messenge fail to send? */ 650 /* Did the messenge fail to send? */
653 int send_error; 651 int send_error;
654 char send_failed; 652 u8 send_failed:1,
655 /* Control whether chunks from this message can be abandoned. */ 653 can_abandon:1, /* can chunks from this message can be abandoned. */
656 char can_abandon; 654 can_delay; /* should this message be Nagle delayed */
657}; 655};
658 656
659struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, 657struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *,
@@ -757,7 +755,6 @@ struct sctp_chunk {
757#define SCTP_NEED_FRTX 0x1 755#define SCTP_NEED_FRTX 0x1
758#define SCTP_DONT_FRTX 0x2 756#define SCTP_DONT_FRTX 0x2
759 __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */ 757 __u16 rtt_in_progress:1, /* This chunk used for RTT calc? */
760 resent:1, /* Has this chunk ever been resent. */
761 has_tsn:1, /* Does this chunk have a TSN yet? */ 758 has_tsn:1, /* Does this chunk have a TSN yet? */
762 has_ssn:1, /* Does this chunk have a SSN yet? */ 759 has_ssn:1, /* Does this chunk have a SSN yet? */
763 singleton:1, /* Only chunk in the packet? */ 760 singleton:1, /* Only chunk in the packet? */
@@ -879,7 +876,30 @@ struct sctp_transport {
879 876
880 /* Reference counting. */ 877 /* Reference counting. */
881 atomic_t refcnt; 878 atomic_t refcnt;
882 int dead; 879 __u32 dead:1,
880 /* RTO-Pending : A flag used to track if one of the DATA
881 * chunks sent to this address is currently being
882 * used to compute a RTT. If this flag is 0,
883 * the next DATA chunk sent to this destination
884 * should be used to compute a RTT and this flag
885 * should be set. Every time the RTT
886 * calculation completes (i.e. the DATA chunk
887 * is SACK'd) clear this flag.
888 */
889 rto_pending:1,
890
891 /*
892 * hb_sent : a flag that signals that we have a pending
893 * heartbeat.
894 */
895 hb_sent:1,
896
897 /* Is the Path MTU update pending on this tranport */
898 pmtu_pending:1,
899
900 /* Is this structure kfree()able? */
901 malloced:1;
902
883 903
884 /* This is the peer's IP address and port. */ 904 /* This is the peer's IP address and port. */
885 union sctp_addr ipaddr; 905 union sctp_addr ipaddr;
@@ -909,22 +929,6 @@ struct sctp_transport {
909 /* SRTT : The current smoothed round trip time. */ 929 /* SRTT : The current smoothed round trip time. */
910 __u32 srtt; 930 __u32 srtt;
911 931
912 /* RTO-Pending : A flag used to track if one of the DATA
913 * chunks sent to this address is currently being
914 * used to compute a RTT. If this flag is 0,
915 * the next DATA chunk sent to this destination
916 * should be used to compute a RTT and this flag
917 * should be set. Every time the RTT
918 * calculation completes (i.e. the DATA chunk
919 * is SACK'd) clear this flag.
920 * hb_sent : a flag that signals that we have a pending heartbeat.
921 */
922 __u8 rto_pending;
923 __u8 hb_sent;
924
925 /* Flag to track the current fast recovery state */
926 __u8 fast_recovery;
927
928 /* 932 /*
929 * These are the congestion stats. 933 * These are the congestion stats.
930 */ 934 */
@@ -944,9 +948,6 @@ struct sctp_transport {
944 948
945 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ 949 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */
946 950
947 /* TSN marking the fast recovery exit point */
948 __u32 fast_recovery_exit;
949
950 /* Destination */ 951 /* Destination */
951 struct dst_entry *dst; 952 struct dst_entry *dst;
952 /* Source address. */ 953 /* Source address. */
@@ -977,9 +978,6 @@ struct sctp_transport {
977 */ 978 */
978 __u16 pathmaxrxt; 979 __u16 pathmaxrxt;
979 980
980 /* is the Path MTU update pending on this tranport */
981 __u8 pmtu_pending;
982
983 /* PMTU : The current known path MTU. */ 981 /* PMTU : The current known path MTU. */
984 __u32 pathmtu; 982 __u32 pathmtu;
985 983
@@ -1026,8 +1024,6 @@ struct sctp_transport {
1026 /* This is the list of transports that have chunks to send. */ 1024 /* This is the list of transports that have chunks to send. */
1027 struct list_head send_ready; 1025 struct list_head send_ready;
1028 1026
1029 int malloced; /* Is this structure kfree()able? */
1030
1031 /* State information saved for SFR_CACC algorithm. The key 1027 /* State information saved for SFR_CACC algorithm. The key
1032 * idea in SFR_CACC is to maintain state at the sender on a 1028 * idea in SFR_CACC is to maintain state at the sender on a
1033 * per-destination basis when a changeover happens. 1029 * per-destination basis when a changeover happens.
@@ -1069,7 +1065,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1069 struct sctp_sock *); 1065 struct sctp_sock *);
1070void sctp_transport_pmtu(struct sctp_transport *); 1066void sctp_transport_pmtu(struct sctp_transport *);
1071void sctp_transport_free(struct sctp_transport *); 1067void sctp_transport_free(struct sctp_transport *);
1072void sctp_transport_reset_timers(struct sctp_transport *, int); 1068void sctp_transport_reset_timers(struct sctp_transport *);
1073void sctp_transport_hold(struct sctp_transport *); 1069void sctp_transport_hold(struct sctp_transport *);
1074void sctp_transport_put(struct sctp_transport *); 1070void sctp_transport_put(struct sctp_transport *);
1075void sctp_transport_update_rto(struct sctp_transport *, __u32); 1071void sctp_transport_update_rto(struct sctp_transport *, __u32);
@@ -1723,6 +1719,12 @@ struct sctp_association {
1723 /* Highest TSN that is acknowledged by incoming SACKs. */ 1719 /* Highest TSN that is acknowledged by incoming SACKs. */
1724 __u32 highest_sacked; 1720 __u32 highest_sacked;
1725 1721
1722 /* TSN marking the fast recovery exit point */
1723 __u32 fast_recovery_exit;
1724
1725 /* Flag to track the current fast recovery state */
1726 __u8 fast_recovery;
1727
1726 /* The number of unacknowledged data chunks. Reported through 1728 /* The number of unacknowledged data chunks. Reported through
1727 * the SCTP_STATUS sockopt. 1729 * the SCTP_STATUS sockopt.
1728 */ 1730 */