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.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -260,6 +260,19 @@ struct sctp_nxtinfo { · 259 unmodified lines | ||
| 260 | 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 | + */ | |
| 271 | +struct sctp_prinfo { | |
| 272 | + __u16 pr_policy; | |
| 273 | + __u32 pr_value; | |
| 274 | +}; | |
| 275 | + | |
| 263 | 276 | /* |
| 264 | 277 | * sinfo_flags: 16 bits (unsigned integer) |
| 265 | 278 | * |
| @@ -293,6 +306,8 @@ typedef enum sctp_cmsg_type { · 27 unmodified lines | ||
| 293 | 306 | #define SCTP_RCVINFO SCTP_RCVINFO |
| 294 | 307 | SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */ |
| 295 | 308 | #define SCTP_NXTINFO SCTP_NXTINFO |
| 309 | + SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */ | |
| 310 | +#define SCTP_PRINFO SCTP_PRINFO | |
| 296 | 311 | } sctp_cmsg_t; |
| 297 | 312 | |
| 298 | 313 | /* |