)
set(LIBEPAN_LIBS
-# @GETOPT_O@ # wsgetopt.c
-# @INET_ATON_LO@ # epan/inet_aton.c
-# @INET_NTOP_LO@ # inet_ntop.c
-# @INET_PTON_LO@ # inet_pton.c
# @NSL_LIBS@ # -lnsl
# @SOCKET_LIBS@ # -lsocket
# @SSL_LIBS@ # -lcrypto
-# @STRERROR_O@ # strerror.c
-# @STRNCASECMP_O@ # strncasecmp.c
-# @STRPTIME_O@ # strptime.c
epan
# $(plugin_ldadd) # in case of static
${PCRE_LIBRARIES}
include Makefile.common
-# Optional objects that I know how to build. These will be
-# linked into the wireshark executable.
-# They will also be linked into the tshark executable; if this
-# list ever grows to include something that can't be linked with
-# tshark, or if tshark needs something that wireshark doesn't,
-# we should probably split this into stuff needed both
-# by wireshark and tshark and stuff needed only by one or the
-# other.
-wireshark_optional_objects = @GETOPT_O@ @STRERROR_O@ \
- @STRNCASECMP_O@ @STRPTIME_O@
-
if ENABLE_STATIC
wireshark_LDFLAGS = -Wl,-static -all-static
else
# @GTK_LIBS@ (as those are also needed for X applications, and GTK+
# applications are X applications).
wireshark_LDADD = \
- $(wireshark_optional_objects) \
gtk/libui.a \
codecs/libcodec.a \
wiretap/libwiretap.la \
epan/libwireshark.la \
wsutil/libwsutil.la \
- @INET_PTON_LO@ \
- @INET_NTOP_LO@ \
@SSL_LIBS@ \
$(plugin_ldadd) \
@PCRE_LIBS@ \
# Libraries and plugin flags with which to link tshark.
tshark_LDADD = \
- $(wireshark_optional_objects) \
wiretap/libwiretap.la \
epan/libwireshark.la \
wsutil/libwsutil.la \
- @INET_PTON_LO@ \
- @INET_NTOP_LO@ \
@SSL_LIBS@ \
$(plugin_ldadd) \
@PCRE_LIBS@ \
# Libraries and plugin flags with which to link rawshark.
rawshark_LDADD = \
- $(wireshark_optional_objects) \
wiretap/libwiretap.la \
epan/libwireshark.la \
wsutil/libwsutil.la \
- @INET_PTON_LO@ \
- @INET_NTOP_LO@ \
@SSL_LIBS@ \
$(plugin_ldadd) \
@PCRE_LIBS@ \
@LIBSMI_LDFLAGS@
rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
-# Optional objects that I know how to build, and that are needed by
-# text2pcap.
-text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
-
# Libraries with which to link text2pcap.
text2pcap_LDADD = \
- $(text2pcap_optional_objects) \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
@GLIB_LIBS@ -lm
# Libraries and plugin flags with which to link dftest.
dftest_LDADD = \
- $(wireshark_optional_objects) \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
epan/libwireshark.la \
dumpcap_LDADD = \
wiretap/libwiretap.la \
wsutil/libwsutil.la \
- @INET_NTOP_LO@ \
@GLIB_LIBS@ \
@PCAP_LIBS@ \
@SOCKET_LIBS@ \
tap-stats_tree.c \
tap-wspstat.c
-# helpers already available on some platforms (and on others not)
-EXTRA_wireshark_SOURCES = \
- wsgetopt.c \
- inet_ntop.c \
- inet_pton.c \
- strerror.c \
- strncasecmp.c \
- strptime.c
-
-# corresponding headers
-EXTRA_wireshark_INCLUDES = \
- wsgetopt.h \
- inet_v6defs.h \
- strerror.h \
- strptime.h
-
# wireshark specifics
wireshark_SOURCES = \
$(WIRESHARK_COMMON_SRC) \
$(WIRESHARK_COMMON_INCLUDES) \
$(SHARK_COMMON_CAPTURE_INCLUDES) \
$(wireshark_INCLUDES) \
- $(EXTRA_wireshark_INCLUDES) \
$(dumpcap_INCLUDES)
# If $(CHECK_TAG) is null, but either config.nmake or Makefile.nmake
# are newer than the $(LIBS_CHECK) target, then a detailed verification
# as to the required library package files will be made.
-#
+#
LIBS_CHECK=_libs_check_
!IF [$(SH) $(WIN_SETUP) --checktag "$(WIRESHARK_LIBS)"] != 0
CHECK_TAG=_check_tag_
dumpcap_OBJECTS = $(dumpcap_SOURCES:.c=.obj)
randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
-EXTRA_OBJECTS = \
- wsgetopt.obj \
- inet_ntop.obj \
- inet_pton.obj \
- strptime.obj
-
wireshark_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib shell32.lib comctl32.lib \
$(HHC_LIBS) \
wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
-wireshark.exe : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) wsgetopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
+wireshark.exe : $(LIBS_CHECK) config.h $(wireshark_OBJECTS) codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
@echo Linking $@
$(LINK) @<<
- /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) wsgetopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
+ /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
!ENDIF
-tshark.exe : $(LIBS_CHECK) config.h $(tshark_OBJECTS) wsgetopt.obj inet_ntop.obj inet_pton.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tshark.exe : $(LIBS_CHECK) config.h $(tshark_OBJECTS) epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
- /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) wsgetopt.obj inet_ntop.obj inet_pton.obj image\tshark.res
+ /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) image\tshark.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
!ENDIF
-rawshark.exe : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) wsgetopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
+rawshark.exe : $(LIBS_CHECK) config.h $(rawshark_OBJECTS) epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
- /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) wsgetopt.obj inet_ntop.obj image\rawshark.res
+ /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) image\rawshark.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "rawshark.exe.manifest" -outputresource:rawshark.exe;1
# XXX: This makefile does not properly handle doing a 'nmake ... capinfos.exe' directly since some of the .objs
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
# Linking with setargv.obj enables "wildcard expansion" of command-line arguments
-capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
+capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
@echo Linking $@
$(LINK) @<<
- /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) wsgetopt.obj $(capinfos_LIBS) setargv.obj image\capinfos.res
+ /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) $(capinfos_LIBS) setargv.obj image\capinfos.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
# XXX: This makefile does not properly handle doing a 'nmake ... editcap.exe' directly since some of the .objs
# (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
-editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsgetopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
+editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
@echo Linking $@
$(LINK) @<<
- /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) wsgetopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
+ /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) $(editcap_LIBS) image\editcap.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
!ENDIF
# Linking with setargv.obj enables "wildcard expansion" of command-line arguments
-mergecap.exe : $(LIBS_CHECK) config.h mergecap.obj merge.obj wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
+mergecap.exe : $(LIBS_CHECK) config.h mergecap.obj merge.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
@echo Linking $@
$(LINK) @<<
- /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj wsgetopt.obj $(mergecap_LIBS) setargv.obj image\mergecap.res
+ /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj $(mergecap_LIBS) setargv.obj image\mergecap.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
!ENDIF
-text2pcap.exe : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj wsgetopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
+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) @<<
- /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj wsgetopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
+ /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj $(text2pcap_LIBS) image\text2pcap.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "text2pcap.exe.manifest" -outputresource:text2pcap.exe;1
mt.exe -nologo -manifest "dftest.exe.manifest" -outputresource:dftest.exe;1
!ENDIF
-randpkt.exe : $(randpkt_OBJECTS) wsgetopt.obj
+randpkt.exe : $(randpkt_OBJECTS)
@echo Linking $@
$(LINK) @<<
- /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS) wsgetopt.obj
+ /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
!ENDIF
-dumpcap.exe : $(LIBS_CHECK) config.h $(dumpcap_OBJECTS) wsgetopt.obj inet_ntop.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
+dumpcap.exe : $(LIBS_CHECK) config.h $(dumpcap_OBJECTS) wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
@echo Linking $@
$(LINK) @<<
- /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) wsgetopt.obj inet_ntop.obj image\dumpcap.res
+ /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) image\dumpcap.res
<<
!IFDEF MANIFEST_INFO_REQUIRED
mt.exe -nologo -manifest "dumpcap.exe.manifest" -outputresource:dumpcap.exe;1
$(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c $?
#
-# The following targets will rebuild their respective objs
+# The following targets will rebuild their respective objs
# if and when svnversion.h should change.
#
clean-local: clean-deps
rm -f $(wireshark_OBJECTS) $(tshark_OBJECTS) $(dumpcap_OBJECTS) $(rawshark_OBJECTS) \
- $(EXTRA_OBJECTS) $(EXECUTABLES) *.pdb *.exe.manifest \
+ $(EXECUTABLES) *.pdb *.exe.manifest \
capinfos.obj editcap.obj mergecap.obj text2pcap.obj \
nio-ie5.obj update.obj \
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
!ENDIF
doxygen: doxygen.cfg doxygen-run
-
+
################################################################################
# Prepare build environment by downloading and installing required libraries
# If $(CHECK_TAG) is non-null then checktag failed; Exit with an error message. (See beginning of this Makefile).
# Otherwise do detailed library package files verification only if Makefile.nmake or config.make have been updated
# (or dummy file doesn't exist because of 'make clean' or whatever).
-# Note that the creation/modification time of a file after an svn update of that file
+# Note that the creation/modification time of a file after an svn update of that file
# is the time of the update (not the time of the file in the repository).
# touch is only called if libverify succeeds.
$(LIBS_CHECK): $(CHECK_TAG) config.nmake Makefile.nmake
xcopy ".\wimaxasncp\*.*" $(INSTALL_DIR)\wimaxasncp /d
if not exist $(INSTALL_DIR)\plugins mkdir $(INSTALL_DIR)\plugins
if not exist $(INSTALL_DIR)\plugins\$(VERSION) mkdir $(INSTALL_DIR)\plugins\$(VERSION)
- cd plugins
- $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-plugins
- cd ..
+ cd plugins
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake install-plugins
+ cd ..
# "install-all" will copy all files needed to run Wireshark/Tshark
# to the INSTALL_DIR, so you can run/debug Wireshark/Tshark from there.
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#include "svnversion.h"
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#include <glib.h>
#include <errno.h>
#ifdef NEED_STRERROR_H
-#include "strerror.h"
+#include "wsutil/strerror.h"
#endif
#include <glib.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#ifdef HAVE_NETDB_H
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#include <wsutil/privileges.h>
g_free(caps);
return NULL;
}
- status = pcap_can_set_rfmon(pch);
+ status = pcap_can_set_rfmon(pch);
if (status < 0) {
/* Error. */
if (status == PCAP_ERROR)
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#ifdef _WIN32
#endif
#ifdef NEED_STRPTIME_H
-# include "strptime.h"
+# include "wsutil/strptime.h"
#endif
#include "epan/crypt/crypt-md5.h"
{
struct tm *tmp;
gchar *buf = g_malloc(16);
-
+
#ifdef _MSC_VER
/* calling localtime() on MSVC 2005 with huge values causes it to crash */
/* XXX - find the exact value that still does work */
}
static gchar*
-fileset_get_filename_by_pattern(guint idx, const struct wtap_nstime *time_val,
+fileset_get_filename_by_pattern(guint idx, const struct wtap_nstime *time_val,
gchar *fprefix, gchar *fsuffix)
{
gchar filenum[5+1];
pdh = wtap_dump_open(filename, out_file_type,
out_frame_type, wtap_snapshot_length(wth),
FALSE /* compressed */, &err);
- if (pdh == NULL) {
+ if (pdh == NULL) {
fprintf(stderr, "editcap: Can't open or create %s: %s\n", filename,
wtap_strerror(err));
exit(2);
if (split_packet_count > 0) {
/* time for the next file? */
- if (written_count > 0 &&
+ if (written_count > 0 &&
written_count % split_packet_count == 0) {
if (!wtap_dump_close(pdh, &err)) {
fprintf(stderr, "editcap: Error writing to %s: %s\n", filename,
pdh = wtap_dump_open(filename, out_file_type,
out_frame_type, wtap_snapshot_length(wth), FALSE /* compressed */, &err);
if (pdh == NULL) {
- fprintf(stderr, "editcap: Can't open or create %s: %s\n", filename,
+ fprintf(stderr, "editcap: Can't open or create %s: %s\n", filename,
wtap_strerror(err));
exit(2);
}
asm_utils.h \
asm_utils_win32_x86.asm
-EXTRA_libwireshark_la_SOURCES = \
- inet_aton.c \
- inet_aton.h
-
EXTRA_DIST = \
diam_dict.l \
dtd_grammar.lemon \
libwireshark_generated.la \
libwireshark_asmopt.a \
libwireshark_asmopt.la \
- inet_ntop.c \
- inet_pton.c \
*~
DISTCLEANFILES = \
sminmpec.c: enterprise-numbers ../tools/make-sminmpec.pl
$(PERL) $(srcdir)/../tools/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
-inet_ntop.c:
- ln -s $(srcdir)/../inet_ntop.c .
-
-inet_pton.c:
- ln -s $(srcdir)/../inet_pton.c .
-
if HAVE_PLUGINS
if ENABLE_STATIC
LIBWIRESHARK_OBJECTS = $(LIBWIRESHARK_ALL_SRC:.c=.obj)
EXTRA_OBJECTS = \
-# strerror.obj \
- inet_aton.obj \
- inet_pton.obj \
- inet_ntop.obj \
- strptime.obj \
!IF defined(NASM) && "$(WIRESHARK_TARGET_PLATFORM)" == "win32"
asm_utils_win32_x86.obj
!ELSE
libwireshark.lib libwireshark.dll *.manifest libwireshark.exp \
*.pdb doxygen.cfg html/*.* \
exntest.obj exntest.exe reassemble_test.obj reassemble_test.exe tvbtest.obj tvbtest.exe
- if exist html rmdir html
+ if exist html rmdir html
clean: clean-local
cd crc
# the same for now.
#
distclean-local: clean-local
- rm -f config.h register.c mkstemp.c strptime.c \
- inet_ntop.c inet_pton.c \
+ rm -f config.h register.c mkstemp.c \
$(LIBWIRESHARK_DISTCLEAN_GENERATED_SRC) \
$(LIBWIRESHARK_DISTCLEAN_GENERATED_INCLUDES) \
$(LIBWIRESHARK_NODISTCLEAN_GENERATED_SRC) \
$(LIBWIRESHARK_NODISTCLEAN_GENERATED_INCLUDES) \
- dtd_grammar.out sminmpec.c
+ dtd_grammar.out sminmpec.c
distclean: distclean-local
cd crc
$(NASM) -f $(WIRESHARK_TARGET_PLATFORM) -o $@ $?
!ENDIF
-# (Windows only) Copy some sources from /trunk to /trunk/epan.
-# It is a cleaner to compile these sources separately with this makefile than
-# using the object code compiled by the makefile in /trunk for both dynamically
-# and statically linking
-
-strptime.c: ..\strptime.c
- set copycmd=/y
- xcopy ..\strptime.c . /d
-
-inet_ntop.c: ..\inet_ntop.c
- set copycmd=/y
- xcopy ..\inet_ntop.c . /d
-
-inet_pton.c: ..\inet_pton.c
- set copycmd=/y
- xcopy ..\inet_pton.c . /d
-
sminmpec.c: enterprise-numbers ..\tools\make-sminmpec.pl
$(PERL) ../tools/make-sminmpec.pl enterprise-numbers sminmpec.c
RUNLEX=..\tools\runlex.sh
-
+
diam_dict_lex.h: diam_dict.c
diam_dict.obj : diam_dict.c
$(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c $?
#endif
#ifdef NEED_INET_ATON_H
-# include "inet_aton.h"
+# include "wsutil/inet_aton.h"
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#if defined(_WIN32) && defined(INET6)
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#include "to_str.h"
/* copy to output buffer */
if (tempptr != temp) {
size_t temp_len = (size_t) (tempptr - temp);
-
+
if (temp_len < (size_t) buf_len) {
memcpy(buf, temp, temp_len);
buf[temp_len] = '\0';
#include <epan/packet.h>
#include <epan/emem.h>
#include <epan/addr_resolv.h>
-#include <epan/inet_aton.h>
+#include <wsutil/inet_aton.h>
#include <epan/expert.h>
#include <epan/prefs.h>
#include <ctype.h>
#include <epan/emem.h>
#include <epan/tap.h>
#include <epan/reassemble.h>
-#include "inet_v6defs.h"
+#ifdef NEED_INET_V6DEFS_H
+#include "wsutil/inet_v6defs.h"
+#endif
#include "packet-ssl-utils.h"
/* we need to remember the top tree so that subdissectors we call are created
#include <glib.h>
#include <math.h>
#ifdef NEED_STRERROR_H
-#include "strerror.h"
+#include "wsutil/strerror.h"
#endif
#include "isprint.h"
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#include <glib.h>
#include <epan/filesystem.h>
#include <epan/report_err.h>
#include <epan/expert.h>
-#include "inet_v6defs.h"
+#ifdef NEED_INET_V6DEFS_H
+#include "wsutil/inet_v6defs.h"
+#endif
#include "packet-x509if.h"
#include "packet-ssl.h"
#include "packet-ssl-utils.h"
#endif
#ifdef NEED_INET_V6DEFS_H
-# include "inet_v6defs.h"
+# include "wsutil/inet_v6defs.h"
#endif
#include <glib.h>
#include <ftypes-int.h>
#ifdef NEED_STRPTIME_H
-#include "strptime.h"
+#include "wsutil/strptime.h"
#endif
static gboolean
{
char *curptr, *endptr;
gboolean negative = FALSE;
-
+
curptr = s;
if(*curptr == '-') {
negative = TRUE;
curptr++;
}
-
+
/*
* If it doesn't begin with ".", it should contain a seconds
* value.
{
return &(fv->value.time);
}
-
+
static int
absolute_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_)
{
abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL,
rtype == FTREPR_DISPLAY));
}
-
+
static int
relative_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_)
{
#endif
#ifdef NEED_STRERROR_H
-#include "strerror.h"
+#include "wsutil/strerror.h"
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#ifdef _WIN32 /* Needed for console I/O */
{
#ifdef HAVE_GTKOSXAPPLICATION
GtkOSXApplication *theApp;
-#endif
+#endif
switch(event) {
case(capture_cb_capture_prepared):
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_DEBUG, "Callback: capture prepared");
#ifdef HAVE_GTKOSXAPPLICATION
GtkOSXApplication *theApp;
#endif
-
+
#ifdef HAVE_LIBPCAP
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
#define OPTSTRING_B "B:"
gtk_osxapplication_set_dock_icon_pixbuf(theApp,gdk_pixbuf_new_from_xpm_data(wsicon64_xpm));
gtk_osxapplication_ready(theApp);
#endif
-
+
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_INFO, "Wireshark is up and ready to go");
/* we'll enter the GTK loop now and hand the control over to GTK ... */
#ifdef HAVE_GTKOSXAPPLICATION
g_object_unref(theApp);
#endif
-
+
/* Shutdown windows sockets */
WSACleanup();
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#include "svnversion.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#ifdef HAVE_UNISTD_H
#endif
#ifdef NEED_STRERROR_H
-#include "strerror.h"
+#include "wsutil/strerror.h"
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#include <glib.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#ifdef NEED_STRPTIME_H
-# include "strptime.h"
+# include "wsutil/strptime.h"
#endif
#include "text2pcap.h"
" -u <srcp>,<destp> prepend dummy UDP header with specified\n"
" dest and source ports (in DECIMAL).\n"
" Automatically prepends Ethernet & IP headers as well.\n"
- " Example: -u 1000 69 to make the packets look like TFTP/UDP packets.\n"
+ " Example: -u 1000 69 to make the packets look like TFTP/UDP packets.\n"
" -T <srcp>,<destp> prepend dummy TCP header with specified\n"
" dest and source ports (in DECIMAL).\n"
" Automatically prepends Ethernet & IP headers as well.\n"
#endif
#ifdef NEED_STRERROR_H
-#include "strerror.h"
+#include "wsutil/strerror.h"
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
-#include "wsgetopt.h"
+#include "wsutil/wsgetopt.h"
#endif
#include <glib.h>
ENDIF(WIN32)
set(WSUTIL_FILES
+# @GETOPT_O@ # wsgetopt.c
+# @INET_ATON_LO@ # inet_aton.c
+# @INET_NTOP_LO@ # inet_ntop.c
+# @INET_PTON_LO@ # inet_pton.c
+# @STRERROR_O@ # strerror.c
+# @STRNCASECMP_O@ # strncasecmp.c
+# @STRPTIME_O@ # strptime.c
mpeg-audio.c
privileges.c
str_util.c
AM_CFLAGS = -Werror
endif
+# Optional objects that I know how to build. These will be
+# linked into libwsutil.
+wsutil_optional_objects = \
+ @GETOPT_O@ \
+ @STRERROR_O@ \
+ @STRNCASECMP_O@ \
+ @STRPTIME_O@ \
+ @INET_PTON_LO@ \
+ @INET_NTOP_LO@
+
lib_LTLIBRARIES = libwsutil.la
INCLUDES = -I$(srcdir)/..
-libwsutil_la_SOURCES = \
+libwsutil_la_SOURCES = \
$(LIBWSUTIL_SRC) \
$(LIBWSUTIL_INCLUDES)
-libwsutil_la_LIBADD = @GLIB_LIBS@
+libwsutil_la_LIBADD = \
+ @GLIB_LIBS@ \
+ $(wsutil_optional_objects)
-EXTRA_DIST = \
+EXTRA_DIST = \
Makefile.common \
Makefile.nmake \
file_util.c \
file_util.h \
+ inet_ntop.c \
+ inet_pton.c \
+ inet_v6defs.h \
libwsutil.def \
+ strerror.c \
+ strerror.h \
+ strncasecmp.c \
+ strptime.c \
+ strptime.h \
unicode-utils.c \
- unicode-utils.h
+ unicode-utils.h \
+ wsgetopt.c \
+ wsgetopt.h
CLEANFILES = \
libwsutil.a \
# generated from YACC or Lex files (as Automake doesn't want them in
# _SOURCES variables).
LIBWSUTIL_SRC = \
+ inet_aton.c \
mpeg-audio.c \
privileges.c \
- str_util.c \
+ str_util.c \
type_util.c
# Header files that are not generated from other files
LIBWSUTIL_INCLUDES = \
+ inet_aton.h \
mpeg-audio.h \
privileges.h \
- str_util.h \
+ str_util.h \
type_util.h
# For use when making libwsutil.dll
libwsutil_LIBS = $(GLIB_LIBS)
-OBJECTS = file_util.obj unicode-utils.obj $(LIBWSUTIL_SRC:.c=.obj)
-
+OBJECTS = file_util.obj \
+ inet_ntop.obj \
+ inet_pton.obj \
+ $(LIBWSUTIL_SRC:.c=.obj) \
+ strptime.obj \
+ unicode-utils.obj \
+ wsgetopt.obj
# For use when making libwsutil.dll
libwsutil.lib: libwsutil.dll
ws_stdio_stat
ws_stdio_unlink
+; inet_aton.c
+inet_aton
+
+; inet_ntop.c
+inet_ntop
+
+; inet_pton.c
+inet_pton
+
; mpeg-audio.c
mpa_bitrate
mpa_frequency
running_with_special_privs
started_with_special_privs
+; strptime.c
+strptime
+
; str_util.c
ascii_strdown_inplace
ascii_strup_inplace
utf_16to8
utf_8to16
utf_8to16_snprintf
+
+; wsgetopt.c
+getopt
+optarg DATA
+optind DATA
+opterr DATA
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
-extern char *optarg;
+WS_VAR_IMPORT char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
-extern int optind;
+WS_VAR_IMPORT int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
-extern int opterr;
+WS_VAR_IMPORT int opterr;
/* Set to an option character which was unrecognized. */
-extern int optopt;
+WS_VAR_IMPORT int optopt;
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector