问题标签 [sctp]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
651 浏览

linux - Linux SCTP 堆栈与其他非操作系统 SCTP 堆栈部署在同一台机器上

我正在使用 Linux SCTP 堆栈。目前在同一台 Linux 机器上,我需要部署一个使用非 OS SCTP STACK 的进程。(即它打开一个 RAW 套接字,然后自己处理传输级消息)。当 SCTP Init 出现时,Linux 将数据包提供给两个进程。这可以避免吗?我不希望 Linux SCTP 处理它不使用的消息。(由其他非 OS SCTP 堆栈使用)这可能吗?

0 投票
3 回答
18383 浏览

c - SCTP Multihoming

I've been developing this simple client - server application with C where the client is just sending random data to the server and the server just listens to what the client sends. The protocol I'm using is SCTP and I'm interested on how to implement the multihoming feature to it.

I've been searching through the internet about SCTP and multihoming and haven't been able to find any examples about how to instruct SCTP to use multiple addresses for communication. I've only managed to find what commands one should use when trying to setup SCTP with multihoming and it should be quite straightforward.

I've created a client and a server which both use my computers two WLAN interfaces as their connection points. Both adapters are connected to the same AP. The server is listening for data from the client from these interfaces and the client sends data through them. The problem is that when I disconnect the primary WLAN adapter the client is sending data to, the transmission just halts when it should fallback to the secondary connection. I've traced the packets with Wireshark and the first INIT and INIT_ACK packets report that both the client and the server are using the WLAN adapters as their communication links.

When I reconnect the primary WLAN connection the transmission continues after a little while and bursts a huge load of packets to the server which isn't right. The packets should have been transmitted over the secondary connection. On many sites it is said that SCTP switches between connections automagically but in my case that's not happening. So do you guys have any clues why the transmission doesn't fallback to the secondary connection when the primary link is down even though the client and the server knows each others addresses including the secondary address?

About the server:

The server creates a SOCK_SEQPACKET type socket and binds all interfaces found with INADDR_ANY. getladdrs reports that the server is bounded to 3 addresses (including 127.0.0.1). After that the server listens to the socket and waits the client to send data. Server reads the data with sctp_recvmsg call.

About the client:

The client creates also a SEQPACKET socket and connects to an IP-address specified by a commandline argument. getladdrs in this case returns also 3 addresses like in the servers case. After that the client just starts to send data to the server with one second delay to the server until the user interrupts the send with Ctrl-C.

Here's some source code:

Server:

And the Client:

So do you guys have any clues what I'm doing wrong?

0 投票
2 回答
83 浏览

windows - 将客户端的协议更改为服务器

我必须使用不同的协议(Tcp、UDP、Sctp)测试从客户端到服务器的值。请指导如何可能。windows中是否有任何方法可以更改协议,或者无论如何可以通过使用诸如数据包跟踪器之类的软件找到它。

谢谢

0 投票
3 回答
4849 浏览

c++ - SCTP: any cross-platform library?

I'm investigating SCTP protocol. Its features look attractive. What I worry is its support from community. Is there any good cross-platform (at least Linux and Windows) C++ (or at least C) SCTP library? Does it support async methods?

0 投票
1 回答
455 浏览

sctp - 注入 sctp 数据包

我一直在尝试在 linux 环境中注入 sctp 数据包但没有成功,这就是我所做的,我在两点之间创建了关联(一个终端与 sctp 服务器,另一个终端与 sctp 客户端)。然后我从客户端向服务器发送了一个字符,它已成功交付,然后我从wireshark复制数据包并放入我的源代码并增加TCN和流序列号并发送它但我没有在sctp上收到它服务器。正如您在下面看到的,我的数据包完全相同,

我的数据包是这样的:

IP 部分 0000 45 00 00 34 00 00 40 00 40 84 3c 44 7f 00 00 01 0010 7f 00 00 01

SCTP 部分

0000 0b 5e 0b 59 c2 e5 f8 00 00 00 00 00 00 03 00 13 0010 fe aa 43 3e 00 00 00 0c 00 00 00 00 64 0a 00 00

然后在我的数据包未能传送到 sctp 服务器后,我用 sctp 客户端发送只是为了将它与我的数据包进行比较,然后它到达了 sctp 服务器,

知识产权部分

0000 45 02 00 34 00 00 40 00 40 84 3c 42 7f 00 00 01 0010 7f 00 00 01

SCTP 部分

0000 0b 5e 0b 59 c2 e5 f8 00 00 00 00 00 00 03 00 13 0010 fe aa 43 3e 00 00 00 0c 00 00 00 00 64 0a 00 00

问候, 开发包

0 投票
1 回答
1285 浏览

sockets - SCTP:发送数据超过 100 毫秒延迟的问题

我正在使用 SCTP 客户端通过 100 毫秒延迟链接将 1000 字节数据发送到另一个 SCTP 服务器。延迟是使用 Linux 中可用的流量控制(tc)和 netem 配置的

我使用的代码来自SCTP Multihoming。我已将往返时间(最大)设置为 60 秒,将心跳设置为 10 秒。现在我面临的问题是我可以正确发送大约 3 到 4 个 1000 字节的数据包。之后发生“对等连接重置”,因此我无法发送更多数据包。您能否让我知道通过高延迟链接发送 SCTP 数据需要做什么。谢谢你的帮助。

0 投票
3 回答
2996 浏览

java - 用java实现SCTP?

如何用java实现网关和服务器之间的SCTP协议?

0 投票
3 回答
5457 浏览

python - 如何开始使用 Python SCTP 堆栈 (pysctp)?

我刚刚从http://www.epx.com.br/pysctp/安装了 pysctp ,但我无法让基本示例正常工作。我可能做错了什么?

我在 Red Hat Linux 上。

0 投票
2 回答
3288 浏览

macos - SCTP 在 OSX 上缺少包含文件?

我在搞乱套接字,我想在我的 mac 上使用 SCTP 协议进行测试。

但是,当我尝试包含该文件时netinet/sctp.h,编译器会给我一个“找不到文件”错误。

所以我做了一些挖掘,果然,netinet/sctp.hMac OSX Lion 上没有包含文件。为什么会这样,当我可以设置一个套接字时IPPROTO_SCTP,它构建得很好?

所以,总而言之,我有两个问题:

  • Mac OSX 上 SCTP 的标头在哪里?
  • 我仍然可以在没有正确标头的情况下设置 SCTP 服务器吗?如果是这样,怎么做?
0 投票
3 回答
1194 浏览

c - Is it possible to set the OWN primary address in SCTP?

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:

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?