Porting SIPp to MinGW/win32
SIPp can be compiled and run under windows with Cygwin. I've spent few hours and made few changed to build it using MinGW.
This build is experimental and it breaks few things:
- source is not compatible with existing targets, it will not compile on e.g. linux or Cygwin; I have placed a bunch of #ifdefs, but I was not consistent with it so far,
- fork() is not ported thus background mode and "exec command" will not work,
- send_nowait() and send_nowait_tls() are not changing socket mode to blocking,
- few other minor (and I believe not significant with win32) changes are marked with unused variables named TODO_xxxx giving warnings when compiling.
I was using this version exclusively since 2011 on Windows XP with no major problems, although if you find any issue please try official Cygwin build also.
Compiler/IDE
I've used nice Code::Blocks IDE, version 10.05 with bundled MinGW. GCC version is 4.4.1. Little changes to source were made to get rid of most of the "deprecated conversion from string constant to char*" warnings issued by this GCC version. Another one is using printf formatting "%I64u" instead of "%llu".
Source code and precompiled binaries used
SIPp
SIPp SVN trunk code fetched 2011.09.09, license.
OpenSSL
OpenSSL precompiled Win32OpenSSL-1_0_0e.exe package for windows supplied by www.slproweb.com, license.
WinPCAP
WinPCAP WpdPack_4_1_2.zip precompiled package, license.
libregex
Libregex mingw-libgnurx-2.5.1-dev.tar.gz and mingw-libgnurx-2.5.1-bin.tar.gz downloaded from MinGW project page.
PDCurses
PDCurses, using libpdcurses-3.4-1-mingw32-dev.tar.lzma and libpdcurses-3.4-1-mingw32-dll.tar.lzma packages from MinGW project page.
dlfcn-win32
Dlfcn-win32 (dynamic linking wrapper providing dlopen, dlsym, dlclose, etc. interface), precompiled dlfcn-win32-static-r19.tar.bz2 package by Ramiro Polla, license
fakepoll.h
Slightly modified fakepoll.h (poll() using select()) is inside source archive. Credits to Greg Parker, license.
winhack
Winhack.h and winhack.c are inside source archive. They are provided by Shinobu Maehara.
Merged source and binary
sipp-win32-20110911-src.7z
sipp-win32-20110911-bin.7z
2011.09.26. Compiled with PCAPPLAY option, added inet_pton(...) definition.
sipp-win32-20110926-src.7z
sipp-win32-20110926-bin.7z
2011.09.28:
sipp-win32-20110928-src.7z
sipp-win32-20110928-bin.7z
- changed #ifdef WIN32 to #ifdef __MINGW32__,
- handled Ctrl+C (works the same way as 'Q'),
- sipp.cpp: changed 'Q' (or 'q' + 'q') action: quits immediately after aborting tasks,
- global timeout working (using winhack.[h|c]); SIGALRM action is setting quitting = 1, so it looks like this option is more useful for UAS than UAC scenarios (UAC scenario waiting for reply would not be aborted, this is equivalent of single 'q').
2011.10.05. Fixed truncating BYE message when aborting calls ('Q'):
sipp-win32-20111005-src.7z
sipp-win32-20111005-bin.7z
- message.c: modified SimpleKeywords matching to match messages with offset ("last_cseq_number+1"); note: this requires +n/-n offset to be placed immediately after keyword,
- message.c: removed last = true; assignment (unknown purpose) that causes ignoring rest of the message after "last_cseq_number+1".
2013.07.24. Fixed socket handle leak (close() not replaced by closesocket() when moved to win32) causing
problems when running scenario for a long time.
Thanks to Trefor Edwards for reporting and testing.
sipp-win32-20130724.7z (source + binary)
2014.08.12. sipp-win32-20140812.7z (source + binary)
- updated SIPp to current git version (version 3.4.1+); newer version adds some functionality and code is noticeably cleaner, but it is not time-tested yet - try previous version in case of problems,
- fixed potential file handle leak in rtpstream_cache_file() function,
- built using Code::Blocks 13.12.
2014.09.04. Fixed PCAP + WAV playback (regression in version from 2014.08.12 caused probably by different compiler settings + lack of RTP_STREAM switch),
thanks to Pavel Gavronsky for reporting.
sipp-win32-20140904.7z (source + binary)
2014.11.17. Changed PF_UNSPEC to PF_INET in getaddrinfo() hints. It forces IPv4 (by default with Windows 7 local addresses are
resolved to IPv6 values which either breaks most tests or forces to uninstall IPv6 support).
sipp-win32-20131117.7z
Simple GUI - launcher
SIPpLauncher
WinPCAP is required to run this - you may have it installed already with Ethereal/Wireshark.