History

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.

Xin Long committed 8 years ago

Commit ed63afb1 parent 5c3d0fd3 files · +46 −1Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/sctp.h+15−0
@@ -260,6 +260,19 @@ struct sctp_nxtinfo { · 259 unmodified lines
260 sctp_assoc_t nxt_assoc_id;260 sctp_assoc_t nxt_assoc_id;
261};261};
262 262
263/* 5.3.7 SCTP PR-SCTP Information Structure (SCTP_PRINFO)
264 *
265 * This cmsghdr structure specifies SCTP options for sendmsg().
266 *
267 * cmsg_level cmsg_type cmsg_data[]
268 * ------------ ------------ -------------------
269 * IPPROTO_SCTP SCTP_PRINFO struct sctp_prinfo
270 */
271struct sctp_prinfo {
272 __u16 pr_policy;
273 __u32 pr_value;
274};
275
263/*276/*
264 * sinfo_flags: 16 bits (unsigned integer)277 * sinfo_flags: 16 bits (unsigned integer)
265 *278 *
@@ -293,6 +306,8 @@ typedef enum sctp_cmsg_type { · 27 unmodified lines
293#define SCTP_RCVINFO SCTP_RCVINFO306#define SCTP_RCVINFO SCTP_RCVINFO
294 SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */307 SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */
295#define SCTP_NXTINFO SCTP_NXTINFO308#define SCTP_NXTINFO SCTP_NXTINFO
309 SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */
310#define SCTP_PRINFO SCTP_PRINFO
296} sctp_cmsg_t;311} sctp_cmsg_t;
297 312
298/*313/*