-
SCTP protocol support on MS Windows, looking for help
Hello!
I want to use SCTP protocol on Windows, but it's much harder, that I was thinking. Under Linux I haven't got any problems, because it have native implementation and simple API.
I found SCTP implementation (sctpplib from www.sctp.de). I'm trying to understand it's API, but without good dosumentation and simple examples it's really hard.
Does anyone have any experience with this protocol on Windows?
-
Re: SCTP protocol support on MS Windows, looking for help
Hi
did you solve the problem? I ask because I shall write a SCTP Applikation too and found that API but I have no idea how to use it or how it works
best regards
Grit
-
Re: SCTP protocol support on MS Windows, looking for help
You might want to try SctpDrv: it adds support for SCTP as a Winsock provider and a library you need to link to in order to use the SCTP API. You can get a version for 32-bit Windows XP and 32/64 bit Windows Vista and 7 from http://www.bluestop.org/SctpDrv . Documentation is available at http://www.bluestop.org/SctpDrv/doc/.
-
Re: SCTP protocol support on MS Windows, looking for help
Hello brucec,
I'm also interested in using SCTP on Windows. So I've tried to install sctpDrv (of X'mas ver. :) ) into Windows XP (SP3), but failed. The error message says "startservice=87" (that could mean "wrong parameters").
Then, I also tried to use sctpDrv of the former version (Mar. 2008), but it didn't also work well.
Of course, I followed the instruction at http://www.co-conv.jp/en/product/sctpDrv/20081224.
I'd be happy to hear whether you've successfully used it on Windows XP (or Vista) or not and to hear any advices or suggestions about it.
BR,
Nik
-
Re: SCTP protocol support on MS Windows, looking for help
I've installed sctpDrv on XP SP3, but I've just realised the instructions don't say that you need IPv6 installed. To install it, run "netsh interface ipv6 install". You can check if sctpDrv is installed correctly by running the echo_client and echo_server apps in c:\program files\sctpDrv\bin .
-
Re: SCTP protocol support on MS Windows, looking for help
I created a new version earlier today with a few bugs fixed, changed the installer language to English and added some detail if things do fail. I've put instructions at http://www.bluestop.org/sctpDrv and the installer files can be found at http://www.bluestop.org/sctpDrv/releases .
-
Re: SCTP protocol support on MS Windows, looking for help
Hello brucec,
Many thanks. I'm sorry for my belated reply. I was out for a week.
Anyway, I've just tried installing sctpDrv on several machines one of which could successfully accept it (w/o any errors). However, when I try to run echo_client and echo_server apps (by typing echo_server.exe serv), I face the error that says "GetAddrInfo: The specified class was not found". I've been using Windows XP SP3 Japanese version. :-)
Further, concerning BUILDing sources, I've been getting a lot of errors. I just changed "makerelease.bat" file like adding the line "set WDKPATH=(path to the WinDDK directory)" and modifying slightly the line that begins with "cmd \c" from "-f Makefile.wix" to "-f wix\Makefile.wix".
An example of errors is:
1>errors in directory c:\(some direcotries)\sctpdrv\drv
1>c:\windkk\7685.(...)\bin\makefile.new(7117) : error U1087: cannot have : and :: dependents for same target
1>c:\nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS0 /nologo /f c:\windkk\7685.(...)\bin\makefile.def NOLINK=1 PASS0ONLY=1 MAKEDIR_RELATIVE_TO_BASEDIR= failed - rc = 2
I refered to the website at http://www.bluestop.org/sctpDrv.
I'd be happy to hear any advices from you.
Best wishes,
Nikurah
-
Re: SCTP protocol support on MS Windows, looking for help
Hello brucec,
I realized that some spaces in the name of the directory caused the errors. So, I've just retried building again and gotten the summary shown as follows:
1591 files compiled - 2 Warnings - 3 Errors - 890 LPS
77 libraries built - 1 Error
221 executables build
So, I'm gonna try finding the position where errors occured.
Gruesse,
Nikurah
-
Re: SCTP protocol support on MS Windows, looking for help
That sounds like far too many libraries and executables it built - are you sure you were running the command in the sctpDrv directory?
-
Re: SCTP protocol support on MS Windows, looking for help
Thx for ur quick reply.
Actually I was wrong.
I've gotten the new errors as follows:
1>errors in directory d:\sctpdrv\netsh\sctpmon
1>d:\sctpdrv\netsh\sctpmon\sctpmon.c(27) : error C1083: Cannot open include file: 'netsh.h': No such file or directory
1>link : error LNK1181: cannot open input file 'd:\sctpdrv\netsh\sctpmon\objfre_wxp_x86\i386\sctpmon.obj'
1>errors in directory d:\sctpdrv\apps\echo_client
1>d:\sctpdrv\apps\echo_client\echo_client.obj : error LNK2019: unresolved extern
al symbol __imp__GetNameInfoW@28 referenced in function _wmain
1>d:\sctpdrv\apps\echo_client\echo_client.obj : error LNK2019: unresolved extern
al symbol __imp__GetAddrInfoW@16 referenced in function _wmain
1>d:\sctpdrv\apps\echo_client\objfre_wxp_x86\i386\echo_client.exe : error LNK112
0: 2 unresolved externals
1>errors in directory d:\sctpdrv\apps\echo_server
1>d:\sctpdrv\apps\echo_server\echo_server.obj : error LNK2019: unresolved extern
al symbol __imp__GetNameInfoW@28 referenced in function _wmain
1>d:\sctpdrv\apps\echo_server\echo_server.obj : error LNK2019: unresolved extern
al symbol __imp__GetAddrInfoW@16 referenced in function _wmain
1>d:\sctpdrv\apps\echo_server\objfre_wxp_x86\i386\echo_server.exe : error LNK112
0: 2 unresolved externals
...etc.
I'd be happy if you would kindly help me.
BR,
Nikurah
-
Re: SCTP protocol support on MS Windows, looking for help
That's an expected error - it's mentioned on my site, but perhaps not very clearly. Unfortunately the WDK doesn't support long filenames, and we need to reference headers and libraries in C:\Program Files\Microsoft SDKs\Windows\v7.0 - on my PC that ends up as C:\PROGRA~1\MICROS~2\Windows\v7.0 but on computers with other Microsoft directories it might end up as MICROS~3 etc.
I don't know of any solution other than to manually edit sctpDrv\netsh\sctpmon\sources and change the directory. You can find the short filename you need by running "dir/x" in a command prompt.
The 7.0.0 WDK also has a bug where GetNameInfo and GetAddrInfo have been mangled; the best option is probably to copy ws2_32.lib from lib\win7\i386 to lib\wxp\i386 in C:\WinDDK\7600.16385.0
-
Re: SCTP protocol support on MS Windows, looking for help
I've updated the page at http://www.bluestop.org/sctpDrv with a section "Known Build Errors" which I hope will help you solve the errors you're seeing.
-
Re: SCTP protocol support on MS Windows, looking for help
Great instruction!!
I've successfully built them. ;-)
And also could run default apps (echo).
Thanks for your kind support so far.
Nikurah
-
Re: SCTP protocol support on MS Windows, looking for help
Is the http://www.bluestop.org/sctpDrv down or moved? I tried to use the jp version msi but failed with the error message "StartService=87", eventhough I installed IPv6. Since the http://www.bluestop.org/sctpDrv is gone I cannot find the Bruce's version. Any information is highly appreciated!
-
Re: SCTP protocol support on MS Windows, looking for help
http://www.bluestop.org/sctpDrv is up and running for me, and I can't see any problems accessing it over IPv4, IPv6 or from different locations. If you're having problems accessing the site, I've also put the releases on Sourceforge at http://www.sourceforge.net/projects/sctpdrv . Version 1.1.2 has lots of installer fixes - you can access both English and Japanese MSI files by clicking on the "View all files" button.
-
Re: SCTP protocol support on MS Windows, looking for help
I 'm also able to visit the site, http://www.bluestop.org/sctpDrv, and download files. :-)
BTW, are there anyone who knows the solution that enables sctp packets to be forwarded over "Netsh command-line tools for NAT" on Windows XP?
Actually, I'd like a Windows machine to be a NAT entity for other machines in a private network. There could exist two kinds of ways to realize that --"Internet Connection Sharing" and "netsh routing ip nat". Although http, icmp, ftp traffic can get to the global network through the NAT without any issues using both above ways, sctp traffic seems to be blocked/filtered at the NAT. If anyone knows other solutions, please let me know.
-
Re: SCTP protocol support on MS Windows, looking for help
While running the echo_server2.exe, I experienced error with message "WSAIoctl(SIO_GET_EXTENSION_FUNCTION_POINTER,WSARecvMsg): The attempted operation is not supported for the type of object referenced."
Did anybody see this before, or any idea? Thanks.
-
Re: SCTP protocol support on MS Windows, looking for help
I ported echo_server and echo_server2 to Linux. Now I can use Wireshark to capture the SCTP protocol packets.
-
Re: SCTP protocol support on MS Windows, looking for help
There is a bug in echo_server.c that termination of more than one association to the server will cause segmentation fault. Reason is that FD_ISSET test FD_CLRed set.
-
Re: SCTP protocol support on MS Windows, looking for help
echo_server2 only runs under Vista or newer because it tries to get a pointer to WSASendMsg. I might remove that code so it runs on XP too.
-
Re: SCTP protocol support on MS Windows, looking for help
I have been trying but failed to find a benchmark tool to test SCTP performance on Windows. The current iperf and netperf does not support SCTP on windows. (OpenSS7 has an linux version to support SCTP though.) Is there any such tool in the world yet? Thanks for any input.
-
Re: SCTP protocol support on MS Windows, looking for help
Quote:
Originally Posted by
topuser
I have been trying but failed to find a benchmark tool to test SCTP performance on Windows. The current iperf and netperf does not support SCTP on windows. (OpenSS7 has an linux version to support SCTP though.) Is there any such tool in the world yet? Thanks for any input.
The only tool I know of is iperf that gets installed into C:\Program Files\SctpDrv\bin on Vista and Windows 7. Unfortunately it uses the inet_ntop function (http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx) which isn't available on XP, though a simple workaround is to find all the places it's called and either remove them or substitute them with RtlIpv4AddressToString.
-
Re: SCTP protocol support on MS Windows, looking for help
Thanks Brucec. What iperf you mentioned however? The only SCTP support iperf is the OpenSS7 Linux version as far as I found. Can it be easily ported to Windows? Thanks again.
-
Re: SCTP protocol support on MS Windows, looking for help
The version of iperf that is included with SctpDrv has SCTP support: the -z flag enables it. The source code is in sctpdrv\apps\iperf .
-
Re: SCTP protocol support on MS Windows, looking for help
I've just release version 1.1.4, which has lots of bug fixes - but it doesn't include the SCTP-enabled iperf any more. I realised that version 2.0.8 has moved to being licensed under the GPL so people should fetch and build the version from http://www.openss7.org/package/iperf using cygwin.
-
Re: SCTP protocol support on MS Windows, looking for help
I installed ss7 iperf 2.0.8 on cygwin. But I am not sure if there is something not right:
1) when I run "iperf -v", the response is "iperf version 2.0.1-os7 (08 Nov 2004) pthreads". Looks it is an old version.
2) when I run "iperf -s -z", it shown "SCTP window size: -1.00 Byte", eventhough I use "iperf -s -w 64K -z" later.
Brucec, do you have the same experience? Thanks.
-
Re: SCTP protocol support on MS Windows, looking for help
Yes I found the same issues. I presume the version number just hasn't been updated, and I've sent a patch to openss7 to fix the other bugs - you need to apply the changes from http://www.bluestop.org/SctpDrv/iperf.diff to get SCTP STREAM working. Unfortunately SEQPACKET (-q) remains broken.
-
Re: SCTP protocol support on MS Windows, looking for help
Thanks Brucec. I patched the diff, rebuilt the whole module. However it still fail with the same error:
>iperf -s -z
socket failed: Network is down
bind failed: Bad file descriptor
listen failed: Bad file descriptor
------------------------------------------------
Server listening on SCTP port 5001
SCTP window size: -1.00 Byte <default>
------------------------------------------------
-
Re: SCTP protocol support on MS Windows, looking for help
Oh, that "Network is down" error is because of a bug in the driver I found and fixed last week - one of the functions asks for too much access. I fixed it in version 1.1.4 - can you try again using the version from http://www.bluestop.org/SctpDrv/releases/1.1.4 ?
-
Re: SCTP protocol support on MS Windows, looking for help
Yes, 1.1.4 solves the problem. A million thanks to Brucec !
-
Re: SCTP protocol support on MS Windows, looking for help
Brucec, doesn't the GetAddrInfo support SOCK_SEQPACKET? I was trying to do the following:
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC; // or AF_INET or AF_INET6
hints.ai_socktype = SOCK_SEQPACKET;
error = GetAddrInfo(argv[1], argv[2], &hints, &res0);
But always I get error message: "The support for the specified socket type does not exist in this address family."
-
Re: SCTP protocol support on MS Windows, looking for help
I don't think there's a programmatic interface to NetShell that you can use, unfortunately. Since for SctpDrv it's just a wrapper around a sysctl interface, I should be able to add a few functions to sctpsp.dll to allow you to obtain the information through an API.
-
Re: SCTP protocol support on MS Windows, looking for help
Quote:
Originally Posted by
brucec
I don't think there's a programmatic interface to NetShell that you can use, unfortunately. Since for SctpDrv it's just a wrapper around a sysctl interface, I should be able to add a few functions to sctpsp.dll to allow you to obtain the information through an API.
I tried to use setsockopt to reset the max instreams and ostreams, and it looks work in Windows and Linux.
struct sctp_initmsg initm;
initm.sinit_max_instreams = 20;
initm.sinit_num_ostreams = 20;
setsockopt(sfd, IPPROTO_SCTP, SCTP_INITMSG, &initm, sizeof(initm));
-
Re: SCTP protocol support on MS Windows, looking for help
Quote:
Originally Posted by
topuser
Brucec, doesn't the GetAddrInfo support SOCK_SEQPACKET? I was trying to do the following:
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC; // or AF_INET or AF_INET6
hints.ai_socktype = SOCK_SEQPACKET;
error = GetAddrInfo(argv[1], argv[2], &hints, &res0);
But always I get error message: "The support for the specified socket type does not exist in this address family."
I tried this but got the same error. Any hints ???
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC; // or AF_INET or AF_INET6
hints.ai_socktype = SOCK_SEQPACKET;
hints.ai_protocol = IPPROTO_SCTP;
error = GetAddrInfo(argv[1], argv[2], &hints, &res0);
-
Re: SCTP protocol support on MS Windows, looking for help
Another question to Brucec (Sorry I got too many questions for you):
When I tried to create my lib out of the two sctpsp.lib and IPHlpApi.lib, I got warning "LNK4006:
__NULL_IMPORT_DESCRIPTOR already defined in IPHlpApi.Lib(iphlpapi.dll); second definition ignored".
Is it OK if I ignore it?
-
Re: SCTP protocol support on MS Windows, looking for help
It appears that warning occurs if you're building a static library and have added libraries in the "Additional Dependencies" section. Apparently you shouldn't have any additional dependencies listed, but should add them to your final DLL or exe instead.
-
Re: SCTP protocol support on MS Windows, looking for help
I've now released version 1.1.5 which should be a lot more stable - there are lots of bug fixes since 1.1.4. There are a few more bug fixes that have been made to the core stack in the last week though so I'll probably release 1.1.6 in a few weeks.
-
Re: SCTP protocol support on MS Windows, looking for help
Hi, Brucec,
Currently I am doing my thesis work to measure performance of SCTP as General purpose transport protocol in windows. My plan is to configure a simple server client environment in windows and run some performance test comparing SCTP and TCP. i downloaded and installed SCTPDRV1.1.6. now what i wonder is how to enable SCTP to generate traffic to analyse the traffic using any tool like wireshark ?? Please suggest me some tips ???
most importantly could you please tell me how to enable the use of sctp ???
Thank you very much in advance
-
Re: SCTP protocol support on MS Windows, looking for help
You can use iperf to generate traffic, but it sounds like you might want to write your own client and server applications.
http://bluestop.org/SctpDrv/doc/development.html has some information about getting started with SctpDrv. After that you can use the normal Winsock API along with the SCTP API (the functions listed at http://bluestop.org/SctpDrv/doc/index.html).
-
Re: SCTP protocol support on MS Windows, looking for help
Quote:
Originally Posted by
brucec
Thank you very much for your quick reply Bruce,
I 'm not trying to write any client server applications, i just want to use SCTP as an alternate to TCP and capture packets using wireshark or some other tool which can capture SCTP packets.
Could you please give me an idea that where should I make this changes in windows 7
"In order to use all the capabilities of SCTP, you have to append the directory of ws2sctp.h into the Include Path of your compiler and link sctpsp.lib into your application. If however you just need to use SCTP as an alternative to TCP without using the new API or features, you can just change IPPROTO_TCP to IPPROTO_SCTP and use the standard headers: Microsoft ships Winsock with the IPPROTO_SCTP definition included"
I am very sorry if I ask simple things, I 'm just a beginner.
-
Re: SCTP protocol support on MS Windows, looking for help
Wireshark already knows about SCTP: just run it and it'll start displaying SCTP packets once you have some SCTP traffic on the network. You can try it by running the echo_client / echo_server applications from c:\program files\sctpdrv\bin over a network - note that on Windows Wireshark doesn't log traffic over the loopback interface by default, so the traffic needs to be going out over a network card.