サーバーとクライアント (Linux) の間に SCTP 接続を設定しようとしています。サーバーには複数の IP アドレスがあり、発信 IP パケットは送信元アドレスに応じてルーティングされます。sctp 接続がデフォルトで特定のアドレスを使用するようにしたい (デフォルトで特定のルートを使用するため)
私が見つけた唯一のオプションは次のとおりです。
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.
私が理解している限りでは、このオプションを使用すると、ピアのプライマリ アドレスを選択し (送信時)、ローカル アドレスの 1 つを使用するようピアに要求できます (受信時)。
問題は、送信メッセージの送信元となるローカル アドレスを選択する方法はありますか?