diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2012-09-24 10:23:20 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2012-09-24 10:23:20 +0000 |
commit | 60fb63783a06d76fea9d5e7b4aadcc6fb788c2e1 (patch) | |
tree | 4126610951deff7711302354939350d520823cd1 | |
parent | d06c9779a237eb90ca1bb312bc30f6648d09b523 (diff) |
From Jim Young, bug 7745.
Add Makefile support for reordercap.
svn path=/trunk/; revision=45090
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | CMakeOptions.txt | 1 | ||||
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | Makefile.common | 6 | ||||
-rw-r--r-- | Makefile.nmake | 24 | ||||
-rw-r--r-- | configure.ac | 19 | ||||
-rw-r--r-- | image/reordercap.rc.in | 36 |
8 files changed, 116 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 78fecd3340..7afaefb5b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,7 +361,7 @@ set(PACKAGELIST ${PACKAGELIST} YAPP) set(PACKAGELIST ${PACKAGELIST} POD) -set(PROGLIST text2pcap mergecap capinfos editcap dumpcap) +set(PROGLIST text2pcap mergecap capinfos editcap reordercap dumpcap) #Let's loop the package list foreach(PACKAGE ${PACKAGELIST}) @@ -896,6 +896,7 @@ if(BUILD_mergecap) mergecap.c merge.c svnversion.h + ${WTAP_PLUGIN_SOURCES} ) add_executable(mergecap ${mergecap_FILES}) add_dependencies(mergecap svnversion) @@ -904,6 +905,23 @@ if(BUILD_mergecap) install(TARGETS mergecap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() +if(BUILD_reordercap) + set(reordercap_LIBS + wiretap + ${ZLIB_LIBRARIES} + ) + set(reordercap_FILES + reordercap.c + svnversion.h + ${WTAP_PLUGIN_SOURCES} + ) + add_executable(reordercap ${reordercap_FILES}) + add_dependencies(reordercap svnversion) + set_target_properties(reordercap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}") + target_link_libraries(reordercap ${reordercap_LIBS}) + install(TARGETS reordercap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() + if(BUILD_capinfos) set(capinfos_LIBS wiretap diff --git a/CMakeOptions.txt b/CMakeOptions.txt index a1ac43e5e3..73927038d0 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -9,6 +9,7 @@ option(BUILD_rawshark "Build rawshark" ON) option(BUILD_dumpcap "Build dumpcap" ON) option(BUILD_text2pcap "Build text2pcap" ON) option(BUILD_mergecap "Build mergecap" ON) +option(BUILD_reordercap "Build reordercap" ON) option(BUILD_editcap "Build editcap" ON) option(BUILD_capinfos "Build capinfos" ON) option(BUILD_randpkt "Build randpkt" ON) @@ -131,6 +131,10 @@ README.windows for those instructions. By default the network traffic capture program is built. Use this switch to avoid building it. + --disable-reordercap + By default the capture-file reordering program is built. + Use this switch to avoid building it. + --disable-rawshark By default the program used to dump and analyze raw libpcap data is built. Use this switch to avoid building it. diff --git a/Makefile.am b/Makefile.am index 62d01d8bf9..ecf8dd7448 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,10 +46,11 @@ bin_PROGRAMS = \ @randpkt_bin@ \ @dftest_bin@ \ @dumpcap_bin@ \ + @reordercap_bin@ \ @rawshark_bin@ EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \ - randpkt text2pcap dumpcap rawshark + randpkt text2pcap dumpcap reordercap rawshark # # Wireshark configuration files are put in $(pkgdatadir). @@ -446,6 +447,13 @@ editcap_LDADD = \ @GLIB_LIBS@ editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir) +# Libraries with which to link reordercap. +reordercap_LDADD = \ + wiretap/libwiretap.la \ + wsutil/libwsutil.la \ + @GLIB_LIBS@ +reordercap_CFLAGS = $(AM_CLEAN_CFLAGS) + # Libraries with which to link randpkt. randpkt_LDADD = \ wiretap/libwiretap.la \ @@ -713,6 +721,7 @@ EXTRA_DIST = \ image/nsis-unchecked.bmp \ image/rawshark.rc.in \ image/README.image \ + image/reordercap.rc.in \ image/status.qrc \ image/stock_dialog_error_48.xpm \ image/stock_dialog_info_48.xpm \ @@ -837,6 +846,7 @@ EXTRA_DIST = \ $(ui_DATA) \ $(wimaxasncp_DATA) \ randpkt.c \ + reordercap.c \ smi_modules \ text2pcap-scanner.l \ text2pcap.c \ diff --git a/Makefile.common b/Makefile.common index 642e9ba4ad..f7dbcce970 100644 --- a/Makefile.common +++ b/Makefile.common @@ -172,6 +172,12 @@ editcap_SOURCES = \ epan/nstime.c \ $(WTAP_PLUGIN_SOURCES) +# reordercap specifics +reordercap_SOURCES = \ + reordercap.c \ + svnversion.h + +# capinfos specifics capinfos_SOURCES = \ capinfos.c \ $(WTAP_PLUGIN_SOURCES) diff --git a/Makefile.nmake b/Makefile.nmake index e4b95a7e5e..111b63202c 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -147,6 +147,11 @@ mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ wsutil\libwsutil.lib \ $(GLIB_LIBS) +reordercap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ + wsock32.lib user32.lib \ + wsutil\libwsutil.lib \ + $(GLIB_LIBS) + text2pcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ wsock32.lib user32.lib \ wsutil\libwsutil.lib \ @@ -181,13 +186,13 @@ randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \ $(GLIB_LIBS) EXECUTABLES=wireshark.exe tshark.exe rawshark.exe \ - capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe dumpcap.exe + capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe reordercap.exe dumpcap.exe RESOURCES=image\wireshark.res image\file_dlg_win32.res \ image\libwireshark.res image\tshark.res image\capinfos.res \ image\editcap.res image\mergecap.res image\text2pcap.res \ image\wiretap.res image\dumpcap.res image\rawshark.res \ - image\libwsutil.res + image\reordercap.res image\libwsutil.res all: $(LIBS_CHECK) config.h ui\qt\config.pri tools image codecs $(C_ARES_DLL) $(ADNS_DLL) $(ZLIB_DLL) wsutil wiretap epan $(EXECUTABLES) wireshark.bsc $(RESOURCES) doc help install-all @@ -348,6 +353,15 @@ mergecap.exe : $(LIBS_CHECK) config.h mergecap.obj merge.obj wsutil\libwsutil.l mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1 !ENDIF +reordercapcap.exe : $(LIBS_CHECK) config.h reordercap.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\reordercap.res + @echo Linking $@ + $(LINK) @<< + /OUT:reordercap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console reordercap.obj $(reordercap_LIBS) setargv.obj image\reordercap.res +<< +!IFDEF MANIFEST_INFO_REQUIRED + mt.exe -nologo -manifest "reordercap.exe.manifest" -outputresource:reordercap.exe;1 +!ENDIF + text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\text2pcap.res @echo Linking $@ $(LINK) @<< @@ -497,14 +511,14 @@ text2pcap-scanner.obj : text2pcap-scanner.c # The following targets will rebuild their respective objs # if and when svnversion.h should change. # -text2pcap.obj mergecap.obj capinfos.obj editcap.obj version_info.obj: svnversion.h +text2pcap.obj mergecap.obj capinfos.obj editcap.obj reordercap.obj version_info.obj: svnversion.h clean-local: rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \ $(EXECUTABLES) *.pdb *.sbr *.exe.manifest \ capinfos.obj editcap.obj mergecap.obj text2pcap.obj \ - nio-ie5.obj update.obj \ + reordercap.obj nio-ie5.obj update.obj \ text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \ rdps.pdb rdps.exe rdps.ilk config.h ps.c $(LIBS_CHECK) \ dftest.obj dftest.exe randpkt.obj randpkt.ext \ @@ -1044,6 +1058,8 @@ install-generated-files: if exist editcap.pdb xcopy editcap.pdb $(INSTALL_DIR) /d if exist mergecap.exe xcopy mergecap.exe $(INSTALL_DIR) /d if exist mergecap.pdb xcopy mergecap.pdb $(INSTALL_DIR) /d + if exist reordercap.exe xcopy reordercap.exe $(INSTALL_DIR) /d + if exist reordercap.pdb xcopy reordercap.pdb $(INSTALL_DIR) /d if exist rawshark.exe xcopy rawshark.exe $(INSTALL_DIR) /d if exist rawshark.pdb xcopy rawshark.pdb $(INSTALL_DIR) /d if exist text2pcap.exe xcopy text2pcap.exe $(INSTALL_DIR) /d diff --git a/configure.ac b/configure.ac index 2df0612c90..2c2ca82ba7 100644 --- a/configure.ac +++ b/configure.ac @@ -1172,6 +1172,24 @@ AC_SUBST(mergecap_bin) AC_SUBST(mergecap_man) +# Enable/disable reordercap + +AC_ARG_ENABLE(reordercap, + AC_HELP_STRING( [--enable-reordercap], + [build reordercap @<:@default=yes@:>@]), + enable_reordercap=$enableval,enable_reordercap=yes) + +if test "x$enable_reordercap" = "xyes" ; then + reordercap_bin="reordercap\$(EXEEXT)" + reordercap_man="reordercap.1" +else + reordercap_bin="" + reordercap_man="" +fi +AC_SUBST(reordercap_bin) +AC_SUBST(reordercap_man) + + # Enable/disable text2pcap AC_ARG_ENABLE(text2pcap, @@ -2267,6 +2285,7 @@ echo " Build capinfos : $enable_capinfos" echo " Build editcap : $enable_editcap" echo " Build dumpcap : $enable_dumpcap" echo " Build mergecap : $enable_mergecap" +echo " Build reordercap : $enable_reordercap" echo " Build text2pcap : $enable_text2pcap" echo " Build randpkt : $enable_randpkt" echo " Build dftest : $enable_dftest" diff --git a/image/reordercap.rc.in b/image/reordercap.rc.in new file mode 100644 index 0000000000..968c6c56ab --- /dev/null +++ b/image/reordercap.rc.in @@ -0,0 +1,36 @@ +#include "winver.h" + +WIRESHARK_ICON ICON "wireshark.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @RC_VERSION@ + PRODUCTVERSION @RC_VERSION@ + FILEFLAGSMASK 0x0L +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "The Wireshark developer community\0" + VALUE "FileDescription", "Reordercap\0" + VALUE "FileVersion", "@VERSION@\0" + VALUE "InternalName", "Reordercap @VERSION@\0" + VALUE "LegalCopyright", "Copyright � 2000 Gerald Combs <gerald@wireshark.org>, Gilbert Ramirez <gram@alumni.rice.edu> and others\0" + VALUE "OriginalFilename", "Reordercap.exe\0" + VALUE "ProductName", "Reordercap\0" + VALUE "ProductVersion", "@VERSION@\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END |