This patch is to add support for SCTP AUTH Information for sendmsg, as described in section 5.3.8 of RFC6458. With this option, you can provide shared key identifier used for sending the user message. It's also a necessary send info for sctp_sendv. Note that it reuses sinfo->sinfo_tsn to indicate if this option is set and sinfo->sinfo_ssn to save the shkey ID which can be 0.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -273,6 +273,18 @@ struct sctp_prinfo { · 272 unmodified lines | |||
| 273 | __u32 pr_value; | 273 | __u32 pr_value; |
| 274 | }; | 274 | }; |
| 275 | 275 | ||
| 276 | /* 5.3.8 SCTP AUTH Information Structure (SCTP_AUTHINFO) | ||
| 277 | * | ||
| 278 | * This cmsghdr structure specifies SCTP options for sendmsg(). | ||
| 279 | * | ||
| 280 | * cmsg_level cmsg_type cmsg_data[] | ||
| 281 | * ------------ ------------ ------------------- | ||
| 282 | * IPPROTO_SCTP SCTP_AUTHINFO struct sctp_authinfo | ||
| 283 | */ | ||
| 284 | struct sctp_authinfo { | ||
| 285 | __u16 auth_keynumber; | ||
| 286 | }; | ||
| 287 | |||
| 276 | /* | 288 | /* |
| 277 | * sinfo_flags: 16 bits (unsigned integer) | 289 | * sinfo_flags: 16 bits (unsigned integer) |
| 278 | * | 290 | * |
| @@ -310,7 +322,7 @@ typedef enum sctp_cmsg_type { · 31 unmodified lines | |||
| 310 | #define SCTP_NXTINFO SCTP_NXTINFO | 322 | #define SCTP_NXTINFO SCTP_NXTINFO |
| 311 | SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */ | 323 | SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */ |
| 312 | #define SCTP_PRINFO SCTP_PRINFO | 324 | #define SCTP_PRINFO SCTP_PRINFO |
| 313 | SCTP_AUTHINFO, /* 5.3.8 SCTP AUTH Information Structure (RESERVED) */ | 325 | SCTP_AUTHINFO, /* 5.3.8 SCTP AUTH Information Structure */ |
| 314 | #define SCTP_AUTHINFO SCTP_AUTHINFO | 326 | #define SCTP_AUTHINFO SCTP_AUTHINFO |
| 315 | SCTP_DSTADDRV4, /* 5.3.9 SCTP Destination IPv4 Address Structure */ | 327 | SCTP_DSTADDRV4, /* 5.3.9 SCTP Destination IPv4 Address Structure */ |
| 316 | #define SCTP_DSTADDRV4 SCTP_DSTADDRV4 | 328 | #define SCTP_DSTADDRV4 SCTP_DSTADDRV4 |