: Support the new specification of sctp_connectx()
Subsystems (2)
RFC PATCH 1/1 : Support the new specification of sctp_connectx()
Hi All
Here is an update to the connectx() implementation the way Ivan proposed.
The hard part to figure out is how to not break the library ABI. Right now there is really no way to do that without making it a compile time feature for the library. That is not really an acceptable solution though. So any ifdefs tricks will not really solve the issue.
-vlad
--
The specification of sctp_connectx() has been changed to return an association id. Sence it is guaranteed the association id will be a positive 32 bit integer, we can simply return that from our setsockopt() in the case of success. The library that implements sctp_connectx() will re-interpret the call.
--- include/net/sctp/user.h | 6 +++- net/sctp/socket.c | 70 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 63 insertions(+), 13 deletions(-)
include/net/sctp/user.h +4 -2
@@ -136,12 +136,14 @@ enum sctp_optname {#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD - SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ -#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX + SCTP_SOCKOPT_CONNECTX_OLD, /* CONNECTX old requests. */ +#define SCTP_SOCKOPT_CONNECTX_OLD SCTP_SOCKOPT_CONNECTX_OLD SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS + SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ +#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX };/*
net/sctp/socket.c +59 -11
128 lines not on this page · raw message
Signature · 1 line
1.5.3.5