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.h74
1 files changed, 40 insertions, 34 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ff3017744711..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? */
@@ -778,6 +775,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
778 struct iovec *data); 775 struct iovec *data);
779void sctp_chunk_free(struct sctp_chunk *); 776void sctp_chunk_free(struct sctp_chunk *);
780void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); 777void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
778void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data);
781struct sctp_chunk *sctp_chunkify(struct sk_buff *, 779struct sctp_chunk *sctp_chunkify(struct sk_buff *,
782 const struct sctp_association *, 780 const struct sctp_association *,
783 struct sock *); 781 struct sock *);
@@ -878,7 +876,30 @@ struct sctp_transport {
878 876
879 /* Reference counting. */ 877 /* Reference counting. */
880 atomic_t refcnt; 878 atomic_t refcnt;
881 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
882 903
883 /* This is the peer's IP address and port. */ 904 /* This is the peer's IP address and port. */
884 union sctp_addr ipaddr; 905 union sctp_addr ipaddr;
@@ -908,22 +929,6 @@ struct sctp_transport {
908 /* SRTT : The current smoothed round trip time. */ 929 /* SRTT : The current smoothed round trip time. */
909 __u32 srtt; 930 __u32 srtt;
910 931
911 /* RTO-Pending : A flag used to track if one of the DATA
912 * chunks sent to this address is currently being
913 * used to compute a RTT. If this flag is 0,
914 * the next DATA chunk sent to this destination
915 * should be used to compute a RTT and this flag
916 * should be set. Every time the RTT
917 * calculation completes (i.e. the DATA chunk
918 * is SACK'd) clear this flag.
919 * hb_sent : a flag that signals that we have a pending heartbeat.
920 */
921 __u8 rto_pending;
922 __u8 hb_sent;
923
924 /* Flag to track the current fast recovery state */
925 __u8 fast_recovery;
926
927 /* 932 /*
928 * These are the congestion stats. 933 * These are the congestion stats.
929 */ 934 */
@@ -943,9 +948,6 @@ struct sctp_transport {
943 948
944 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */ 949 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */
945 950
946 /* TSN marking the fast recovery exit point */
947 __u32 fast_recovery_exit;
948
949 /* Destination */ 951 /* Destination */
950 struct dst_entry *dst; 952 struct dst_entry *dst;
951 /* Source address. */ 953 /* Source address. */
@@ -976,9 +978,6 @@ struct sctp_transport {
976 */ 978 */
977 __u16 pathmaxrxt; 979 __u16 pathmaxrxt;
978 980
979 /* is the Path MTU update pending on this tranport */
980 __u8 pmtu_pending;
981
982 /* PMTU : The current known path MTU. */ 981 /* PMTU : The current known path MTU. */
983 __u32 pathmtu; 982 __u32 pathmtu;
984 983
@@ -1009,6 +1008,9 @@ struct sctp_transport {
1009 /* Heartbeat timer is per destination. */ 1008 /* Heartbeat timer is per destination. */
1010 struct timer_list hb_timer; 1009 struct timer_list hb_timer;
1011 1010
1011 /* Timer to handle ICMP proto unreachable envets */
1012 struct timer_list proto_unreach_timer;
1013
1012 /* Since we're using per-destination retransmission timers 1014 /* Since we're using per-destination retransmission timers
1013 * (see above), we're also using per-destination "transmitted" 1015 * (see above), we're also using per-destination "transmitted"
1014 * queues. This probably ought to be a private struct 1016 * queues. This probably ought to be a private struct
@@ -1022,8 +1024,6 @@ struct sctp_transport {
1022 /* This is the list of transports that have chunks to send. */ 1024 /* This is the list of transports that have chunks to send. */
1023 struct list_head send_ready; 1025 struct list_head send_ready;
1024 1026
1025 int malloced; /* Is this structure kfree()able? */
1026
1027 /* State information saved for SFR_CACC algorithm. The key 1027 /* State information saved for SFR_CACC algorithm. The key
1028 * 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
1029 * per-destination basis when a changeover happens. 1029 * per-destination basis when a changeover happens.
@@ -1065,7 +1065,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1065 struct sctp_sock *); 1065 struct sctp_sock *);
1066void sctp_transport_pmtu(struct sctp_transport *); 1066void sctp_transport_pmtu(struct sctp_transport *);
1067void sctp_transport_free(struct sctp_transport *); 1067void sctp_transport_free(struct sctp_transport *);
1068void sctp_transport_reset_timers(struct sctp_transport *, int); 1068void sctp_transport_reset_timers(struct sctp_transport *);
1069void sctp_transport_hold(struct sctp_transport *); 1069void sctp_transport_hold(struct sctp_transport *);
1070void sctp_transport_put(struct sctp_transport *); 1070void sctp_transport_put(struct sctp_transport *);
1071void sctp_transport_update_rto(struct sctp_transport *, __u32); 1071void sctp_transport_update_rto(struct sctp_transport *, __u32);
@@ -1719,6 +1719,12 @@ struct sctp_association {
1719 /* Highest TSN that is acknowledged by incoming SACKs. */ 1719 /* Highest TSN that is acknowledged by incoming SACKs. */
1720 __u32 highest_sacked; 1720 __u32 highest_sacked;
1721 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
1722 /* The number of unacknowledged data chunks. Reported through 1728 /* The number of unacknowledged data chunks. Reported through
1723 * the SCTP_STATUS sockopt. 1729 * the SCTP_STATUS sockopt.
1724 */ 1730 */