History

sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt

This patch is to implement: rfc6951#section-6.1: Get or Set the Remote UDP Encapsulation Port Number with the param of the struct: struct sctp_udpencaps { sctp_assoc_t sue_assoc_id; struct sockaddr_storage sue_address; uint16_t sue_port; }; the encap_port of sock, assoc or transport can be changed by users, which also means it allows the different transports of the same asoc to have different encap_port value. v1->v2: - no change. v2->v3: - fix the endian warning when setting values between encap_port and sue_port.

Xin Long committed 6 years ago

Commit 8dba2961 parent e8a30012 files · +121 −0Browse files

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

Unified · Split

include/uapi/linux/sctp.h+7−0
@@ -140,6 +140,7 @@ typedef __s32 sctp_assoc_t; · 139 unmodified lines
140#define SCTP_ECN_SUPPORTED 130140#define SCTP_ECN_SUPPORTED 130
141#define SCTP_EXPOSE_POTENTIALLY_FAILED_STATE 131141#define SCTP_EXPOSE_POTENTIALLY_FAILED_STATE 131
142#define SCTP_EXPOSE_PF_STATE SCTP_EXPOSE_POTENTIALLY_FAILED_STATE142#define SCTP_EXPOSE_PF_STATE SCTP_EXPOSE_POTENTIALLY_FAILED_STATE
143#define SCTP_REMOTE_UDP_ENCAPS_PORT 132
143 144
144/* PR-SCTP policies */145/* PR-SCTP policies */
145#define SCTP_PR_SCTP_NONE 0x0000146#define SCTP_PR_SCTP_NONE 0x0000
@@ -1197,6 +1198,12 @@ struct sctp_event { · 1051 unmodified lines
1197 uint8_t se_on;1198 uint8_t se_on;
1198};1199};
1199 1200
1201struct sctp_udpencaps {
1202 sctp_assoc_t sue_assoc_id;
1203 struct sockaddr_storage sue_address;
1204 uint16_t sue_port;
1205};
1206
1200/* SCTP Stream schedulers */1207/* SCTP Stream schedulers */
1201enum sctp_sched_type {1208enum sctp_sched_type {
1202 SCTP_SS_FCFS,1209 SCTP_SS_FCFS,