summaryrefslogtreecommitdiff
path: root/netinet/sctp_uio.h
diff options
context:
space:
mode:
authorPrimiano Tucci <primiano@google.com>2014-09-30 14:46:36 +0100
committerPrimiano Tucci <primiano@google.com>2014-09-30 14:46:36 +0100
commit6306c865a9a058a72d461702e959cd853f9f134d (patch)
treeccbf50fa007be0752f9d1ada900d8cfc01698021 /netinet/sctp_uio.h
parented9a6fb519aa7606cab965b2c4218756e849ddb6 (diff)
parent793f45e9442f232795b0a33a22de234710c06613 (diff)
downloadusrsctplib-b63e210e6140cb349109808cd979b897262747d0.tar.gz
This commit was generated by merge_to_master.py. Change-Id: Id2579b1aabf6c5e804383e7c1fc9fb39de3dad8d
Diffstat (limited to 'netinet/sctp_uio.h')
-rwxr-xr-xnetinet/sctp_uio.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/netinet/sctp_uio.h b/netinet/sctp_uio.h
index 7d84313..7cf02ed 100755
--- a/netinet/sctp_uio.h
+++ b/netinet/sctp_uio.h
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_uio.h 255160 2013-09-02 22:48:41Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_uio.h 269945 2014-08-13 15:50:16Z tuexen $");
#endif
#ifndef _NETINET_SCTP_UIO_H_
@@ -279,18 +279,23 @@ struct sctp_snd_all_completes {
SCTP_SACK_IMMEDIATELY)) != 0)
/* for the endpoint */
-/* The lower byte is an enumeration of PR-SCTP policies */
+/* The lower four bits is an enumeration of PR-SCTP policies */
#define SCTP_PR_SCTP_NONE 0x0000 /* Reliable transfer */
#define SCTP_PR_SCTP_TTL 0x0001 /* Time based PR-SCTP */
#define SCTP_PR_SCTP_BUF 0x0002 /* Buffer based PR-SCTP */
#define SCTP_PR_SCTP_RTX 0x0003 /* Number of retransmissions based PR-SCTP */
+#define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_RTX
+#define SCTP_PR_SCTP_ALL 0x000f /* Used for aggregated stats */
#define PR_SCTP_POLICY(x) ((x) & 0x0f)
-#define PR_SCTP_ENABLED(x) (PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE)
+#define PR_SCTP_ENABLED(x) ((PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE) && \
+ (PR_SCTP_POLICY(x) != SCTP_PR_SCTP_ALL))
#define PR_SCTP_TTL_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_TTL)
#define PR_SCTP_BUF_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_BUF)
#define PR_SCTP_RTX_ENABLED(x) (PR_SCTP_POLICY(x) == SCTP_PR_SCTP_RTX)
-#define PR_SCTP_INVALID_POLICY(x) (PR_SCTP_POLICY(x) > SCTP_PR_SCTP_RTX)
+#define PR_SCTP_INVALID_POLICY(x) (PR_SCTP_POLICY(x) > SCTP_PR_SCTP_MAX)
+#define PR_SCTP_VALID_POLICY(x) (PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX)
+
/* Stat's */
struct sctp_pcbinfo {
uint32_t ep_count;
@@ -353,7 +358,6 @@ struct sctp_paddr_change {
uint32_t spc_state;
uint32_t spc_error;
sctp_assoc_t spc_assoc_id;
- uint8_t spc_padding[4];
};
/* paddr state values */
@@ -376,7 +380,7 @@ struct sctp_remote_error {
uint32_t sre_length;
uint16_t sre_error;
sctp_assoc_t sre_assoc_id;
- uint8_t sre_data[4];
+ uint8_t sre_data[];
};
/* data send failure event (deprecated) */
@@ -749,6 +753,14 @@ struct sctp_udpencaps {
uint16_t sue_port;
};
+struct sctp_prstatus {
+ sctp_assoc_t sprstat_assoc_id;
+ uint16_t sprstat_sid;
+ uint16_t sprstat_policy;
+ uint64_t sprstat_abandoned_unsent;
+ uint64_t sprstat_abandoned_sent;
+};
+
struct sctp_cwnd_args {
struct sctp_nets *net; /* network to */ /* FIXME: LP64 issue */
uint32_t cwnd_new_value;/* cwnd in k */