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.
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
Libregex mingw-libgnurx-2.5.1-dev.tar.gz and mingw-libgnurx-2.5.1-bin.tar.gz downloaded from MinGW project page.
Winhack.h and winhack.c are inside source archive. They are provided by Shinobu Maehara.
Merged source and binary
- 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').
- 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).
Simple GUI - launcher
WinPCAP is required to run this - you may have it installed already with Ethereal/Wireshark.