【发布时间】:2012-03-01 01:27:07
【问题描述】:
我正在尝试在服务器和客户端 (Linux) 之间设置 SCTP 连接。服务器有多个 ip 地址,并且传出的 ip 数据包根据 source 地址进行路由。我希望 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.
据我了解,此选项允许选择对等方的主地址(发送时)并要求对等方使用本地地址之一(接收时)。
问题是:有没有办法选择发送外发消息的本地地址?
【问题讨论】: