如何为关联设置SCTP_MAX_BURST?

时间:2012-05-02 07:20:10

标签: sockets sctp

我正在尝试使用以下代码设置SCTP_MAX_BURST

struct sctp_assoc_value assocValue;
memset(&assocValue, 0, sizeof(assocValue));
assocValue.assoc_value = getMaxBurstValue();
setsockopt (fd, IPPROTO_SCTP, SCTP_MAX_BURST, &assocValue, sizeof (assocValue));

当我执行代码时,我收到以下错误: “没有这样的文件或目录”

有人可以帮我解决失败的可能原因吗?

1 个答案:

答案 0 :(得分:0)

你提到的文字(“没有这样的文件......”)是针对ENOENT,2,在我有权访问的任何Linux系统上都没有列为setsockopt的回复。

在我的Redhat 5系统上,我回到ENOPROTOOPT(错误92),因为内核没有为2.6.18的sctp实现该套接字选项。