aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/sctp.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2018-03-05 20:44:18 +0800
committerDavid S. Miller <davem@davemloft.net>2018-03-07 10:55:29 -0500
commited63afb8a318f6b3558d76afba7809daee4f28e5 (patch)
tree15f0e055a67fa53ab73711c95b25c2483bcca5a3 /include/uapi/linux/sctp.h
parentravb: remove erroneous comment (diff)
downloadlinux-dev-ed63afb8a318f6b3558d76afba7809daee4f28e5.tar.xz
linux-dev-ed63afb8a318f6b3558d76afba7809daee4f28e5.zip
sctp: add support for PR-SCTP Information for sendmsg
This patch is to add support for PR-SCTP Information for sendmsg, as described in section 5.3.7 of RFC6458. With this option, you can specify pr_policy and pr_value for user data in sendmsg. It's also a necessary send info for sctp_sendv. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/sctp.h')
-rw-r--r--include/uapi/linux/sctp.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index 4c4db14786bd..0dd1f82a4fa8 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -260,6 +260,19 @@ struct sctp_nxtinfo {
sctp_assoc_t nxt_assoc_id;
};
+/* 5.3.7 SCTP PR-SCTP Information Structure (SCTP_PRINFO)
+ *
+ * This cmsghdr structure specifies SCTP options for sendmsg().
+ *
+ * cmsg_level cmsg_type cmsg_data[]
+ * ------------ ------------ -------------------
+ * IPPROTO_SCTP SCTP_PRINFO struct sctp_prinfo
+ */
+struct sctp_prinfo {
+ __u16 pr_policy;
+ __u32 pr_value;
+};
+
/*
* sinfo_flags: 16 bits (unsigned integer)
*
@@ -293,6 +306,8 @@ typedef enum sctp_cmsg_type {
#define SCTP_RCVINFO SCTP_RCVINFO
SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */
#define SCTP_NXTINFO SCTP_NXTINFO
+ SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */
+#define SCTP_PRINFO SCTP_PRINFO
} sctp_cmsg_t;
/*