I'm trying to set a SCTP connection between a server and clients (Linux). The server has several ip addresses and the outgoing ip packets are routed depending on the source addresss. I want the sctp connections use certain address by default (in order to use certain route by default)
The only options I have found are:
SCTP_SET_PEER_PRIMARY_ADDR
Requests that the peer mark the enclosed address as the association primary. The enclosed address must be one of the association's locally bound addresses. The struc‐
ture sctp_setpeerprim defined in /usr/include/netinet/sctp.h is used to make a set peer primary request.
SCTP_PRIMARY_ADDR
Requests that the local SCTP stack use the enclosed peer address as the association primary. The enclosed address must be one of the association peer's addresses. The
structure sctp_prim defined in /usr/include/netinet/sctp.h is used to make a get/set primary request.
As far as I understand, this options allow to select the peer's primary address (when sending) and to ask the peer to use one of the local addresses (when receiving).
The quesion is: Is there a way to select the local address from which outgoing messages are sent?