SCTP remove FORWARD_TSN
I use linux kernel to create SCTP association.
It sends SCTP INIT message which contains "forward TSN supported parameter" but this parameter is not accepted by the server.
Is there any way to send SCTP INIT without this parameter ?
Here is my code :
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
int main(int argc, char **argv)
{
struct sockaddr_in saddr;
struct sctp_initmsg initmsg;
int cfd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
memset(&initmsg, 0, sizeof(initmsg));
initmsg.sinit_num_ostreams = 3;
initmsg.sinit_max_instreams = 3;
initmsg.sinit_max_attempts = 2;
setsockopt(cfd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, sizeof(initmsg));
bzero((void *)&saddr, sizeof(saddr));
saddr.sin_family = AF_INET;
inet_pton(AF_INET, "10.209.1.1", &saddr.sin_addr);
saddr.sin_port = htons(2905);
connect(cfd, (struct sockaddr *)&saddr, sizeof(saddr));
usleep(3000000);
close(cfd);
return 0;
}
This is INIT message :
Stream Control Transmission Protocol, Src Port: 39574 (39574), Dst Port: 2905 (2905)
Source port: 39574
Destination port: 2905
Verification tag: 0x00000000
Checksum: 0x00000000 (not verified)
INIT chunk (Outbound streams: 3, inbound streams: 3)
Chunk type: INIT (1)
Chunk flags: 0x00
Chunk length: 52
Initiate tag: 0xe2c1137e
Advertised receiver window credit (a_rwnd): 114688
Number of outbound streams: 3
Number of inbound streams: 3
Initial TSN: 3111506856
IPv4 address parameter (Address: 10.209.1.1)
IPv4 address parameter (Address: 10.151.1.2)
Supported address types parameter (Supported types: IPv4)
ECN parameter
Forward TSN supported parameter
I tried Ubuntu, Fedora, Opensuse and it's always the same problem.
|