diff --git a/CMakeLists.txt b/CMakeLists.txt index e57fc0b59d..d00a66be27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,7 +216,7 @@ message(STATUS "C-Flags: ${CMAKE_C_FLAGS}\nCXX-Flags: ${CMAKE_CXX_FLAGS}") check_c_compiler_flag(-fvisibility=hidden FVHIDDEN) if((FVHIDDEN)) - set(COMPILE_HIDE_SYMBOLS -fvisibility=hidden) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") else() # TODO add alternate compiler flags for hiding symbols message(WARNING "Hiding shared library symbols is not supported by the compiler." " All shared library symbols will be exported.") @@ -517,14 +517,8 @@ if(ENABLE_PCAP_NG_DEFAULT) endif() #Platform specific -if(UNIX) - if(CMAKE_COMPILER_IS_GNUCC) - # set(WS_VAR_IMPORT "__attribute__((visibility(\"default\")))" ) - set(WS_VAR_IMPORT "extern") - else() - set(WS_VAR_IMPORT "extern") - endif() -endif() +#if(UNIX) +#endif() if(APPLE) # @@ -538,8 +532,6 @@ if(APPLE) endif() if(WIN32) - add_definitions(-D_NEED_VAR_IMPORT_) - set(WS_VAR_IMPORT "__declspec(dllimport) extern") set(WS_MSVC_NORETURN "__declspec(noreturn)") # Disable deprecation diff --git a/Makefile.nmake b/Makefile.nmake index 507a925668..d7a978a638 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -41,7 +41,6 @@ LDFLAGS = /NOLOGO /INCREMENTAL:NO $(LOCAL_LDFLAGS) # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output GENERATED_CFLAGS=\ $(STANDARD_CFLAGS) \ - -D_NEED_VAR_IMPORT_ \ /I. /Iwiretap $(GLIB_CFLAGS) \ $(ZLIB_CFLAGS) /I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \ $(C_ARES_CFLAGS) $(ADNS_CFLAGS) $(GNUTLS_CFLAGS) \ @@ -428,7 +427,6 @@ config.h : config.h.win32 config.nmake -e "s/@HAVE_PCAP_SET_DATALINK@/$(PCAP_SET_DATALINK_CONFIG)/" \ -e "s/@HAVE_PCAP_SETSAMPLING@/$(PCAP_SETSAMPLING_CONFIG)/" \ -e "s/@HAVE_BPF_IMAGE@/$(BPF_IMAGE_CONFIG)/" \ - -e "s/@HAVE_LIBWIRESHARKDLL@/$(LIBWIRESHARK_CONFIG)/" \ -e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \ -e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \ -e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \ @@ -488,8 +486,6 @@ QMAKE_CFLAGS *= $(STANDARD_CFLAGS) $(PORTAUDIO_CFLAGS:\=/) QMAKE_CXXFLAGS *= $(STANDARD_CFLAGS) $(PORTAUDIO_CFLAGS:\=/) QMAKE_LFLAGS *= /LARGEADDRESSAWARE $(LDFLAGS) -DEFINES += _NEED_VAR_IMPORT_ - < typedef void (*h223_set_mc_handle_t) ( packet_info* pinfo, guint8 mc, h223_mux_element* me ); -extern void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ); +WS_DLL_PUBLIC void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ); typedef void (*h223_add_lc_handle_t) ( packet_info* pinfo, guint16 lc, h223_lc_params* params ); -extern void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ); +WS_DLL_PUBLIC void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ); #include "packet-h245-exp.h" void dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str); diff --git a/asn1/h248/packet-h248-template.h b/asn1/h248/packet-h248-template.h index add9e95682..6833475f3a 100644 --- a/asn1/h248/packet-h248-template.h +++ b/asn1/h248/packet-h248-template.h @@ -28,6 +28,7 @@ #ifndef PACKET_H248_H #include +#include "ws_symbol_export.h" /*#include "packet-h248-exp.h"*/ typedef struct _h248_curr_info_t h248_curr_info_t; @@ -36,7 +37,7 @@ typedef void (*h248_pkg_param_dissector_t)(proto_tree* tree, tvbuff_t* tvb, pack extern void h248_param_bytes_item(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_uint_item(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); -extern void h248_param_ber_integer(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); +WS_DLL_PUBLIC void h248_param_ber_integer(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_ber_octetstring(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_ber_boolean(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void external_dissector(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* dissector_handle); @@ -112,6 +113,7 @@ struct _h248_curr_info_t { const h248_pkg_param_t* par; }; +WS_DLL_PUBLIC void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action); #endif /* PACKET_H248_H */ diff --git a/asn1/kerberos/packet-kerberos-template.c b/asn1/kerberos/packet-kerberos-template.c index 814f8a83d1..da5f26fc0d 100644 --- a/asn1/kerberos/packet-kerberos-template.c +++ b/asn1/kerberos/packet-kerberos-template.c @@ -220,6 +220,8 @@ printf("added key in %u keytype:%d len:%d\n",pinfo->fd->num, keytype, keyleng static krb5_context krb5_ctx; + +WS_DLL_PUBLIC void read_keytab_file(const char *filename) { @@ -357,6 +359,7 @@ printf("woohoo decrypted keytype:%d in frame:%u\n", ek->keytype, pinfo->fd->num) #elif defined(HAVE_HEIMDAL_KERBEROS) static krb5_context krb5_ctx; +WS_DLL_PUBLIC void read_keytab_file(const char *filename) { @@ -551,6 +554,7 @@ clear_keytab(void) { service_key_list = NULL; } +WS_DLL_PUBLIC static void read_keytab_file(const char *service_key_file) { diff --git a/asn1/ldap/packet-ldap-template.h b/asn1/ldap/packet-ldap-template.h index 54c49cb2d8..4e6428c4ff 100644 --- a/asn1/ldap/packet-ldap-template.h +++ b/asn1/ldap/packet-ldap-template.h @@ -27,6 +27,7 @@ #define __PACKET_LDAP_H__ # include /* for dissector_*_t types */ +#include "ws_symbol_export.h" /* * These are all APPLICATION types; the value is the type tag. @@ -103,6 +104,7 @@ typedef struct ldap_call_response { void register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector); void register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto); +WS_DLL_PUBLIC int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gboolean prepend_dot _U_); /*#include "packet-ldap-exp.h" */ diff --git a/asn1/q932/q932.cnf b/asn1/q932/q932.cnf index 2b1c37a0d2..4ac3710d8c 100644 --- a/asn1/q932/q932.cnf +++ b/asn1/q932/q932.cnf @@ -15,11 +15,11 @@ NetworkProtocolProfile # Addressing-Data-Elements PresentedAddressScreened PresentedAddressUnscreened -PresentedNumberScreened -PresentedNumberUnscreened +PresentedNumberScreened WS_DLL +PresentedNumberUnscreened WS_DLL Address -PartyNumber -PartySubaddress +PartyNumber WS_DLL +PartySubaddress WS_DLL ScreeningIndicator PresentationAllowedIndicator diff --git a/asn1/qsig/qsig.cnf b/asn1/qsig/qsig.cnf index 681f306b25..e181d8a02c 100644 --- a/asn1/qsig/qsig.cnf +++ b/asn1/qsig/qsig.cnf @@ -10,7 +10,7 @@ GROUP_BY_PROT -o qsig #.END -#.EXPORTS EXTERN VALS_WITH_TABLE +#.EXPORTS EXTERN VALS_WITH_TABLE WS_DLL Name diff --git a/asn1/s1ap/s1ap.cnf b/asn1/s1ap/s1ap.cnf index f3e7087eca..e4dc19424b 100644 --- a/asn1/s1ap/s1ap.cnf +++ b/asn1/s1ap/s1ap.cnf @@ -13,7 +13,7 @@ CauseRadioNetwork ProcedureCode ProtocolIE-ID -#.EXPORTS ONLY_VALS WS_VAR +#.EXPORTS ONLY_VALS WS_DLL CauseRadioNetwork CauseTransport CauseNas diff --git a/asn1/t38/packet-t38-template.h b/asn1/t38/packet-t38-template.h index dca5814dc5..7dae72ba6b 100644 --- a/asn1/t38/packet-t38-template.h +++ b/asn1/t38/packet-t38-template.h @@ -25,6 +25,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + #define MAX_T38_DATA_ITEMS 4 #define MAX_T38_DESC 128 @@ -72,6 +74,7 @@ typedef struct _t38_conv } t38_conv; /* Add an T38 conversation with the given details */ +WS_DLL_PUBLIC void t38_add_address(packet_info *pinfo, address *addr, int port, int other_port, diff --git a/asn1/t38/t38.cnf b/asn1/t38/t38.cnf index 940541aebc..d5df9e8b6a 100644 --- a/asn1/t38/t38.cnf +++ b/asn1/t38/t38.cnf @@ -4,7 +4,7 @@ # $Id$ -#.EXPORTS ONLY_VALS WS_VAR +#.EXPORTS ONLY_VALS WS_DLL Type-of-msg/t30-indicator Type-of-msg/t30-data #.END diff --git a/asn1/tcap/packet-tcap-template.h b/asn1/tcap/packet-tcap-template.h index 79b7e9c005..5c2077c2aa 100644 --- a/asn1/tcap/packet-tcap-template.h +++ b/asn1/tcap/packet-tcap-template.h @@ -26,6 +26,9 @@ #ifndef PACKET_tcap_H #define PACKET_tcap_H + +#include "ws_symbol_export.h" + /* TCAP component type */ #define TCAP_COMP_INVOKE 0xa1 #define TCAP_COMP_RRL 0xa2 @@ -77,10 +80,10 @@ extern dissector_handle_t get_itu_tcap_subdissector(guint32 ssn); dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn); extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); extern void call_tcap_dissector(dissector_handle_t, tvbuff_t*, packet_info*, proto_tree*); diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 1a0cfb18d3..21f2698f94 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -372,10 +372,6 @@ first (like Motorola and SPARC, unlike Intel and VAX). */ #cmakedefine WORDS_BIGENDIAN 1 -/* Define as the string to precede external variable declarations in - dynamically-linked libraries */ -#define WS_VAR_IMPORT @WS_VAR_IMPORT@ - /* Define WS_MSVC_NORETURN appropriately for declarations of routines that never return (just like Charlie on the MTA). diff --git a/config.h.win32 b/config.h.win32 index 835d4d9df2..c10c89e533 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -52,7 +52,6 @@ @HAVE_PCAP_DATALINK_NAME_TO_VAL@ @HAVE_PCAP_DATALINK_VAL_TO_NAME@ @HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION@ -@HAVE_LIBWIRESHARKDLL@ @HAVE_PCAP_LIST_DATALINKS@ @HAVE_PCAP_FREE_DATALINKS@ @@ -76,15 +75,6 @@ @PCAP_NG_DEFAULT@ @WANT_PACKET_EDITOR@ -/* define macro for importing variables from an dll - * it depends on HAVE_LIBWIRESHARKDLL and _NEED_VAR_IMPORT_ - */ -#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL) -# define WS_VAR_IMPORT __declspec(dllimport) extern -#else -# define WS_VAR_IMPORT extern -#endif - /* * Define WS_MSVC_NORETURN appropriately for declarations of routines that * never return (just like Charlie on the MTA). diff --git a/config.nmake b/config.nmake index 2029cbb35a..b15f11593e 100644 --- a/config.nmake +++ b/config.nmake @@ -1508,7 +1508,6 @@ WINSPARKLE_LIBS= !ENDIF !IFDEF ENABLE_LIBWIRESHARK -LIBWIRESHARK_CONFIG=^#define HAVE_LIBWIRESHARKDLL 1 # Link plugins with the import library of libwireshark.dll LINK_PLUGINS_WITH_LIBWIRESHARK=USE !ELSE diff --git a/configure.ac b/configure.ac index 8d0e6169c6..2d8d9f2465 100644 --- a/configure.ac +++ b/configure.ac @@ -521,15 +521,11 @@ fi CFLAGS_before_fvhidden=$CFLAGS AC_WIRESHARK_GCC_CFLAGS_CHECK(-fvisibility=hidden) -if test "x$CLFAGS" != "x$CFLAGS_before_fvhidden" +if test "x$CLFAGS" = "x$CFLAGS_before_fvhidden" then - # Restore CFLAGS - CFLAGS=$CFLAGS_before_fvhidden - AC_DEFINE(COMPILE_HIDE_SYMBOLS, "-fvisibility=hidden", [Compiler will hide symbols not exported explicitly using -fvisibility=hidden]) -else - AC_DEFINE(COMPILE_HIDE_SYMBOLS, "", [Compiler will export all symbols from shared libraries]) + # TODO add other ways of hiding symbols + AC_MSG_WARN(Compiler will export all symbols from shared libraries) fi -AC_SUBST(COMPILE_HIDE_SYMBOLS) AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed]) ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M]) @@ -1978,12 +1974,6 @@ fi AM_CONDITIONAL(HAVE_LIBPY, test x$want_python != xno) AC_SUBST(pythondir) -# -# Define WS_VAR_IMPORT appropriately for declarations of external -# variables exported from dynamically-linked libraries. -# -AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries]) - # # Define WS_MSVC_NORETURN appropriately for declarations of routines that # never return (just like Charlie on the MTA). diff --git a/doc/README.plugins b/doc/README.plugins index 85e8d0a64a..e60179d9e8 100644 --- a/doc/README.plugins +++ b/doc/README.plugins @@ -287,7 +287,7 @@ stips the parts outlined below: o Removed the definition: #ifndef ENABLE_STATIC - G_MODULE_EXPORT gchar version[] = VERSION; + WS_DLL_PUBLIC_NOEXTERN gchar version[] = VERSION; #endif o Move relevant code from the blocks and delete these functions: diff --git a/doc/README.stats_tree b/doc/README.stats_tree index 712523d466..f20c642589 100644 --- a/doc/README.stats_tree +++ b/doc/README.stats_tree @@ -110,9 +110,9 @@ extern int udp_term_stats_tree_packet(stats_tree *st, /* st as it was passed to } #ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = "0.0"; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0"; -G_MODULE_EXPORT void plugin_register_tap_listener(void) { +WS_DLL_PUBLIC_NOEXTERN void plugin_register_tap_listener(void) { stats_tree_register("udp", /* the proto we are going to "tap" */ "udp_terms", /* the abbreviation for this tree (to be used as -z udp_terms,tree) */ diff --git a/docbook/wsdg_src/WSDG_chapter_dissection.xml b/docbook/wsdg_src/WSDG_chapter_dissection.xml index 6bdfd4784f..efdda7829b 100644 --- a/docbook/wsdg_src/WSDG_chapter_dissection.xml +++ b/docbook/wsdg_src/WSDG_chapter_dissection.xml @@ -1115,9 +1115,9 @@ static void register_foo_stat_trees(void) { foo_stats_tree_packet, foo_stats_tree_init, NULL); } -G_MODULE_EXPORT const gchar version[] = "0.0"; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0"; -G_MODULE_EXPORT void plugin_register_tap_listener(void) +WS_DLL_PUBLIC_NOEXTERN void plugin_register_tap_listener(void) { register_foo_stat_trees(); } diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 720663581e..69257b3fed 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -1548,6 +1548,7 @@ add_dependencies(epan svnversion) set(FULL_SO_VERSION "0.0.0") +set_target_properties(epan PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL") set_target_properties(epan PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}") set_target_properties(epan PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0) @@ -1573,7 +1574,7 @@ file(MAKE_DIRECTORY abi-check-headers abi-check-headers/epan abi-check-headers/wmem) file(MAKE_DIRECTORY abi-check-headers/epan) -file(COPY ../color.h ../register.h DESTINATION abi-check-headers) +file(COPY ../color.h ../register.h ../ws_symbol_export.h DESTINATION abi-check-headers) file(COPY ${EPAN_HEADERS} DESTINATION abi-check-headers/epan) file(COPY ${CRYPT_HEADERS} DESTINATION abi-check-headers/crypt) file(COPY ${DFILTER_HEADERS} DESTINATION abi-check-headers/dfilter) diff --git a/epan/Makefile.am b/epan/Makefile.am index dbb70d70ae..5585b3a74e 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -56,7 +56,7 @@ ACLOCAL_AMFLAGS = `../aclocal-flags` noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la lib_LTLIBRARIES = libwireshark.la # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -libwireshark_la_LDFLAGS = -version-info 0:0:0 -export-symbols libwireshark.sym @LDFLAGS_SHAREDLIB@ +libwireshark_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@ include Makefile.common @@ -64,9 +64,10 @@ INCLUDES = -I$(srcdir)/.. -I$(srcdir)/$(LEMON) -I$(builddir)/wslua \ @LUA_INCLUDES@ $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \ $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) $(PY_CFLAGS) +AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL if HAVE_WARNINGS_AS_ERRORS -AM_NON_GENERATED_CFLAGS = -Werror +AM_NON_GENERATED_CFLAGS += -Werror endif #Since code generated by lex may trigger gcc warnings, we are now generating two @@ -100,7 +101,6 @@ EXTRA_DIST = \ dtd_parse.h \ dtd_preparse.l \ enterprise-numbers \ - libwireshark.def \ libwireshark.vcproj \ Makefile.common \ Makefile.nmake \ @@ -119,7 +119,6 @@ CLEANFILES = \ libwireshark_generated.la \ libwireshark_asmopt.a \ libwireshark_asmopt.la \ - libwireshark.sym \ *~ DISTCLEANFILES = \ @@ -152,8 +151,7 @@ libwireshark_la_DEPENDENCIES = \ ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \ dissectors/libdirtydissectors.la wmem/libwmem.la $(wslua_lib) $(wspython_lib) \ ${top_builddir}/wsutil/libwsutil.la \ - ${top_builddir}/wiretap/libwiretap.la \ - libwireshark.sym + ${top_builddir}/wiretap/libwiretap.la EXTRA_PROGRAMS = reassemble_test reassemble_test_LDADD = \ @@ -192,21 +190,6 @@ tvbtest.o exntest.o: exceptions.h sminmpec.c: enterprise-numbers ../tools/make-sminmpec.pl $(PERL) $(srcdir)/../tools/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c -def_sym_filter_symbols = - -if !HAVE_PLUGINS -# If we're not building plugins, these symbols don't get built. -# Keep them out of the symbol list. -def_sym_filter_symbols += /^register_all_plugin_tap_listeners/ || /^plugin_list/ {next;}; -endif - -if !HAVE_LIBPY -# If we're not building python, these symbols don't get built. -# Keep them out of the symbol list. -def_sym_filter_symbols += /^py_create_dissector_handle/ || /^py_dissector_args/ {next;}; -def_sym_filter_symbols += /^py_generic_dissector/ || /^py_pinfo/ || /^py_tree/ || /^py_tvbuff/ {next;}; -def_sym_filter_symbols += /^hf_register_info_add/ || /^hf_register_info_create/ || /^hf_register_info_destroy/ {next;}; -endif if HAVE_PLUGINS diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 76491c0b86..b172601488 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -19,7 +19,7 @@ GENERATED_CFLAGS=\ $(LUA_CFLAGS) $(GNUTLS_CFLAGS) /I$(PCAP_DIR)\include \ $(PYTHON_CFLAGS) $(SMI_CFLAGS) $(GEOIP_CFLAGS) -CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) +CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) -DWS_BUILD_DLL !IFDEF LUA_DIR WSLUA_LIB=wslua\wslua.lib @@ -86,12 +86,12 @@ all: crypt ftypes dfilter wmem $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwiresh libwireshark.lib: libwireshark.dll libwireshark.exp: libwireshark.dll -libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt ftypes dfilter wmem $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ +libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter wmem $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib wmem/wmem.lib dissectors\dissectors.lib $(WSLUA_LIB) $(WSPYTHON_LIB) ..\image\libwireshark.res @echo Linking libwireshark.dll $(link) $(dlllflags) $(conlibsdll) shell32.lib \ $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \ - /DEF:libwireshark.def /OUT:libwireshark.dll \ + /OUT:libwireshark.dll \ /IMPLIB:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \ $(libwireshark_LIBS) ..\image\libwireshark.res \ dissectors\register.obj \ diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h index 0f51d104f9..4b19ecfded 100644 --- a/epan/addr_resolv.h +++ b/epan/addr_resolv.h @@ -36,6 +36,7 @@ #include #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -57,7 +58,7 @@ typedef struct _e_addr_resolve { /* * Flag controlling what names to resolve. */ -WS_VAR_IMPORT e_addr_resolve gbl_resolv_flags; +WS_DLL_PUBLIC e_addr_resolve gbl_resolv_flags; /* global variables */ @@ -72,13 +73,13 @@ extern gchar *g_pipxnets_path; * get_udp_port() returns the port name corresponding to that UDP port, * or the port number as a string if not found. */ -extern gchar *get_udp_port(guint port); +WS_DLL_PUBLIC gchar *get_udp_port(guint port); /* * get_tcp_port() returns the port name corresponding to that TCP port, * or the port number as a string if not found. */ -extern gchar *get_tcp_port(guint port); +WS_DLL_PUBLIC gchar *get_tcp_port(guint port); /* * get_dccp_port() returns the port name corresponding to that DCCP port, @@ -90,7 +91,7 @@ extern gchar *get_dccp_port(guint port); * get_sctp_port() returns the port name corresponding to that SCTP port, * or the port number as a string if not found. */ -extern gchar *get_sctp_port(guint port); +WS_DLL_PUBLIC gchar *get_sctp_port(guint port); /* get_addr_name takes as input an "address", as defined in address.h */ /* it returns a string that contains: */ @@ -101,6 +102,7 @@ extern gchar *get_sctp_port(guint port); /* which should be a string representation for the answer -e.g. "10.10.10.10" for IPv4 */ /* address 10.10.10.10 */ +WS_DLL_PUBLIC const gchar *get_addr_name(const address *addr); const gchar *se_get_addr_name(const address *addr); @@ -130,25 +132,25 @@ extern void host_name_lookup_init(void); * @return True if any new objects have been resolved since the previous * call. This can be used to trigger a display update, e.g. in Wireshark. */ -extern gboolean host_name_lookup_process(void); +WS_DLL_PUBLIC gboolean host_name_lookup_process(void); /* host_name_lookup_cleanup cleans up an ADNS socket if we're using ADNS */ extern void host_name_lookup_cleanup(void); /* get_hostname returns the host name or "%d.%d.%d.%d" if not found */ -extern const gchar *get_hostname(const guint addr); +WS_DLL_PUBLIC const gchar *get_hostname(const guint addr); /* get_hostname6 returns the host name, or numeric addr if not found */ struct e_in6_addr; -extern const gchar* get_hostname6(const struct e_in6_addr *ad); +WS_DLL_PUBLIC const gchar* get_hostname6(const struct e_in6_addr *ad); /* get_ether_name returns the logical name if found in ethers files else "_%02x:%02x:%02x" if the vendor code is known else "%02x:%02x:%02x:%02x:%02x:%02x" */ -extern gchar *get_ether_name(const guint8 *addr); +WS_DLL_PUBLIC gchar *get_ether_name(const guint8 *addr); /* get_ether_name returns the logical name if found in ethers files else NULL */ -extern gchar *get_ether_name_if_known(const guint8 *addr); +gchar *get_ether_name_if_known(const guint8 *addr); /* * Given a sequence of 3 octets containing an OID, get_manuf_name() @@ -160,7 +162,7 @@ extern const gchar *get_manuf_name(const guint8 *addr); * Given a sequence of 3 octets containing an OID, get_manuf_name_if_known() * returns the vendor name, or NULL if not known. */ -extern const gchar *get_manuf_name_if_known(const guint8 *addr); +WS_DLL_PUBLIC const gchar *get_manuf_name_if_known(const guint8 *addr); /* * Given an integer containing a 24-bit OID, uint_get_manuf_name() @@ -179,14 +181,14 @@ extern const gchar *uint_get_manuf_name_if_known(const guint oid); * tvb_get_manuf_name() returns the vendor name, or "%02x:%02x:%02x" * if not known. */ -extern const gchar *tvb_get_manuf_name(tvbuff_t *tvb, gint offset); +WS_DLL_PUBLIC const gchar *tvb_get_manuf_name(tvbuff_t *tvb, gint offset); /* * Given a tvbuff and an offset in that tvbuff for a 3-octet OID, * tvb_get_manuf_name_if_known() returns the vendor name, or NULL * if not known. */ -extern const gchar *tvb_get_manuf_name_if_known(tvbuff_t *tvb, gint offset); +WS_DLL_PUBLIC const gchar *tvb_get_manuf_name_if_known(tvbuff_t *tvb, gint offset); /* get_eui64_name returns "_%02x:%02x:%02x:%02x:%02x:%02x" if the vendor code is known "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" */ @@ -209,10 +211,10 @@ extern guint8 *get_ether_addr(const gchar *name); guint32 get_ipxnet_addr(const gchar *name, gboolean *known); /* adds a hostname/IPv4 in the hash table */ -extern void add_ipv4_name(const guint addr, const gchar *name); +WS_DLL_PUBLIC void add_ipv4_name(const guint addr, const gchar *name); /* adds a hostname/IPv6 in the hash table */ -extern void add_ipv6_name(const struct e_in6_addr *addr, const gchar *name); +WS_DLL_PUBLIC void add_ipv6_name(const struct e_in6_addr *addr, const gchar *name); /** Add an additional "hosts" file for IPv4 and IPv6 name resolution. * @@ -223,10 +225,10 @@ extern void add_ipv6_name(const struct e_in6_addr *addr, const gchar *name); * * @return TRUE if the hosts file can be read. */ -extern gboolean add_hosts_file (const char *hosts_file); +WS_DLL_PUBLIC gboolean add_hosts_file (const char *hosts_file); /* adds a hostname in the hash table */ -extern gboolean add_ip_name_from_string (const char *addr, const char *name); +WS_DLL_PUBLIC gboolean add_ip_name_from_string (const char *addr, const char *name); /** Get a list of host name to address mappings we know about. * @@ -254,7 +256,7 @@ extern gboolean add_ip_name_from_string (const char *addr, const char *name); * * @return The first element in our list of known addresses. May be NULL. */ -extern struct addrinfo *get_addrinfo_list(void); +WS_DLL_PUBLIC struct addrinfo *get_addrinfo_list(void); /* add ethernet address / name corresponding to IP address */ extern void add_ether_byip(const guint ip, const guint8 *eth); @@ -270,6 +272,7 @@ extern void add_ether_byip(const guint ip, const guint8 *eth); * @param[out] addrp The numeric IPv4 address in network byte order. * @return TRUE on success, FALSE on failure, timeout. */ +WS_DLL_PUBLIC gboolean get_host_ipaddr(const char *host, guint32 *addrp); /** Translates a string representing a hostname or colon-hex IPv6 address @@ -283,6 +286,7 @@ gboolean get_host_ipaddr(const char *host, guint32 *addrp); * @param[out] addrp The numeric IPv6 address in network byte order. * @return TRUE on success, FALSE on failure or timeout. */ +WS_DLL_PUBLIC gboolean get_host_ipaddr6(const char *host, struct e_in6_addr *addrp); /* @@ -290,6 +294,7 @@ gboolean get_host_ipaddr6(const char *host, struct e_in6_addr *addrp); * Return "ip6" if it is IPv6, "ip" otherwise (including the case * that we don't know) */ +WS_DLL_PUBLIC const char* host_ip_af(const char *host); #ifdef __cplusplus diff --git a/epan/asn1.h b/epan/asn1.h index 70bcea6578..d556ff0f32 100644 --- a/epan/asn1.h +++ b/epan/asn1.h @@ -26,6 +26,8 @@ #ifndef __ASN1_H__ #define __ASN1_H__ +#include "ws_symbol_export.h" + typedef enum { ASN1_ENC_BER, /* X.690 - BER, CER, DER */ ASN1_ENC_PER, /* X.691 - PER */ @@ -173,7 +175,7 @@ typedef struct _rose_ctx_t { void *private_data; } rose_ctx_t; -extern void asn1_ctx_init(asn1_ctx_t *actx, asn1_enc_e encoding, gboolean aligned, packet_info *pinfo); +WS_DLL_PUBLIC void asn1_ctx_init(asn1_ctx_t *actx, asn1_enc_e encoding, gboolean aligned, packet_info *pinfo); extern gboolean asn1_ctx_check_signature(asn1_ctx_t *actx); extern void asn1_ctx_clean_external(asn1_ctx_t *actx); extern void asn1_ctx_clean_epdv(asn1_ctx_t *actx); @@ -187,12 +189,12 @@ extern void asn1_param_push_integer(asn1_ctx_t *actx, gint32 value); extern gboolean asn1_param_get_boolean(asn1_ctx_t *actx, const gchar *name); extern gint32 asn1_param_get_integer(asn1_ctx_t *actx, const gchar *name); -extern void rose_ctx_init(rose_ctx_t *rctx); +WS_DLL_PUBLIC void rose_ctx_init(rose_ctx_t *rctx); extern gboolean rose_ctx_check_signature(rose_ctx_t *rctx); -extern void rose_ctx_clean_data(rose_ctx_t *rctx); +WS_DLL_PUBLIC void rose_ctx_clean_data(rose_ctx_t *rctx); -extern asn1_ctx_t *get_asn1_ctx(void *ptr); -extern rose_ctx_t *get_rose_ctx(void *ptr); +WS_DLL_PUBLIC asn1_ctx_t *get_asn1_ctx(void *ptr); +WS_DLL_PUBLIC rose_ctx_t *get_rose_ctx(void *ptr); extern double asn1_get_real(const guint8 *real_ptr, gint real_len); diff --git a/epan/base64.h b/epan/base64.h index 04e6e13030..36ccc9313a 100644 --- a/epan/base64.h +++ b/epan/base64.h @@ -25,12 +25,14 @@ #define __BASE64_H__ #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* In-place decoding of a base64 string. Resulting string is NULL terminated */ +WS_DLL_PUBLIC size_t epan_base64_decode(char *s); extern tvbuff_t* base64_to_tvb(tvbuff_t *parent, const char *base64); diff --git a/epan/bitswap.h b/epan/bitswap.h index 1110acca3a..96c045f6a0 100644 --- a/epan/bitswap.h +++ b/epan/bitswap.h @@ -25,11 +25,13 @@ #ifndef __BITSWAP_H__ #define __BITSWAP_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -extern guint8 swaptab[256]; +WS_DLL_PUBLIC guint8 swaptab[256]; #define BIT_SWAP(b) (swaptab[b]) diff --git a/epan/camel-persistentdata.h b/epan/camel-persistentdata.h index ccf75cc904..3573485980 100644 --- a/epan/camel-persistentdata.h +++ b/epan/camel-persistentdata.h @@ -32,6 +32,7 @@ #include #include #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -56,7 +57,7 @@ extern "C" { #define CAMELSRT_SMS_INITIALDP 9 -WS_VAR_IMPORT const value_string camelSRTtype_naming[]; +WS_DLL_PUBLIC const value_string camelSRTtype_naming[]; /** If we have a request message and its response, (eg: ApplyCharging, ApplyChargingReport) @@ -134,7 +135,7 @@ void camelsrt_call_matching(tvbuff_t *tvb, proto_tree *tree, struct camelsrt_info_t * p_camel_info); -WS_VAR_IMPORT gboolean gcamel_StatSRT; +WS_DLL_PUBLIC gboolean gcamel_StatSRT; #ifdef __cplusplus } diff --git a/epan/charsets.h b/epan/charsets.h index db3cbf0c14..345c7bb99a 100644 --- a/epan/charsets.h +++ b/epan/charsets.h @@ -24,6 +24,8 @@ #ifndef __CHARSETS_H__ #define __CHARSETS_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -32,7 +34,9 @@ extern "C" { void ASCII_to_EBCDIC(guint8 *buf, guint bytes); guint8 ASCII_to_EBCDIC1(guint8 c); #endif +WS_DLL_PUBLIC void EBCDIC_to_ASCII(guint8 *buf, guint bytes); +WS_DLL_PUBLIC guint8 EBCDIC_to_ASCII1(guint8 c); #ifdef __cplusplus diff --git a/epan/circuit.h b/epan/circuit.h index bf5480fd43..2cb8757b43 100644 --- a/epan/circuit.h +++ b/epan/circuit.h @@ -26,6 +26,7 @@ #define __CIRCUIT_H__ #include "packet.h" /* for circuit dissector type */ +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -65,7 +66,7 @@ extern void circuit_init(void); * Given a circuit type and circuit ID for a packet, create a new circuit * to contain packets for that circuit. */ -extern circuit_t *circuit_new(circuit_type ctype, guint32 circuit_id, +WS_DLL_PUBLIC circuit_t *circuit_new(circuit_type ctype, guint32 circuit_id, guint32 first_frame); /** @@ -73,7 +74,7 @@ extern circuit_t *circuit_new(circuit_type ctype, guint32 circuit_id, * that type and ID whose range of frames includes that frame number. * Returns NULL if not found. */ -extern circuit_t *find_circuit(circuit_type ctype, guint32 circuit_id, +WS_DLL_PUBLIC circuit_t *find_circuit(circuit_type ctype, guint32 circuit_id, guint32 frame); /** @@ -82,10 +83,10 @@ extern circuit_t *find_circuit(circuit_type ctype, guint32 circuit_id, */ extern void close_circuit(circuit_t *circuit, guint32 last_frame); -extern void circuit_add_proto_data(circuit_t *conv, int proto, +WS_DLL_PUBLIC void circuit_add_proto_data(circuit_t *conv, int proto, void *proto_data); -extern void *circuit_get_proto_data(circuit_t *conv, int proto); -extern void circuit_delete_proto_data(circuit_t *conv, int proto); +WS_DLL_PUBLIC void *circuit_get_proto_data(circuit_t *conv, int proto); +void circuit_delete_proto_data(circuit_t *conv, int proto); extern void circuit_set_dissector(circuit_t *circuit, dissector_handle_t handle); diff --git a/epan/codecs.h b/epan/codecs.h index 1e1aebf65a..0d407f5205 100644 --- a/epan/codecs.h +++ b/epan/codecs.h @@ -26,6 +26,7 @@ #define _CODECS_H_ #include +#include "ws_symbol_export.h" struct codec_handle; typedef struct codec_handle *codec_handle_t; @@ -34,10 +35,10 @@ typedef void *(*codec_init_fn)(void); typedef void (*codec_release_fn)(void *context); typedef int (*codec_decode_fn)(void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes); -extern void register_codec(const char *name, codec_init_fn init_fn, codec_release_fn release_fn, codec_decode_fn decode_fn); -extern codec_handle_t find_codec(const char *name); -extern void *codec_init(codec_handle_t codec); -extern void codec_release(codec_handle_t codec, void *context); -extern int codec_decode(codec_handle_t codec, void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes); +WS_DLL_PUBLIC void register_codec(const char *name, codec_init_fn init_fn, codec_release_fn release_fn, codec_decode_fn decode_fn); +WS_DLL_PUBLIC codec_handle_t find_codec(const char *name); +WS_DLL_PUBLIC void *codec_init(codec_handle_t codec); +WS_DLL_PUBLIC void codec_release(codec_handle_t codec, void *context); +WS_DLL_PUBLIC int codec_decode(codec_handle_t codec, void *context, const void *input, int inputSizeBytes, void *output, int *outputSizeBytes); #endif diff --git a/epan/column-utils.h b/epan/column-utils.h index 073cbc12ff..2ede25f9ad 100644 --- a/epan/column-utils.h +++ b/epan/column-utils.h @@ -30,6 +30,7 @@ #include "column_info.h" #include "packet_info.h" #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -44,14 +45,14 @@ extern "C" { * * Internal, don't use this in dissectors! */ -extern void col_setup(column_info *cinfo, const gint num_cols); +WS_DLL_PUBLIC void col_setup(column_info *cinfo, const gint num_cols); /** Cleanup all the data structures for constructing column data; * undoes the alocations that col_setup() does. * * Internal, don't use this in dissectors! */ -extern void col_cleanup(column_info *cinfo); +WS_DLL_PUBLIC void col_cleanup(column_info *cinfo); /** Initialize the data structures for constructing column data. * @@ -63,13 +64,13 @@ extern void col_init(column_info *cinfo); * * Internal, don't use this in dissectors! */ -extern void col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const gint col, gboolean const fill_col_exprs); +WS_DLL_PUBLIC void col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const gint col, gboolean const fill_col_exprs); /** Fill in all columns of the given packet. * * Internal, don't use this in dissectors! */ -extern void col_fill_in(packet_info *pinfo, const gboolean fill_col_exprs, const gboolean fill_fd_colums); +WS_DLL_PUBLIC void col_fill_in(packet_info *pinfo, const gboolean fill_col_exprs, const gboolean fill_fd_colums); /** Fill in columns if we got an error reading the packet. * We set most columns to "???", and set the Info column to an error @@ -77,7 +78,7 @@ extern void col_fill_in(packet_info *pinfo, const gboolean fill_col_exprs, const * * Internal, don't use this in dissectors! */ -extern void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gboolean fill_col_exprs, const gboolean fill_fd_colums); +WS_DLL_PUBLIC void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gboolean fill_col_exprs, const gboolean fill_fd_colums); /* Utility routines used by packet*.c */ @@ -86,14 +87,14 @@ extern void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gbool * @param cinfo the current packet row * @return TRUE if it's writable, FALSE if not */ -extern gboolean col_get_writable(column_info *cinfo); +WS_DLL_PUBLIC gboolean col_get_writable(column_info *cinfo); /** Set the columns writable. * * @param cinfo the current packet row * @param writable TRUE if it's writable, FALSE if not */ -extern void col_set_writable(column_info *cinfo, const gboolean writable); +WS_DLL_PUBLIC void col_set_writable(column_info *cinfo, const gboolean writable); /** * Checks if the given column can be filled with data. @@ -104,7 +105,7 @@ extern void col_set_writable(column_info *cinfo, const gboolean writable); * @deprecated Not needed in new code the check is done in * in the column function calls. */ -extern gint check_col(column_info *cinfo, const gint col); +WS_DLL_PUBLIC gint check_col(column_info *cinfo, const gint col); /** Sets a fence for the current column content, * so this content won't be affected by further col_... function calls. @@ -115,7 +116,7 @@ extern gint check_col(column_info *cinfo, const gint col); * @param cinfo the current packet row * @param col the column to use, e.g. COL_INFO */ -extern void col_set_fence(column_info *cinfo, const gint col); +WS_DLL_PUBLIC void col_set_fence(column_info *cinfo, const gint col); /** Gets the text of a column element. * @@ -131,7 +132,7 @@ extern const gchar *col_get_text(column_info *cinfo, const gint col); * @param cinfo the current packet row * @param col the column to use, e.g. COL_INFO */ -extern void col_clear(column_info *cinfo, const gint col); +WS_DLL_PUBLIC void col_clear(column_info *cinfo, const gint col); /** Set (replace) the text of a column element, the text won't be copied. * @@ -141,7 +142,7 @@ extern void col_clear(column_info *cinfo, const gint col); * @param col the column to use, e.g. COL_INFO * @param str the string to set */ -extern void col_set_str(column_info *cinfo, const gint col, const gchar * str); +WS_DLL_PUBLIC void col_set_str(column_info *cinfo, const gint col, const gchar * str); /** Add (replace) the text of a column element, the text will be copied. * @@ -149,7 +150,7 @@ extern void col_set_str(column_info *cinfo, const gint col, const gchar * str); * @param col the column to use, e.g. COL_INFO * @param str the string to add */ -extern void col_add_str(column_info *cinfo, const gint col, const gchar *str); +WS_DLL_PUBLIC void col_add_str(column_info *cinfo, const gint col, const gchar *str); /** Add (replace) the text of a column element, the text will be formatted and copied. * @@ -160,20 +161,24 @@ extern void col_add_str(column_info *cinfo, const gint col, const gchar *str); * @param format the format string * @param ... the variable number of parameters */ -extern void col_add_fstr(column_info *cinfo, const gint col, const gchar *format, ...) +WS_DLL_PUBLIC void col_add_fstr(column_info *cinfo, const gint col, const gchar *format, ...) G_GNUC_PRINTF(3, 4); /** For internal Wireshark use only. Not to be called from dissectors. */ void col_custom_set_edt(epan_dissect_t *edt, column_info *cinfo); /** For internal Wireshark use only. Not to be called from dissectors. */ +WS_DLL_PUBLIC void col_custom_prime_edt(epan_dissect_t *edt, column_info *cinfo); /** For internal Wireshark use only. Not to be called from dissectors. */ +WS_DLL_PUBLIC gboolean have_custom_cols(column_info *cinfo); /** For internal Wireshark use only. Not to be called from dissectors. */ +WS_DLL_PUBLIC gboolean col_has_time_fmt(column_info *cinfo, const gint col); /** For internal Wireshark use only. Not to be called from dissectors. */ +WS_DLL_PUBLIC gboolean col_based_on_frame_data(column_info *cinfo, const gint col); /** Append the given text to a column element, the text will be copied. @@ -182,7 +187,7 @@ gboolean col_based_on_frame_data(column_info *cinfo, const gint col); * @param col the column to use, e.g. COL_INFO * @param str the string to append */ -extern void col_append_str(column_info *cinfo, const gint col, const gchar *str); +WS_DLL_PUBLIC void col_append_str(column_info *cinfo, const gint col, const gchar *str); /** Append the given text to a column element, the text will be formatted and copied. * @@ -193,7 +198,7 @@ extern void col_append_str(column_info *cinfo, const gint col, const gchar *str) * @param format the format string * @param ... the variable number of parameters */ -extern void col_append_fstr(column_info *cinfo, const gint col, const gchar *format, ...) +WS_DLL_PUBLIC void col_append_fstr(column_info *cinfo, const gint col, const gchar *format, ...) G_GNUC_PRINTF(3, 4); /** Prepend the given text to a column element, the text will be formatted and copied. @@ -203,7 +208,7 @@ extern void col_append_fstr(column_info *cinfo, const gint col, const gchar *for * @param format the format string * @param ... the variable number of parameters */ -extern void col_prepend_fstr(column_info *cinfo, const gint col, const gchar *format, ...) +WS_DLL_PUBLIC void col_prepend_fstr(column_info *cinfo, const gint col, const gchar *format, ...) G_GNUC_PRINTF(3, 4); /**Prepend the given text to a column element, the text will be formatted and copied. @@ -214,7 +219,7 @@ extern void col_prepend_fstr(column_info *cinfo, const gint col, const gchar *fo * there is already a fence created. This function will create a fence in case * it does not yet exist. */ -extern void col_prepend_fence_fstr(column_info *cinfo, const gint col, const gchar *format, ...) +WS_DLL_PUBLIC void col_prepend_fence_fstr(column_info *cinfo, const gint col, const gchar *format, ...) G_GNUC_PRINTF(3, 4); /** Append the given text (prepended by a separator) to a column element. @@ -226,7 +231,7 @@ extern void col_prepend_fence_fstr(column_info *cinfo, const gint col, const gch * @param sep the separator string or NULL for default: ", " * @param str the string to append */ -extern void col_append_sep_str(column_info *cinfo, const gint col, const gchar *sep, +WS_DLL_PUBLIC void col_append_sep_str(column_info *cinfo, const gint col, const gchar *sep, const gchar *str); /** Append the given text (prepended by a separator) to a column element. @@ -239,7 +244,7 @@ extern void col_append_sep_str(column_info *cinfo, const gint col, const gchar * * @param format the format string * @param ... the variable number of parameters */ -extern void col_append_sep_fstr(column_info *cinfo, const gint col, const gchar *sep, +WS_DLL_PUBLIC void col_append_sep_fstr(column_info *cinfo, const gint col, const gchar *sep, const gchar *format, ...) G_GNUC_PRINTF(4, 5); @@ -254,10 +259,10 @@ extern void col_append_sep_fstr(column_info *cinfo, const gint col, const gchar * @param fieldname the fieldname to use for creating a filter (when * applying/preparing/copying as filter) */ -extern void col_set_time(column_info *cinfo, const int col, +WS_DLL_PUBLIC void col_set_time(column_info *cinfo, const int col, const nstime_t *ts, const char *fieldname); -extern void set_fd_time(frame_data *fd, gchar *buf); +WS_DLL_PUBLIC void set_fd_time(frame_data *fd, gchar *buf); #ifdef __cplusplus } diff --git a/epan/column.h b/epan/column.h index 3e91154af7..eb0822cfb0 100644 --- a/epan/column.h +++ b/epan/column.h @@ -25,6 +25,8 @@ #ifndef __COLUMN_H__ #define __COLUMN_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -38,26 +40,46 @@ typedef struct _fmt_data { gboolean resolved; /* if TRUE, show a more human-readable name */ } fmt_data; +WS_DLL_PUBLIC const gchar *col_format_to_string(const gint); +WS_DLL_PUBLIC const gchar *col_format_desc(const gint); +WS_DLL_PUBLIC gint get_column_format(const gint); +WS_DLL_PUBLIC void set_column_format(const gint, const gint); +WS_DLL_PUBLIC void get_column_format_matches(gboolean *, const gint); +WS_DLL_PUBLIC gint get_column_format_from_str(const gchar *); +WS_DLL_PUBLIC gchar *get_column_title(const gint); +WS_DLL_PUBLIC void set_column_title(const gint, const gchar *); +WS_DLL_PUBLIC gboolean get_column_visible(const gint); +WS_DLL_PUBLIC void set_column_visible(const gint, gboolean); +WS_DLL_PUBLIC gboolean get_column_resolved(const gint); +WS_DLL_PUBLIC void set_column_resolved(const gint, gboolean); +WS_DLL_PUBLIC const gchar *get_column_custom_field(const gint); +WS_DLL_PUBLIC void set_column_custom_field(const gint, const char *); +WS_DLL_PUBLIC gint get_column_custom_occurrence(const gint); +WS_DLL_PUBLIC void set_column_custom_occurrence(const gint, const gint); +WS_DLL_PUBLIC const gchar *get_column_width_string(const gint, const gint); +WS_DLL_PUBLIC const char *get_column_longest_string(const gint); +WS_DLL_PUBLIC gint get_column_char_width(const gint format); +WS_DLL_PUBLIC void build_column_format_array(column_info *cinfo, const gint num_cols, const gboolean reset_fences); diff --git a/epan/conversation.h b/epan/conversation.h index eb6fd3c822..3a019c6be8 100644 --- a/epan/conversation.h +++ b/epan/conversation.h @@ -25,6 +25,8 @@ #ifndef __CONVERSATION_H__ #define __CONVERSATION_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -102,7 +104,7 @@ extern void conversation_init(void); * and/or port 2 value are not given and any value is acceptable * when searching for this conversation. */ -extern conversation_t *conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2, +WS_DLL_PUBLIC conversation_t *conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2, const port_type ptype, const guint32 port1, const guint32 port2, const guint options); /** @@ -141,7 +143,7 @@ extern conversation_t *conversation_new(const guint32 setup_frame, const address * * otherwise, we found no matching conversation, and return NULL. */ -extern conversation_t *find_conversation(const guint32 frame_num, const address *addr_a, const address *addr_b, +WS_DLL_PUBLIC conversation_t *find_conversation(const guint32 frame_num, const address *addr_a, const address *addr_b, const port_type ptype, const guint32 port_a, const guint32 port_b, const guint options); /** A helper function that calls find_conversation() and, if a conversation is @@ -150,14 +152,14 @@ extern conversation_t *find_conversation(const guint32 frame_num, const address * No options are used, though we could extend this API to include an options * parameter. */ -extern conversation_t *find_or_create_conversation(packet_info *pinfo); +WS_DLL_PUBLIC conversation_t *find_or_create_conversation(packet_info *pinfo); -extern void conversation_add_proto_data(conversation_t *conv, const int proto, +WS_DLL_PUBLIC void conversation_add_proto_data(conversation_t *conv, const int proto, void *proto_data); -extern void *conversation_get_proto_data(const conversation_t *conv, const int proto); -extern void conversation_delete_proto_data(conversation_t *conv, const int proto); +WS_DLL_PUBLIC void *conversation_get_proto_data(const conversation_t *conv, const int proto); +WS_DLL_PUBLIC void conversation_delete_proto_data(conversation_t *conv, const int proto); -extern void conversation_set_dissector(conversation_t *conversation, +WS_DLL_PUBLIC void conversation_set_dissector(conversation_t *conversation, const dissector_handle_t handle); /** * Given two address/port pairs for a packet, search for a matching diff --git a/epan/crc16-tvb.c b/epan/crc16-tvb.c index ee77803a31..762771dc38 100644 --- a/epan/crc16-tvb.c +++ b/epan/crc16-tvb.c @@ -36,6 +36,7 @@ #include #include #include +#include #include diff --git a/epan/crc16-tvb.h b/epan/crc16-tvb.h index bad28217e3..ef433aca88 100644 --- a/epan/crc16-tvb.h +++ b/epan/crc16-tvb.h @@ -27,6 +27,8 @@ #ifndef __CRC16_TVB_H__ #define __CRC16_TVB_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -35,20 +37,20 @@ extern "C" { @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC16 CCITT checksum. */ -extern guint16 crc16_ccitt_tvb(tvbuff_t *tvb, guint len); +WS_DLL_PUBLIC guint16 crc16_ccitt_tvb(tvbuff_t *tvb, guint len); /** Compute CRC16 X.25 CCITT checksum of a tv buffer. @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC16 X.25 CCITT checksum. */ -extern guint16 crc16_x25_ccitt_tvb(tvbuff_t *tvb, guint len); +WS_DLL_PUBLIC guint16 crc16_x25_ccitt_tvb(tvbuff_t *tvb, guint len); /** Compute CRC16 CCITT checksum of a tv buffer. @param tvb The tv buffer containing the data. @param offset The offset into the tv buffer. @param len The number of bytes to include in the computation. @return The CRC16 CCITT checksum. */ -extern guint16 crc16_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); +WS_DLL_PUBLIC guint16 crc16_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); /** Compute CRC16 CCITT checksum of a tv buffer. If computing the * checksum over multiple tv buffers and you want to feed the partial CRC16 @@ -57,7 +59,7 @@ extern guint16 crc16_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC16 CCITT checksum (using the given seed). */ -extern guint16 crc16_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint16 seed); +WS_DLL_PUBLIC guint16 crc16_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint16 seed); /** Compute CRC16 CCITT checksum of a tv buffer. If computing the * checksum over multiple tv buffers and you want to feed the partial CRC16 @@ -67,7 +69,7 @@ extern guint16 crc16_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint16 seed); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC16 CCITT checksum (using the given seed). */ -extern guint16 crc16_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, +WS_DLL_PUBLIC guint16 crc16_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint16 seed); /** Compute the "plain" CRC16 checksum of a tv buffer using the following @@ -84,7 +86,7 @@ extern guint16 crc16_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, @param offset The offset into the tv buffer. @param len The number of bytes to include in the computation. @return The CRC16 checksum. */ -extern guint16 crc16_plain_tvb_offset(tvbuff_t *tvb, guint offset, guint len); +WS_DLL_PUBLIC guint16 crc16_plain_tvb_offset(tvbuff_t *tvb, guint offset, guint len); /** Compute the "plain" CRC16 checksum of a tv buffer using the following * parameters: @@ -101,7 +103,7 @@ extern guint16 crc16_plain_tvb_offset(tvbuff_t *tvb, guint offset, guint len); @param len The number of bytes to include in the computation. @param crc Starting CRC value @return The CRC16 checksum. */ -extern guint16 crc16_plain_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint16 crc); +WS_DLL_PUBLIC guint16 crc16_plain_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint16 crc); #ifdef __cplusplus } diff --git a/epan/crc32-tvb.c b/epan/crc32-tvb.c index ce7bd79b21..40c41715d9 100644 --- a/epan/crc32-tvb.c +++ b/epan/crc32-tvb.c @@ -32,6 +32,7 @@ #include #include #include +#include guint32 diff --git a/epan/crc32-tvb.h b/epan/crc32-tvb.h index dcb9ebf515..7496f8b34a 100644 --- a/epan/crc32-tvb.h +++ b/epan/crc32-tvb.h @@ -25,6 +25,8 @@ #ifndef __CRC32_TVB_H__ #define __CRC32_TVB_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -33,14 +35,14 @@ extern "C" { @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC32 CCITT checksum. */ -extern guint32 crc32_ccitt_tvb(tvbuff_t *tvb, guint len); +WS_DLL_PUBLIC guint32 crc32_ccitt_tvb(tvbuff_t *tvb, guint len); /** Compute CRC32 CCITT checksum of a tv buffer. @param tvb The tv buffer containing the data. @param offset The offset into the tv buffer. @param len The number of bytes to include in the computation. @return The CRC32 CCITT checksum. */ -extern guint32 crc32_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); +WS_DLL_PUBLIC guint32 crc32_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); /** Compute CRC32 CCITT checksum of a tv buffer. If computing the * checksum over multiple tv buffers and you want to feed the partial CRC32 @@ -49,7 +51,7 @@ extern guint32 crc32_ccitt_tvb_offset(tvbuff_t *tvb, guint offset, guint len); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 CCITT checksum (using the given seed). */ -extern guint32 crc32_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); +WS_DLL_PUBLIC guint32 crc32_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); /** Compute CRC32 CCITT checksum of a tv buffer. If computing the * checksum over multiple tv buffers and you want to feed the partial CRC32 @@ -59,35 +61,35 @@ extern guint32 crc32_ccitt_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 CCITT checksum (using the given seed). */ -extern guint32 crc32_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, +WS_DLL_PUBLIC guint32 crc32_ccitt_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint32 seed); /** Compute IEEE 802.x CRC32 checksum of a tv buffer. @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @return The IEEE 802.x CRC32 checksum. */ -extern guint32 crc32_802_tvb(tvbuff_t *tvb, guint len); +WS_DLL_PUBLIC guint32 crc32_802_tvb(tvbuff_t *tvb, guint len); /** Compute MPEG-2 CRC32 checksum of a tv buffer. @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @return The MPEG-2 CRC32 checksum. */ -extern guint32 crc32_mpeg2_tvb(tvbuff_t *tvb, guint len); +WS_DLL_PUBLIC guint32 crc32_mpeg2_tvb(tvbuff_t *tvb, guint len); /** Compute MPEG-2 CRC32 checksum of a tv buffer. @param tvb The tv buffer containing the data. @param offset The offset into the tv buffer. @param len The number of bytes to include in the computation. @return The MPEG-2 CRC32 checksum. */ -extern guint32 crc32_mpeg2_tvb_offset(tvbuff_t *tvb, guint offset, guint len); +WS_DLL_PUBLIC guint32 crc32_mpeg2_tvb_offset(tvbuff_t *tvb, guint offset, guint len); /** Compute MPEG-2 CRC32 checksum of a buffer of data. @param tvb The tv buffer containing the data. @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 MPEG-2 checksum (using the given seed). */ -extern guint32 crc32_mpeg2_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); +WS_DLL_PUBLIC guint32 crc32_mpeg2_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); /** Compute MPEG-2 CRC32 checksum of a buffer of data. @param tvb The tv buffer containing the data. @@ -95,7 +97,7 @@ extern guint32 crc32_mpeg2_tvb_seed(tvbuff_t *tvb, guint len, guint32 seed); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 MPEG-2 checksum (using the given seed). */ -extern guint32 crc32_mpeg2_tvb_offset_seed(tvbuff_t *tvb, guint offset, +WS_DLL_PUBLIC guint32 crc32_mpeg2_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint32 seed); #ifdef __cplusplus } diff --git a/epan/crypt/Makefile.nmake b/epan/crypt/Makefile.nmake index 5af7c4cb79..550d57e2b4 100644 --- a/epan/crypt/Makefile.nmake +++ b/epan/crypt/Makefile.nmake @@ -10,7 +10,7 @@ include Makefile.common CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I../.. $(GLIB_CFLAGS) $(GNUTLS_CFLAGS) \ - $(LIBGCRYPT_CFLAGS) + $(LIBGCRYPT_CFLAGS) -DWS_BUILD_DLL .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/epan/crypt/airpdcap_system.h b/epan/crypt/airpdcap_system.h index 69ec762f4c..7833f51909 100644 --- a/epan/crypt/airpdcap_system.h +++ b/epan/crypt/airpdcap_system.h @@ -42,6 +42,7 @@ #include "airpdcap_interop.h" #include "airpdcap_user.h" +#include "ws_symbol_export.h" /************************************************************************/ /* Constant definitions */ @@ -316,6 +317,7 @@ INT AirPDcapSetLastSSID( * This function is not thread-safe when used in parallel with context * management functions and the packet process function on the same context. */ +WS_DLL_PUBLIC INT AirPDcapInitContext( PAIRPDCAP_CONTEXT ctx) ; @@ -332,6 +334,7 @@ INT AirPDcapInitContext( * management functions and the packet process function on the same * context. */ +WS_DLL_PUBLIC INT AirPDcapDestroyContext( PAIRPDCAP_CONTEXT ctx) ; diff --git a/epan/crypt/airpdcap_user.h b/epan/crypt/airpdcap_user.h index 1b4836ea80..fa7ec714cb 100644 --- a/epan/crypt/airpdcap_user.h +++ b/epan/crypt/airpdcap_user.h @@ -41,6 +41,8 @@ /* File includes */ /* */ #include "airpdcap_interop.h" +#include "ws_symbol_export.h" + /* */ /* */ /******************************************************************************/ @@ -216,6 +218,7 @@ typedef struct _AIRPDCAP_KEYS_COLLECTION { * success, or NULL on failure. * @see get_key_string() */ +WS_DLL_PUBLIC decryption_key_t* parse_key_string(gchar* key_string, guint8 key_type); @@ -226,6 +229,7 @@ parse_key_string(gchar* key_string, guint8 key_type); * @return A g_malloc()ed string representation of the key * @see parse_key_string() */ +WS_DLL_PUBLIC gchar* get_key_string(decryption_key_t* dk); diff --git a/epan/crypt/airpdcap_ws.h b/epan/crypt/airpdcap_ws.h index 66123524a4..7382104e31 100644 --- a/epan/crypt/airpdcap_ws.h +++ b/epan/crypt/airpdcap_ws.h @@ -38,12 +38,13 @@ #define _AIRPDCAP_WS_H #include "airpdcap_system.h" +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -WS_VAR_IMPORT AIRPDCAP_CONTEXT airpdcap_ctx; +WS_DLL_PUBLIC AIRPDCAP_CONTEXT airpdcap_ctx; #ifdef __cplusplus } diff --git a/epan/crypt/md5.h b/epan/crypt/md5.h index 96cee70a65..8aadf0a72a 100644 --- a/epan/crypt/md5.h +++ b/epan/crypt/md5.h @@ -25,6 +25,8 @@ #ifndef __MD5_H__ /**@todo Should this be _CRYPT_MD5_H__ ?*/ #define __MD5_H__ +#include "ws_symbol_export.h" + /** * @file md5.h * @brief MD5 Functions @@ -49,6 +51,7 @@ typedef struct md5_state_s /** Initialize the algorithm. * @param pms MD5 context. */ +WS_DLL_PUBLIC void md5_init(md5_state_t *pms); /** Append a string to the message. @@ -56,6 +59,7 @@ void md5_init(md5_state_t *pms); * @param data Data. * @param nbytes Length of data. */ +WS_DLL_PUBLIC void md5_append( md5_state_t *pms, const guint8 *data, size_t nbytes); @@ -63,6 +67,7 @@ void md5_append( md5_state_t *pms, * @param pms MD5 context. * @param digest 16 byte digest. */ +WS_DLL_PUBLIC void md5_finish(md5_state_t *pms, guint8 digest[16]); typedef struct md5_hmac_state_s @@ -79,6 +84,7 @@ void md5_hmac_append(md5_hmac_state_t *hctx, void md5_hmac_finish(md5_hmac_state_t *hctx, guint8 digest[16]); +WS_DLL_PUBLIC void md5_hmac(const guint8* text, size_t text_len, const guint8* key, size_t key_len, guint8 digest[16]); diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake index 3ad6e5aa49..f3028c354a 100644 --- a/epan/dfilter/Makefile.nmake +++ b/epan/dfilter/Makefile.nmake @@ -17,7 +17,7 @@ GENERATED_CFLAGS=\ /I$(LEMON) \ /I$(PCAP_DIR)\include -CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) +CFLAGS=$(WARNINGS_ARE_ERRORS) $(GENERATED_CFLAGS) -DWS_BUILD_DLL .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/epan/dfilter/dfilter-macro.h b/epan/dfilter/dfilter-macro.h index 9b03c46bdc..9e1700d336 100644 --- a/epan/dfilter/dfilter-macro.h +++ b/epan/dfilter/dfilter-macro.h @@ -24,6 +24,9 @@ #ifndef _DFILTER_MACRO_H #define _DFILTER_MACRO_H +#include "ws_symbol_export.h" + + #define DFILTER_MACRO_FILENAME "dfilter_macros" @@ -39,6 +42,7 @@ typedef struct _dfilter_macro_t { /* loop over the macros list */ typedef void (*dfilter_macro_cb_t)(dfilter_macro_t*, void*); +WS_DLL_PUBLIC void dfilter_macro_foreach(dfilter_macro_cb_t, void*); /* save dfilter macros to a file */ @@ -52,8 +56,10 @@ const gchar* dfilter_macro_apply(const gchar* text, const gchar** error); void dfilter_macro_init(void); +WS_DLL_PUBLIC void dfilter_macro_get_uat(void**); +WS_DLL_PUBLIC void dfilter_macro_build_ftv_cache(void* tree_root); #endif /* _DFILTER_MACRO_H */ diff --git a/epan/dfilter/dfilter.h b/epan/dfilter/dfilter.h index cb150a7dff..034740c268 100644 --- a/epan/dfilter/dfilter.h +++ b/epan/dfilter/dfilter.h @@ -24,6 +24,7 @@ #define DFILTER_H #include +#include "ws_symbol_export.h" /* Passed back to user */ typedef struct _dfilter_t dfilter_t; @@ -57,11 +58,13 @@ dfilter_cleanup(void); * * Returns TRUE on success, FALSE on failure. */ +WS_DLL_PUBLIC gboolean dfilter_compile(const gchar *text, dfilter_t **dfp); /* Frees all memory used by dfilter, and frees * the dfilter itself. */ +WS_DLL_PUBLIC void dfilter_free(dfilter_t *df); @@ -71,10 +74,11 @@ dfilter_free(dfilter_t *df); * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const gchar *dfilter_error_msg; +WS_DLL_PUBLIC const gchar *dfilter_error_msg; /* Apply compiled dfilter */ +WS_DLL_PUBLIC gboolean dfilter_apply_edt(dfilter_t *df, epan_dissect_t* edt); @@ -86,10 +90,12 @@ dfilter_apply(dfilter_t *df, proto_tree *tree); void dfilter_prime_proto_tree(const dfilter_t *df, proto_tree *tree); +WS_DLL_PUBLIC GPtrArray * dfilter_deprecated_tokens(dfilter_t *df); /* Print bytecode of dfilter to stdout */ +WS_DLL_PUBLIC void dfilter_dump(dfilter_t *df); diff --git a/epan/dfilter/drange.h b/epan/dfilter/drange.h index 42ea014074..19a260ae75 100644 --- a/epan/dfilter/drange.h +++ b/epan/dfilter/drange.h @@ -27,6 +27,7 @@ #define __DRANGE_H__ #include +#include "ws_symbol_export.h" /* Please don't directly manipulate these structs. Please use * the methods provided. If you REALLY can't do what you need to diff --git a/epan/dissector_filters.h b/epan/dissector_filters.h index 242b2e6792..6f383888bc 100644 --- a/epan/dissector_filters.h +++ b/epan/dissector_filters.h @@ -25,6 +25,7 @@ #ifndef __DISSECTOR_FILTERS_H__ #define __DISSECTOR_FILTERS_H__ +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -41,7 +42,7 @@ typedef const gchar* (*build_filter_string_func)(packet_info *pinfo); /** register a dissector filter */ -extern void register_dissector_filter(const char *name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string); +WS_DLL_PUBLIC void register_dissector_filter(const char *name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string); @@ -53,7 +54,7 @@ typedef struct dissector_filter_s { build_filter_string_func build_filter_string; } dissector_filter_t; -WS_VAR_IMPORT GList *dissector_filter_list; +WS_DLL_PUBLIC GList *dissector_filter_list; #ifdef __cplusplus } diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake index e40f3c6147..66866c3a47 100644 --- a/epan/dissectors/Makefile.nmake +++ b/epan/dissectors/Makefile.nmake @@ -11,7 +11,7 @@ include Makefile.common CFLAGS= $(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I. /I.. /I../.. $(GLIB_CFLAGS) \ - $(ZLIB_CFLAGS) \ + $(ZLIB_CFLAGS) -DWS_BUILD_DLL\ $(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \ $(KFW_CFLAGS) $(AIRPCAP_CFLAGS) $(GEOIP_CFLAGS) \ /I$(PCAP_DIR)\include diff --git a/epan/dissectors/packet-afp.h b/epan/dissectors/packet-afp.h index fa51523656..2b9380e41f 100644 --- a/epan/dissectors/packet-afp.h +++ b/epan/dissectors/packet-afp.h @@ -125,7 +125,7 @@ struct aspinfo { /* * value_string table for AFP command codes. */ -WS_VAR_IMPORT value_string_ext CommandCode_vals_ext; +WS_DLL_PUBLIC value_string_ext CommandCode_vals_ext; /* * Value from table matching requests and responses; also passed to AFP diff --git a/epan/dissectors/packet-ansi_a.h b/epan/dissectors/packet-ansi_a.h index 16dd49cbbb..878790e0e6 100644 --- a/epan/dissectors/packet-ansi_a.h +++ b/epan/dissectors/packet-ansi_a.h @@ -46,12 +46,12 @@ ext_value_string_t; * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const ext_value_string_t *ansi_a_bsmap_strings; -WS_VAR_IMPORT const ext_value_string_t *ansi_a_dtap_strings; -WS_VAR_IMPORT const ext_value_string_t ansi_a_ios501_bsmap_strings[]; -WS_VAR_IMPORT const ext_value_string_t ansi_a_ios501_dtap_strings[]; -WS_VAR_IMPORT const ext_value_string_t ansi_a_ios401_bsmap_strings[]; -WS_VAR_IMPORT const ext_value_string_t ansi_a_ios401_dtap_strings[]; +WS_DLL_PUBLIC const ext_value_string_t *ansi_a_bsmap_strings; +WS_DLL_PUBLIC const ext_value_string_t *ansi_a_dtap_strings; +WS_DLL_PUBLIC const ext_value_string_t ansi_a_ios501_bsmap_strings[]; +WS_DLL_PUBLIC const ext_value_string_t ansi_a_ios501_dtap_strings[]; +WS_DLL_PUBLIC const ext_value_string_t ansi_a_ios401_bsmap_strings[]; +WS_DLL_PUBLIC const ext_value_string_t ansi_a_ios401_dtap_strings[]; #define A_VARIANT_IS634 4 #define A_VARIANT_TSB80 5 @@ -61,13 +61,13 @@ WS_VAR_IMPORT const ext_value_string_t ansi_a_ios401_dtap_strings[]; #define A_VARIANT_IOS401 9 #define A_VARIANT_IOS501 10 -WS_VAR_IMPORT gint a_global_variant; +WS_DLL_PUBLIC gint a_global_variant; /* * allows ANSI MAP to use this for IS-880 enhancements * based on the 'ansi_a_ios401_elem_1_strings/ansi_a_ios501_elem_1_strings' */ -WS_VAR_IMPORT const ext_value_string_t *ansi_a_elem_1_strings; +WS_DLL_PUBLIC const ext_value_string_t *ansi_a_elem_1_strings; /* * maximum number of strings that are allowed diff --git a/epan/dissectors/packet-ansi_map.h b/epan/dissectors/packet-ansi_map.h index b88d7c2cd9..2f579787c0 100644 --- a/epan/dissectors/packet-ansi_map.h +++ b/epan/dissectors/packet-ansi_map.h @@ -34,6 +34,8 @@ #ifndef PACKET_ANSI_MAP_H #define PACKET_ANSI_MAP_H +#include "ws_symbol_export.h" + #define ANSI_MAP_MAX_NUM_MESSAGE_TYPES 256 typedef struct _ansi_map_tap_rec_t { @@ -47,7 +49,7 @@ typedef struct _ansi_map_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const value_string ansi_map_opr_code_strings[]; +WS_DLL_PUBLIC const value_string ansi_map_opr_code_strings[]; diff --git a/epan/dissectors/packet-ap1394.h b/epan/dissectors/packet-ap1394.h index 98c1c76918..f1fa40b3fc 100644 --- a/epan/dissectors/packet-ap1394.h +++ b/epan/dissectors/packet-ap1394.h @@ -24,6 +24,9 @@ #ifndef __PACKET_AP1394_H__ #define __PACKET_AP1394_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ap1394(const guchar *, int, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-arcnet.h b/epan/dissectors/packet-arcnet.h index 691c525798..3dadd4fcbb 100644 --- a/epan/dissectors/packet-arcnet.h +++ b/epan/dissectors/packet-arcnet.h @@ -24,6 +24,9 @@ #ifndef __PACKET_ARCNET_H__ #define __PACKET_ARCNET_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_arcnet (const guchar *, int, packet_counts *, gboolean, gboolean); #endif diff --git a/epan/dissectors/packet-atalk.h b/epan/dissectors/packet-atalk.h index be354bdfe9..45a9f7923c 100644 --- a/epan/dissectors/packet-atalk.h +++ b/epan/dissectors/packet-atalk.h @@ -21,6 +21,8 @@ #ifndef __PACKET_ATALK_H__ #define __PACKET_ATALK_H__ -extern void capture_llap(packet_counts *ld); +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_llap(packet_counts *ld); #endif diff --git a/epan/dissectors/packet-atm.h b/epan/dissectors/packet-atm.h index 754fa01f06..ac8c859119 100644 --- a/epan/dissectors/packet-atm.h +++ b/epan/dissectors/packet-atm.h @@ -24,6 +24,9 @@ #ifndef __PACKET_ATM_H__ #define __PACKET_ATM_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_atm(const union wtap_pseudo_header *, const guchar *, int, packet_counts *); diff --git a/epan/dissectors/packet-ax25-kiss.h b/epan/dissectors/packet-ax25-kiss.h index ea7d87a68b..c98df2918e 100644 --- a/epan/dissectors/packet-ax25-kiss.h +++ b/epan/dissectors/packet-ax25-kiss.h @@ -27,6 +27,9 @@ #ifndef __PACKET_AX25_KISS_H__ #define __PACKET_AX25_KISS_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ax25_kiss(const guchar *, int, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-ax25.h b/epan/dissectors/packet-ax25.h index c1876dd38b..044eb8b277 100644 --- a/epan/dissectors/packet-ax25.h +++ b/epan/dissectors/packet-ax25.h @@ -27,6 +27,9 @@ #ifndef __PACKET_AX25_H__ #define __PACKET_AX25_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ax25(const guchar *, int, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-ber.h b/epan/dissectors/packet-ber.h index c1f3823c72..28c50228e9 100644 --- a/epan/dissectors/packet-ber.h +++ b/epan/dissectors/packet-ber.h @@ -29,6 +29,7 @@ #include #include #include +#include "ws_symbol_export.h" #define BER_NOT_DECODED_YET(x) \ proto_tree_add_text(tree, tvb, offset, 0, "something unknown here [%s]",x); \ @@ -99,35 +100,35 @@ typedef int (*ber_old_type_fn)(gboolean, tvbuff_t*, int, asn1_ctx_t *actx, proto /* this function dissects the identifier octer of the BER TLV. * We only handle TAGs (and LENGTHs) that fit inside 32 bit integers. */ -extern int get_ber_identifier(tvbuff_t *tvb, int offset, gint8 *ber_class, gboolean *pc, gint32 *tag); -extern int dissect_ber_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, gint8 *ber_class, gboolean *pc, gint32 *tag); -extern int dissect_unknown_ber(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree); +WS_DLL_PUBLIC int get_ber_identifier(tvbuff_t *tvb, int offset, gint8 *ber_class, gboolean *pc, gint32 *tag); +WS_DLL_PUBLIC int dissect_ber_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, gint8 *ber_class, gboolean *pc, gint32 *tag); +WS_DLL_PUBLIC int dissect_unknown_ber(packet_info *pinfo, tvbuff_t *tvb, int offset, proto_tree *tree); /* this function dissects the identifier octer of the BER TLV. * We only handle (TAGs and) LENGTHs that fit inside 32 bit integers. */ -extern int get_ber_length(tvbuff_t *tvb, int offset, guint32 *length, gboolean *ind); -extern int dissect_ber_length(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint32 *length, gboolean *ind); +WS_DLL_PUBLIC int get_ber_length(tvbuff_t *tvb, int offset, guint32 *length, gboolean *ind); +WS_DLL_PUBLIC int dissect_ber_length(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint32 *length, gboolean *ind); -extern int dissect_ber_tagged_type(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gint8 tag_cls, gint32 tag_tag, gboolean tag_impl, ber_type_fn type); +WS_DLL_PUBLIC int dissect_ber_tagged_type(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gint8 tag_cls, gint32 tag_tag, gboolean tag_impl, ber_type_fn type); extern int dissect_ber_constrained_octet_string(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, gint hf_id, tvbuff_t **out_tvb); -extern int dissect_ber_octet_string(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **out_tvb); +WS_DLL_PUBLIC int dissect_ber_octet_string(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **out_tvb); extern int dissect_ber_octet_string_wcb(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, ber_callback func); extern int dissect_ber_old_octet_string_wcb(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, ber_old_callback func); -extern int dissect_ber_integer64(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gint64 *value); +WS_DLL_PUBLIC int dissect_ber_integer64(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gint64 *value); extern int dissect_ber_constrained_integer64(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint64 min_len, gint64 max_len, gint hf_id, gint64 *value); -extern int dissect_ber_integer(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, guint32 *value); +WS_DLL_PUBLIC int dissect_ber_integer(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, guint32 *value); extern int dissect_ber_constrained_integer(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, gint hf_id, guint32 *value); -extern int dissect_ber_null(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); +WS_DLL_PUBLIC int dissect_ber_null(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); -extern int dissect_ber_boolean(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gboolean *value); +WS_DLL_PUBLIC int dissect_ber_boolean(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, gboolean *value); extern int dissect_ber_real(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, double *value); extern int dissect_ber_external_type(gboolean implicit_tag, proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, gint hf_id, ber_callback func); -extern int dissect_ber_EmbeddedPDV_Type(gboolean implicit_tag, proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, gint hf_id, ber_callback func); +WS_DLL_PUBLIC int dissect_ber_EmbeddedPDV_Type(gboolean implicit_tag, proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, gint hf_id, ber_callback func); #define BER_FLAGS_OPTIONAL 0x00000001 #define BER_FLAGS_IMPLTAG 0x00000002 @@ -150,11 +151,11 @@ typedef struct _ber_old_sequence_t { /* * This function dissects a BER sequence */ -extern int dissect_ber_sequence(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); -extern int dissect_ber_set(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_sequence(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_set(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); /* To be removed when the transition to the "New" type is complete */ -extern int dissect_ber_old_sequence(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_old_sequence(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); extern int dissect_ber_old_set(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); @@ -177,39 +178,39 @@ typedef struct _ber_old_choice_t { /* * This function dissects a BER choice */ -extern int dissect_ber_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); +WS_DLL_PUBLIC int dissect_ber_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); /* To be removed when the transition to the "New" type is complete */ -extern int dissect_ber_old_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); +WS_DLL_PUBLIC int dissect_ber_old_choice(asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_choice_t *ch, gint hf_id, gint ett_id, gint *branch_taken); /* * This function dissects a BER strings */ extern int dissect_ber_constrained_restricted_string(gboolean implicit_tag, gint32 type, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, gint hf_id, tvbuff_t **out_tvb); -extern int dissect_ber_restricted_string(gboolean implicit_tag, gint32 type, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **out_tvb); +WS_DLL_PUBLIC int dissect_ber_restricted_string(gboolean implicit_tag, gint32 type, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **out_tvb); extern int dissect_ber_GeneralString(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, char *name_string, guint name_len); /* this function dissects a BER Object Identifier */ -extern int dissect_ber_object_identifier(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **value_tvb); -extern int dissect_ber_object_identifier_str(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, const char **value_stringx); +WS_DLL_PUBLIC int dissect_ber_object_identifier(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, tvbuff_t **value_tvb); +WS_DLL_PUBLIC int dissect_ber_object_identifier_str(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id, const char **value_stringx); /* this function dissects a BER sequence of */ extern int dissect_ber_constrained_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, const ber_sequence_t *seq, gint hf_id, gint ett_id); -extern int dissect_ber_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); extern int dissect_ber_constrained_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, const ber_sequence_t *seq, gint hf_id, gint ett_id); -extern int dissect_ber_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_sequence_t *seq, gint hf_id, gint ett_id); /* To be removed when the transition to the "New" type is complete */ -extern int dissect_ber_old_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); +WS_DLL_PUBLIC int dissect_ber_old_sequence_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); extern int dissect_ber_old_set_of(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const ber_old_sequence_t *seq, gint hf_id, gint ett_id); -extern int dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); +WS_DLL_PUBLIC int dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); -extern int dissect_ber_UTCTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); +WS_DLL_PUBLIC int dissect_ber_UTCTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset, gint hf_id); typedef struct _asn_namedbit { guint32 bit; @@ -222,21 +223,30 @@ typedef struct _asn_namedbit { /* this function dissects a BER BIT-STRING */ extern int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, gint32 min_len, gint32 max_len, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb); -extern int dissect_ber_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb); +WS_DLL_PUBLIC int dissect_ber_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, const asn_namedbit *named_bits, gint hf_id, gint ett_id, tvbuff_t **out_tvb); extern int dissect_ber_bitstring32(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *parent_tree, tvbuff_t *tvb, int offset, int **bit_fields, gint hf_id, gint ett_id, tvbuff_t **out_tvb); +WS_DLL_PUBLIC int call_ber_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree); +WS_DLL_PUBLIC void register_ber_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto, const char *name); +WS_DLL_PUBLIC void register_ber_oid_dissector(const char *oid, dissector_t dissector, int proto, const char *name); +WS_DLL_PUBLIC void register_ber_syntax_dissector(const char *oid, int proto, dissector_t dissector); void register_ber_oid_name(const char *oid, const char *name); +WS_DLL_PUBLIC void register_ber_oid_syntax(const char *oid, const char *name, const char *syntax); void dissect_ber_oid_NULL_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); +WS_DLL_PUBLIC void ber_decode_as_foreach(GHFunc func, gpointer user_data); /* iterate through known syntaxes */ +WS_DLL_PUBLIC void ber_decode_as(const gchar *syntax); /* decode the current capture as this syntax */ +WS_DLL_PUBLIC void ber_set_filename(gchar *filename); /* name of current BER-encoded file */ +WS_DLL_PUBLIC gboolean oid_has_dissector(const char *oid); #endif /* __PACKET_BER_H__ */ diff --git a/epan/dissectors/packet-bssgp.h b/epan/dissectors/packet-bssgp.h index 64c3750246..cb9be9a529 100644 --- a/epan/dissectors/packet-bssgp.h +++ b/epan/dissectors/packet-bssgp.h @@ -27,8 +27,9 @@ #ifndef __PACKET_BSSGP_H__ #define __PACKET_BSSGP_H__ +#include "ws_symbol_export.h" -WS_VAR_IMPORT value_string_ext bssgp_cause_vals_ext; +WS_DLL_PUBLIC value_string_ext bssgp_cause_vals_ext; void bssgp_suspend_ack(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len); guint16 de_bssgp_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); diff --git a/epan/dissectors/packet-camel.h b/epan/dissectors/packet-camel.h index ccd02e6d30..4997722871 100644 --- a/epan/dissectors/packet-camel.h +++ b/epan/dissectors/packet-camel.h @@ -42,6 +42,8 @@ #ifndef PACKET_CAMEL_H #define PACKET_CAMEL_H +#include "ws_symbol_export.h" + void proto_reg_handoff_camel(void); void proto_register_camel(void); @@ -49,7 +51,7 @@ void proto_register_camel(void); #define camel_MAX_NUM_OPR_CODES 256 -WS_VAR_IMPORT const value_string camel_opr_code_strings[]; +WS_DLL_PUBLIC const value_string camel_opr_code_strings[]; /* #include "packet-camel-exp.h"*/ #endif /* PACKET_camel_H */ diff --git a/epan/dissectors/packet-chdlc.h b/epan/dissectors/packet-chdlc.h index c77a587ca5..92f9e2dfea 100644 --- a/epan/dissectors/packet-chdlc.h +++ b/epan/dissectors/packet-chdlc.h @@ -33,6 +33,9 @@ #define CHDLC_ADDR_UNICAST 0x0f #define CHDLC_ADDR_MULTICAST 0x8f +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_chdlc(const guchar *, int, int, packet_counts *); extern const value_string chdlc_vals[]; diff --git a/epan/dissectors/packet-clip.h b/epan/dissectors/packet-clip.h index 47995c2884..4d03eeef35 100644 --- a/epan/dissectors/packet-clip.h +++ b/epan/dissectors/packet-clip.h @@ -24,6 +24,9 @@ #ifndef __PACKET_CLIP_H__ #define __PACKET_CLIP_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_clip(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-dap.h b/epan/dissectors/packet-dap.h index f524422dc9..0abbb79bff 100644 --- a/epan/dissectors/packet-dap.h +++ b/epan/dissectors/packet-dap.h @@ -73,7 +73,7 @@ int dissect_dap_ServiceControlOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _ int dissect_dap_ContextSelection(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dap_FamilyReturn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_dap_SecurityParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_dap_SecurityParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dap_DirectoryBindArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dap_DirectoryBindError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dap_ReadArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); diff --git a/epan/dissectors/packet-data.h b/epan/dissectors/packet-data.h index 4b3057277c..a290402f99 100644 --- a/epan/dissectors/packet-data.h +++ b/epan/dissectors/packet-data.h @@ -24,9 +24,12 @@ #ifndef __PACKET_DATA_H__ #define __PACKET_DATA_H__ -/* "proto_data" is exported from libwireshark.dll. +#include "ws_symbol_export.h" + +/* + "proto_data" is exported from libwireshark.dll. * Thus we need a special declaration. */ -WS_VAR_IMPORT int proto_data; +WS_DLL_PUBLIC int proto_data; #endif /* __PACKET_DATA_H__ */ diff --git a/epan/dissectors/packet-dcerpc-nt.h b/epan/dissectors/packet-dcerpc-nt.h index 7fe1c5c951..d1cc7a8b4e 100644 --- a/epan/dissectors/packet-dcerpc-nt.h +++ b/epan/dissectors/packet-dcerpc-nt.h @@ -26,6 +26,8 @@ #ifndef __PACKET_DCERPC_NT_H #define __PACKET_DCERPC_NT_H +#include "ws_symbol_export.h" + /* * Platform ID values, used by several dissectors. */ diff --git a/epan/dissectors/packet-dcerpc.h b/epan/dissectors/packet-dcerpc.h index 4468c466bf..ac39df70cb 100644 --- a/epan/dissectors/packet-dcerpc.h +++ b/epan/dissectors/packet-dcerpc.h @@ -27,6 +27,7 @@ #define __PACKET_DCERPC_H__ #include +#include "ws_symbol_export.h" /* * Data representation. @@ -134,15 +135,19 @@ typedef struct _dcerpc_auth_info { guint16 dcerpc_tvb_get_ntohs (tvbuff_t *tvb, gint offset, guint8 *drep); guint32 dcerpc_tvb_get_ntohl (tvbuff_t *tvb, gint offset, guint8 *drep); void dcerpc_tvb_get_uuid (tvbuff_t *tvb, gint offset, guint8 *drep, e_uuid_t *uuid); +WS_DLL_PUBLIC int dissect_dcerpc_uint8 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint8 *pdata); +WS_DLL_PUBLIC int dissect_dcerpc_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint16 *pdata); +WS_DLL_PUBLIC int dissect_dcerpc_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); +WS_DLL_PUBLIC int dissect_dcerpc_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint64 *pdata); @@ -155,6 +160,7 @@ int dissect_dcerpc_double (tvbuff_t *tvb, gint offset, packet_info *pinfo, int dissect_dcerpc_time_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); +WS_DLL_PUBLIC int dissect_dcerpc_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, e_uuid_t *pdata); @@ -162,18 +168,22 @@ int dissect_dcerpc_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, /* * NDR routines for subdissectors. */ +WS_DLL_PUBLIC int dissect_ndr_uint8 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint8 *pdata); int PIDL_dissect_uint8 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param); +WS_DLL_PUBLIC int dissect_ndr_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint16 *pdata); int PIDL_dissect_uint16 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param); +WS_DLL_PUBLIC int dissect_ndr_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); int PIDL_dissect_uint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 param); +WS_DLL_PUBLIC int dissect_ndr_duint32 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint64 *pdata); @@ -184,12 +194,14 @@ int PIDL_dissect_uint64 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_t int dissect_ndr_float (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, gfloat *pdata); +WS_DLL_PUBLIC int dissect_ndr_double (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, gdouble *pdata); int dissect_ndr_time_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 *pdata); +WS_DLL_PUBLIC int dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, e_uuid_t *pdata); @@ -200,12 +212,14 @@ int dissect_ndr_ctx_hnd (tvbuff_t *tvb, gint offset, packet_info *pinfo, #define FT_UINT1632 FT_UINT32 typedef guint32 guint1632; +WS_DLL_PUBLIC int dissect_ndr_uint1632 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint1632 *pdata); typedef guint64 guint3264; +WS_DLL_PUBLIC int dissect_ndr_uint3264 (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint3264 *pdata); @@ -283,9 +297,13 @@ typedef struct _dcerpc_sub_dissector { } dcerpc_sub_dissector; /* registration function for subdissectors */ +WS_DLL_PUBLIC void dcerpc_init_uuid (int proto, int ett, e_uuid_t *uuid, guint16 ver, dcerpc_sub_dissector *procs, int opnum_hf); +WS_DLL_PUBLIC const char *dcerpc_get_proto_name(e_uuid_t *uuid, guint16 ver); +WS_DLL_PUBLIC int dcerpc_get_proto_hf_opnum(e_uuid_t *uuid, guint16 ver); +WS_DLL_PUBLIC dcerpc_sub_dissector *dcerpc_get_proto_sub_dissector(e_uuid_t *uuid, guint16 ver); /* Create a opnum, name value_string from a subdissector list */ @@ -353,12 +371,12 @@ typedef struct _dcerpc_info { /* the init_protocol hooks. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT GHookList dcerpc_hooks_init_protos; +WS_DLL_PUBLIC GHookList dcerpc_hooks_init_protos; /* the registered subdissectors. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT GHashTable *dcerpc_uuids; +WS_DLL_PUBLIC GHashTable *dcerpc_uuids; typedef struct _dcerpc_uuid_key { e_uuid_t uuid; @@ -420,9 +438,11 @@ typedef struct decode_dcerpc_bind_values_s { } decode_dcerpc_bind_values_t; /* Helper for "decode as" dialog to set up a UUID/conversation binding. */ +WS_DLL_PUBLIC struct _dcerpc_bind_value * dcerpc_add_conv_to_bind_table(decode_dcerpc_bind_values_t *binding); +WS_DLL_PUBLIC guint16 dcerpc_get_transport_salt (packet_info *pinfo); diff --git a/epan/dissectors/packet-dcom-dispatch.h b/epan/dissectors/packet-dcom-dispatch.h index 3decf3b317..51216dd8e8 100644 --- a/epan/dissectors/packet-dcom-dispatch.h +++ b/epan/dissectors/packet-dcom-dispatch.h @@ -27,31 +27,31 @@ #ifndef __PACKET_DCERPC_DCOM_DISPATCH_H #define __PACKET_DCERPC_DCOM_DISPATCH_H -extern int +WS_DLL_PUBLIC int dissect_IDispatch_GetTypeInfoCount_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_GetTypeInfo_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_GetTypeInfo_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_GetIDsOfNames_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_GetIDsOfNames_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); diff --git a/epan/dissectors/packet-dcom.h b/epan/dissectors/packet-dcom.h index 3e840bb6ca..2df3b02f0e 100644 --- a/epan/dissectors/packet-dcom.h +++ b/epan/dissectors/packet-dcom.h @@ -25,9 +25,10 @@ #ifndef __PACKET_DCERPC_DCOM_H #define __PACKET_DCERPC_DCOM_H +#include "ws_symbol_export.h" -WS_VAR_IMPORT const value_string dcom_hresult_vals[]; -WS_VAR_IMPORT const value_string dcom_variant_type_vals[]; +WS_DLL_PUBLIC const value_string dcom_hresult_vals[]; +WS_DLL_PUBLIC const value_string dcom_variant_type_vals[]; extern const value_string dcom_protseq_vals[]; extern int hf_dcom_iid; @@ -39,7 +40,7 @@ extern int hf_dcom_ipid; extern GHashTable *dcom_uuids; /* preferences */ -extern gboolean dcom_prefs_display_unmarshalling_details; +WS_DLL_PUBLIC gboolean dcom_prefs_display_unmarshalling_details; typedef struct dcom_machine_s { @@ -79,8 +80,8 @@ typedef struct dcom_marshaler_s { dcom_dissect_fn_t routine; } dcom_marshaler_t; -extern dcom_interface_t *dcom_interface_new(packet_info *pinfo, const guint8 *ip, e_uuid_t *iid, guint64 oxid, guint64 oid, e_uuid_t *ipid); -extern dcom_interface_t *dcom_interface_find(packet_info *pinfo, const guint8 *ip, e_uuid_t *ipid); +WS_DLL_PUBLIC dcom_interface_t *dcom_interface_new(packet_info *pinfo, const guint8 *ip, e_uuid_t *iid, guint64 oxid, guint64 oid, e_uuid_t *ipid); +WS_DLL_PUBLIC dcom_interface_t *dcom_interface_find(packet_info *pinfo, const guint8 *ip, e_uuid_t *ipid); extern void dcom_interface_dump(void); extern int dcom_register_rountine(dcom_dissect_fn_t routine, e_uuid_t* uuid); @@ -89,10 +90,10 @@ extern void dcom_register_common_routines_(void); extern dcom_dissect_fn_t dcom_get_rountine_by_uuid(const e_uuid_t* uuid); /* the essential DCOM this and that, starting every call */ -extern int +WS_DLL_PUBLIC int dissect_dcom_this(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); -extern int +WS_DLL_PUBLIC int dissect_dcom_that(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); @@ -125,21 +126,21 @@ dissect_dcom_indexed_WORD(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint16 * pu16WORD, int field_index); -extern int +WS_DLL_PUBLIC int dissect_dcom_indexed_DWORD(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, guint32 * pu32DWORD, int field_index); -extern int +WS_DLL_PUBLIC int dissect_dcom_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 * pu32hresult); -extern int +WS_DLL_PUBLIC int dissect_dcom_HRESULT_item(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 * pu32HResult, int field_index, proto_item **item); -extern int +WS_DLL_PUBLIC int dissect_dcom_indexed_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 * pu32hresult, int field_index); @@ -153,21 +154,21 @@ typedef void (*sa_callback_t) (tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 u32VarType, guint32 u32ArraySize); -extern int +WS_DLL_PUBLIC int dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex _U_, sa_callback_t sacb); -extern int +WS_DLL_PUBLIC int dissect_dcom_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, gchar *psz_buffer, guint32 u32max_buffer); -extern int +WS_DLL_PUBLIC int dissect_dcom_indexed_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, gchar *pszStr, guint32 u32MaxStr, int field_index); -extern int +WS_DLL_PUBLIC int dissect_dcom_BSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, gchar *psz_buffer, guint32 u32max_buffer); @@ -184,28 +185,28 @@ extern int dissect_dcom_OBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf); -extern int +WS_DLL_PUBLIC int dissect_dcom_MInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf); -extern int +WS_DLL_PUBLIC int dissect_dcom_PMInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf); -extern int +WS_DLL_PUBLIC int dissect_dcom_VARTYPE(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *pu16Vartype); -extern int +WS_DLL_PUBLIC int dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex); /* dcom "dcerpc internal" unmarshalling */ -extern int +WS_DLL_PUBLIC int dissect_dcom_dcerpc_array_size(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 *pu32array_size); -extern int +WS_DLL_PUBLIC int dissect_dcom_dcerpc_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, guint32 *pu32pointer); @@ -221,11 +222,11 @@ dissect_dcom_nospec_data(tvbuff_t *tvb, int offset, /* very simple parameter-profiles dissectors (for very simple requests ;-) */ /* request: no parameters */ -extern int +WS_DLL_PUBLIC int dissect_dcom_simple_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); /* response: only HRESULT */ -extern int +WS_DLL_PUBLIC int dissect_dcom_simple_resp(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep); diff --git a/epan/dissectors/packet-dsp.h b/epan/dissectors/packet-dsp.h index 6341d6fd40..44d67c994d 100644 --- a/epan/dissectors/packet-dsp.h +++ b/epan/dissectors/packet-dsp.h @@ -42,7 +42,7 @@ int dissect_dsp_OperationProgress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_dsp_ReferenceType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dsp_AccessPoint(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dsp_MasterAndShadowAccessPoints(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_dsp_AccessPointInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_dsp_AccessPointInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dsp_Exclusions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_dsp_ContinuationReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); diff --git a/epan/dissectors/packet-e164.h b/epan/dissectors/packet-e164.h index 941be27615..a8dfa9f15a 100644 --- a/epan/dissectors/packet-e164.h +++ b/epan/dissectors/packet-e164.h @@ -27,6 +27,7 @@ #define __PACKET_E164_H__ #include +#include "ws_symbol_export.h" extern const value_string E164_country_code_value[]; extern const value_string E164_International_Networks_vals[]; @@ -47,5 +48,5 @@ typedef struct { extern void dissect_e164_number(tvbuff_t *tvb, proto_tree *tree, int offset, int length, e164_info_t e164_info); -extern void dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, gboolean bcd_coded); +WS_DLL_PUBLIC void dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, gboolean bcd_coded); #endif diff --git a/epan/dissectors/packet-e212.h b/epan/dissectors/packet-e212.h index 466718f116..9546b6cfdd 100644 --- a/epan/dissectors/packet-e212.h +++ b/epan/dissectors/packet-e212.h @@ -27,11 +27,14 @@ #define __PACKET_E212_H__ #include +#include "ws_symbol_export.h" extern value_string_ext E212_codes_ext; gchar* dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian); +WS_DLL_PUBLIC int dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian); +WS_DLL_PUBLIC int dissect_e212_mcc_mnc_in_address(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset); #endif /* __PACKET_E212_H__ */ diff --git a/epan/dissectors/packet-enc.h b/epan/dissectors/packet-enc.h index 38af86d328..76767134f2 100644 --- a/epan/dissectors/packet-enc.h +++ b/epan/dissectors/packet-enc.h @@ -24,6 +24,9 @@ #ifndef __PACKET_ENC_H__ #define __PACKET_ENC_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_enc(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-eth.h b/epan/dissectors/packet-eth.h index 77d47dd190..802f3404f8 100644 --- a/epan/dissectors/packet-eth.h +++ b/epan/dissectors/packet-eth.h @@ -24,12 +24,15 @@ #ifndef __PACKET_ETH_H__ #define __PACKET_ETH_H__ +#include "ws_symbol_export.h" + typedef struct _eth_hdr { address dst; address src; guint16 type; } eth_hdr; +WS_DLL_PUBLIC void capture_eth(const guchar *, int, int, packet_counts *); void add_ethernet_trailer(packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, diff --git a/epan/dissectors/packet-fc.h b/epan/dissectors/packet-fc.h index 72ee1649b0..7f4072bbd0 100644 --- a/epan/dissectors/packet-fc.h +++ b/epan/dissectors/packet-fc.h @@ -27,6 +27,7 @@ #define __PACKET_FC_H_ #include "packet-scsi.h" +#include "ws_symbol_export.h" /* R_CTL upper bits creates a classification tree */ #define FC_RCTL_DEV_DATA 0x00 @@ -62,7 +63,7 @@ * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const value_string fc_fc4_val[]; +WS_DLL_PUBLIC const value_string fc_fc4_val[]; /* DF_CTL bits */ #define FC_DFCTL_DH 0x03 /* Device_Header type bits: */ diff --git a/epan/dissectors/packet-fddi.h b/epan/dissectors/packet-fddi.h index 22a763e1a5..6b1f2accea 100644 --- a/epan/dissectors/packet-fddi.h +++ b/epan/dissectors/packet-fddi.h @@ -24,12 +24,15 @@ #ifndef __PACKET_FDDI_H__ #define __PACKET_FDDI_H__ +#include "ws_symbol_export.h" + typedef struct _fddi_hdr { guint8 fc; address dst; address src; } fddi_hdr; +WS_DLL_PUBLIC void capture_fddi(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-fr.h b/epan/dissectors/packet-fr.h index 193d499149..a462ea8c7f 100644 --- a/epan/dissectors/packet-fr.h +++ b/epan/dissectors/packet-fr.h @@ -24,6 +24,9 @@ #ifndef __PACKET_FR_H__ #define __PACKET_FR_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_fr(const guchar *, int, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-frame.h b/epan/dissectors/packet-frame.h index cb6edf3b4d..abe9be3634 100644 --- a/epan/dissectors/packet-frame.h +++ b/epan/dissectors/packet-frame.h @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + /* * Routine used to register frame end routine. The routine should only * be registred when the dissector is used in the frame, not in the @@ -39,8 +41,8 @@ extern dissector_table_t wtap_encap_dissector_table; /* following variables are exported from libwireshark.dll. * Thus we need a special declaration. */ -WS_VAR_IMPORT int proto_frame; -WS_VAR_IMPORT int hf_frame_arrival_time; -WS_VAR_IMPORT int hf_frame_number; -WS_VAR_IMPORT int hf_frame_len; -WS_VAR_IMPORT int hf_frame_capture_len; +WS_DLL_PUBLIC int proto_frame; +WS_DLL_PUBLIC int hf_frame_arrival_time; +WS_DLL_PUBLIC int hf_frame_number; +WS_DLL_PUBLIC int hf_frame_len; +WS_DLL_PUBLIC int hf_frame_capture_len; diff --git a/epan/dissectors/packet-giop.h b/epan/dissectors/packet-giop.h index 1e71d71648..12be4794ee 100644 --- a/epan/dissectors/packet-giop.h +++ b/epan/dissectors/packet-giop.h @@ -28,6 +28,8 @@ #ifndef PACKET_GIOP_H #define PACKET_GIOP_H +#include "ws_symbol_export.h" + /* * Useful visible data/structs */ @@ -119,7 +121,7 @@ extern gboolean dissect_giop(tvbuff_t *, packet_info *, proto_tree *); /* new in * This is for heuristic dissection */ -extern void register_giop_user(giop_sub_dissector_t *sub, const gchar *name, +WS_DLL_PUBLIC void register_giop_user(giop_sub_dissector_t *sub, const gchar *name, int sub_proto); /* @@ -135,7 +137,7 @@ extern void delete_giop_user(giop_sub_dissector_t *sub, gchar *name); * This is for explicit dissection. */ -extern void register_giop_user_module(giop_sub_dissector_t *sub, const gchar *name, +WS_DLL_PUBLIC void register_giop_user_module(giop_sub_dissector_t *sub, const gchar *name, const gchar *module, int sub_proto); /* @@ -170,7 +172,7 @@ extern void delete_giop_user_module(giop_sub_dissector_t *sub, gchar *name, * Data is added to tree directly if present. */ -extern void get_CDR_any(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, +WS_DLL_PUBLIC void get_CDR_any(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item, gint *offset, gboolean stream_is_big_endian, int boundary, MessageHeader * header); @@ -182,7 +184,7 @@ extern void get_CDR_any(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro * has been processed. */ -extern gboolean get_CDR_boolean(tvbuff_t *tvb, int *offset); +WS_DLL_PUBLIC gboolean get_CDR_boolean(tvbuff_t *tvb, int *offset); /* Copy a 1 octet sequence from the tvbuff @@ -192,7 +194,7 @@ extern gboolean get_CDR_boolean(tvbuff_t *tvb, int *offset); * has been processed. */ -extern guint8 get_CDR_char(tvbuff_t *tvb, int *offset); +WS_DLL_PUBLIC guint8 get_CDR_char(tvbuff_t *tvb, int *offset); @@ -208,7 +210,7 @@ extern guint8 get_CDR_char(tvbuff_t *tvb, int *offset); * have been processed. */ -extern gdouble get_CDR_double(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gdouble get_CDR_double(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -223,7 +225,7 @@ extern gdouble get_CDR_double(tvbuff_t *tvb, int *offset, * Enum values are encoded as unsigned long. */ -extern guint32 get_CDR_enum(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC guint32 get_CDR_enum(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -258,7 +260,7 @@ extern guint32 get_CDR_enum(tvbuff_t *tvb, int *offset, * */ -extern void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, +WS_DLL_PUBLIC void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, gchar **seq, gint *offset, guint32 digits, gint32 scale); @@ -274,7 +276,7 @@ extern void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, * have been processed. */ -extern gfloat get_CDR_float(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gfloat get_CDR_float(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -282,7 +284,7 @@ extern gfloat get_CDR_float(tvbuff_t *tvb, int *offset, * Decode an Interface type, and display it on the tree. */ -extern void get_CDR_interface(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC void get_CDR_interface(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, gboolean stream_is_big_endian, int boundary); @@ -295,7 +297,7 @@ extern void get_CDR_interface(tvbuff_t *tvb, packet_info *pinfo, * have been processed. */ -extern gint32 get_CDR_long(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gint32 get_CDR_long(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -311,13 +313,13 @@ extern gint32 get_CDR_long(tvbuff_t *tvb, int *offset, #ifdef G_HAVE_GLONG_DOUBLE -extern glong_double get_CDR_long_double(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC glong_double get_CDR_long_double(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); #else /* FIX -- Cast long double to gdouble until I figure this out -- FS*/ -extern gdouble get_CDR_long_double(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gdouble get_CDR_long_double(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); #endif @@ -332,14 +334,14 @@ extern gdouble get_CDR_long_double(tvbuff_t *tvb, int *offset, * have been processed. */ -extern gint64 get_CDR_long_long(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gint64 get_CDR_long_long(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); /* * Decode an Object type, and display it on the tree. */ -extern void get_CDR_object(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC void get_CDR_object(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, gboolean stream_is_big_endian, int boundary); @@ -350,7 +352,7 @@ extern void get_CDR_object(tvbuff_t *tvb, packet_info *pinfo, * has been processed. */ -extern guint8 get_CDR_octet(tvbuff_t *tvb, int *offset); +WS_DLL_PUBLIC guint8 get_CDR_octet(tvbuff_t *tvb, int *offset); /* Copy a sequence of octets from the tvbuff. @@ -359,7 +361,7 @@ extern guint8 get_CDR_octet(tvbuff_t *tvb, int *offset); * This function also increments offset by len. */ -extern void get_CDR_octet_seq(tvbuff_t *tvb, const gchar **seq, int *offset, guint32 len); +WS_DLL_PUBLIC void get_CDR_octet_seq(tvbuff_t *tvb, const gchar **seq, int *offset, guint32 len); /* Copy a 2 octet sequence from the tvbuff * which represents a signed short value, and convert @@ -370,7 +372,7 @@ extern void get_CDR_octet_seq(tvbuff_t *tvb, const gchar **seq, int *offset, gui * have been processed. */ -extern gint16 get_CDR_short(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC gint16 get_CDR_short(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -396,7 +398,7 @@ extern void giop_add_CDR_string(proto_tree *tree, tvbuff_t *tvb, int *offset, * */ -extern guint32 get_CDR_string(tvbuff_t *tvb, const gchar **seq, int *offset, +WS_DLL_PUBLIC guint32 get_CDR_string(tvbuff_t *tvb, const gchar **seq, int *offset, gboolean stream_is_big_endian, int boundary); @@ -411,7 +413,7 @@ extern guint32 get_CDR_string(tvbuff_t *tvb, const gchar **seq, int *offset, * It returns a guint32 representing a TCKind value. */ -extern guint32 get_CDR_typeCode(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, gint *offset, +WS_DLL_PUBLIC guint32 get_CDR_typeCode(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, gint *offset, gboolean stream_is_big_endian, int boundary, MessageHeader * header ); /* Copy a 4 octet sequence from the tvbuff @@ -423,7 +425,7 @@ extern guint32 get_CDR_typeCode(tvbuff_t *tvb, packet_info* pinfo, proto_tree *t * have been processed. */ -extern guint32 get_CDR_ulong(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC guint32 get_CDR_ulong(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -436,7 +438,7 @@ extern guint32 get_CDR_ulong(tvbuff_t *tvb, int *offset, * have been processed. */ -extern guint64 get_CDR_ulong_long(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC guint64 get_CDR_ulong_long(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); /* Copy a 2 octet sequence from the tvbuff @@ -448,7 +450,7 @@ extern guint64 get_CDR_ulong_long(tvbuff_t *tvb, int *offset, * have been processed. */ -extern guint16 get_CDR_ushort(tvbuff_t *tvb, int *offset, +WS_DLL_PUBLIC guint16 get_CDR_ushort(tvbuff_t *tvb, int *offset, gboolean stream_is_big_endian, int boundary); @@ -482,7 +484,7 @@ extern guint16 get_CDR_ushort(tvbuff_t *tvb, int *offset, * Wchar is not supported for GIOP 1.0. */ -extern gint get_CDR_wchar(tvbuff_t *tvb, const gchar **seq, int *offset, +WS_DLL_PUBLIC gint get_CDR_wchar(tvbuff_t *tvb, const gchar **seq, int *offset, MessageHeader * header); @@ -505,7 +507,7 @@ extern gint get_CDR_wchar(tvbuff_t *tvb, const gchar **seq, int *offset, * Wstring is not supported for GIOP 1.0. */ -extern guint32 get_CDR_wstring(tvbuff_t *tvb, const gchar **seq, int *offset, +WS_DLL_PUBLIC guint32 get_CDR_wstring(tvbuff_t *tvb, const gchar **seq, int *offset, gboolean stream_is_big_endian, int boundary, MessageHeader * header); @@ -520,7 +522,7 @@ extern guint32 get_CDR_wstring(tvbuff_t *tvb, const gchar **seq, int *offset, /* Determine the byte order from the GIOP MessageHeader */ -extern gboolean is_big_endian (MessageHeader * header); +WS_DLL_PUBLIC gboolean is_big_endian (MessageHeader * header); /* * get_encap_info() for any encapsulation (eg:sequences) @@ -528,7 +530,7 @@ extern gboolean is_big_endian (MessageHeader * header); * and *offset, and returns the sequence length. */ -extern guint32 get_CDR_encap_info(tvbuff_t *tvb, proto_tree *tree, gint *offset, +WS_DLL_PUBLIC guint32 get_CDR_encap_info(tvbuff_t *tvb, proto_tree *tree, gint *offset, gboolean old_stream_is_big_endian, guint32 old_boundary, gboolean *new_stream_is_big_endian_ptr, guint32 *new_boundary_ptr ); @@ -540,7 +542,7 @@ extern guint32 get_CDR_encap_info(tvbuff_t *tvb, proto_tree *tree, gint *offset, * the initial sequence. */ -extern gchar * make_printable_string (const gchar *in, guint32 len); +WS_DLL_PUBLIC gchar * make_printable_string (const gchar *in, guint32 len); /* * Enums for TCkind diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index 1caf660449..4ce0619503 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -52,6 +52,7 @@ #define __PACKET_GSM_A_COMMON_H__ #include "packet-sccp.h" +#include "ws_symbol_export.h" /* PROTOTYPES/FORWARDS */ typedef guint16 (*elem_fcn)(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); @@ -348,17 +349,17 @@ extern const char* get_gsm_a_msg_string(int pdu_type, int idx); /* * Type Length Value (TLV) element dissector */ -extern guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_tlv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); /* * Type Extendable Length Value (TLVE) element dissector */ -extern guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); +guint16 elem_telv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); /* * Type Length Value (TLV-E) element dissector */ -extern guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); +guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); /* * Type Value (TV) element dissector @@ -366,7 +367,7 @@ extern guint16 elem_tlv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, g * Length cannot be used in these functions, big problem if a element dissector * is not defined for these. */ -extern guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); /* * Type Value (TV) element dissector @@ -375,22 +376,22 @@ extern guint16 elem_tv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guin * Length cannot be used in these functions, big problem if a element dissector * is not defined for these. */ -extern guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_tv_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); /* * Type (T) element dissector */ -extern guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_t(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 iei, gint pdu_type, int idx, guint32 offset, const gchar *name_add); /* * Length Value (LV) element dissector */ -extern guint16 elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_lv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); /* * Length Value (LV-E) element dissector */ -extern guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); +guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint len, const gchar *name_add); /* * Value (V) element dissector @@ -398,7 +399,7 @@ extern guint16 elem_lv_e(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gi * Length cannot be used in these functions, big problem if a element dissector * is not defined for these. */ -extern guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, const gchar *name_add); +WS_DLL_PUBLIC guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, const gchar *name_add); /* * Short Value (V_SHORT) element dissector @@ -406,7 +407,7 @@ extern guint16 elem_v(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint * nibble used in this functions to indicate left or right nibble of the octet * This is expected to be used right nibble first, as the tables of 24.008. */ -extern guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint32 nibble); +WS_DLL_PUBLIC guint16 elem_v_short(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gint pdu_type, int idx, guint32 offset, guint32 nibble); /* XXX: Most (if not all) the functions which make use of the following macros have the variables 'consumed', @@ -660,8 +661,11 @@ guint16 be_cell_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, gui guint16 be_chan_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 be_prio(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_lai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_mid(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_cell_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_bearer_cap_uplink(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); @@ -673,38 +677,60 @@ guint16 de_cn_common_gsm_map_nas_sys_info(tvbuff_t *tvb, proto_tree *tree, packe guint16 de_cs_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_ps_domain_spec_sys_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_plmn_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_ms_cm_1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_ms_cm_2(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_ms_cm_3(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_serv_cat(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_sm_apn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_sm_qos(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_sm_pflow_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_sm_tflow_temp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_time_zone(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_gmm_drx_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_gmm_ms_net_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_gmm_ms_radio_acc_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_gmm_voice_domain_pref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_cell_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_ch_dsc(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_ch_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_chnl_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_cip_mode_set(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_cm_enq_mask(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_rr_meas_res(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_multirate_conf(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_sus_cau(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rr_tlli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_rej_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); +WS_DLL_PUBLIC guint16 de_d_gb_call_ref(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len); guint16 de_spare_nibble(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_); @@ -728,17 +754,17 @@ void rp_data_n_ms(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const value_string gsm_a_bssmap_msg_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_mm_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_rr_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_cc_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_gmm_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_sms_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_sm_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_ss_strings[]; -WS_VAR_IMPORT const value_string gsm_a_dtap_msg_tp_strings[]; -WS_VAR_IMPORT const value_string gsm_a_rr_short_pd_msg_strings[]; -WS_VAR_IMPORT const gchar *gsm_a_pd_str[]; +WS_DLL_PUBLIC const value_string gsm_a_bssmap_msg_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_mm_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_rr_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_cc_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_gmm_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sms_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_sm_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_ss_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_dtap_msg_tp_strings[]; +WS_DLL_PUBLIC const value_string gsm_a_rr_short_pd_msg_strings[]; +WS_DLL_PUBLIC const gchar *gsm_a_pd_str[]; extern const value_string gsm_a_sm_qos_del_of_err_sdu_vals[]; extern const value_string gsm_a_sm_qos_traffic_cls_vals[]; diff --git a/epan/dissectors/packet-gsm_map.h b/epan/dissectors/packet-gsm_map.h index e70f839913..1ea4a3f940 100644 --- a/epan/dissectors/packet-gsm_map.h +++ b/epan/dissectors/packet-gsm_map.h @@ -34,6 +34,8 @@ #ifndef PACKET_GSM_MAP_H #define PACKET_GSM_MAP_H +#include "ws_symbol_export.h" + /* Defines for the GSM MAP taps */ #define GSM_MAP_MAX_NUM_OPR_CODES 256 @@ -51,7 +53,7 @@ typedef struct _gsm_map_tap_rec_t { #define SMS_ENCODING_7BIT_LANG 4 #define SMS_ENCODING_UCS2_LANG 5 -WS_VAR_IMPORT const value_string gsm_map_opr_code_strings[]; +WS_DLL_PUBLIC const value_string gsm_map_opr_code_strings[]; const char* unpack_digits(tvbuff_t *tvb, int offset); extern const value_string ssCode_vals[]; @@ -98,14 +100,14 @@ extern const value_string gsm_map_BasicServiceCode_vals[]; extern const value_string gsm_map_Ext_BasicServiceCode_vals[]; int dissect_gsm_map_TBCD_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_AddressString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_gsm_map_ISDN_AddressString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_gsm_map_ISDN_AddressString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_ISDN_SubaddressString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_ExternalSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_AlertingPattern(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_gsm_map_IMSI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_gsm_map_IMSI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_IMEI(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_NetworkResource(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_NAEA_CIC(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_LCSClientExternalID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); @@ -209,7 +211,7 @@ int dissect_gsm_map_lcs_SupportedGADShapes(gboolean implicit_tag _U_, tvbuff_t * int dissect_gsm_map_lcs_LCS_ReferenceNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_lcs_LCSCodeword(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_lcs_AreaEventInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_gsm_map_lcs_Ext_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_gsm_map_lcs_Ext_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_lcs_VelocityEstimate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_lcs_Add_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_gsm_map_lcs_LCS_ClientID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); @@ -270,7 +272,7 @@ int dissect_gsm_ss_LocationMethod(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, /*--- End of included file: packet-gsm_map-exp.h ---*/ -#line 58 "../../asn1/gsm_map/packet-gsm_map-template.h" +#line 60 "../../asn1/gsm_map/packet-gsm_map-template.h" #endif /* PACKET_GSM_MAP_H */ diff --git a/epan/dissectors/packet-h225.h b/epan/dissectors/packet-h225.h index 887750e075..d188c826bd 100644 --- a/epan/dissectors/packet-h225.h +++ b/epan/dissectors/packet-h225.h @@ -90,11 +90,11 @@ typedef struct _h225_packet_info { /*--- Included file: packet-h225-exp.h ---*/ #line 1 "../../asn1/h225/packet-h225-exp.h" -WS_VAR_IMPORT const value_string T_h323_message_body_vals[]; -WS_VAR_IMPORT const value_string h225_ReleaseCompleteReason_vals[]; +WS_DLL_PUBLIC const value_string T_h323_message_body_vals[]; +WS_DLL_PUBLIC const value_string h225_ReleaseCompleteReason_vals[]; extern const value_string h225_PresentationIndicator_vals[]; extern const value_string h225_ScreeningIndicator_vals[]; -WS_VAR_IMPORT const value_string FacilityReason_vals[]; +WS_DLL_PUBLIC const value_string FacilityReason_vals[]; extern const value_string h225_TransportAddress_vals[]; extern const value_string h225_SupportedProtocols_vals[]; extern const value_string AliasAddress_vals[]; @@ -104,19 +104,19 @@ extern const value_string h225_PrivateTypeOfNumber_vals[]; extern const value_string h225_IntegrityMechanism_vals[]; extern const value_string h225_CryptoH323Token_vals[]; extern const value_string h225_GenericIdentifier_vals[]; -WS_VAR_IMPORT const value_string h225_RasMessage_vals[]; -WS_VAR_IMPORT const value_string GatekeeperRejectReason_vals[]; -WS_VAR_IMPORT const value_string RegistrationRejectReason_vals[]; -WS_VAR_IMPORT const value_string UnregRequestReason_vals[]; -WS_VAR_IMPORT const value_string UnregRejectReason_vals[]; +WS_DLL_PUBLIC const value_string h225_RasMessage_vals[]; +WS_DLL_PUBLIC const value_string GatekeeperRejectReason_vals[]; +WS_DLL_PUBLIC const value_string RegistrationRejectReason_vals[]; +WS_DLL_PUBLIC const value_string UnregRequestReason_vals[]; +WS_DLL_PUBLIC const value_string UnregRejectReason_vals[]; extern const value_string h225_TransportQOS_vals[]; -WS_VAR_IMPORT const value_string AdmissionRejectReason_vals[]; -WS_VAR_IMPORT const value_string BandRejectReason_vals[]; -WS_VAR_IMPORT const value_string LocationRejectReason_vals[]; -WS_VAR_IMPORT const value_string DisengageReason_vals[]; -WS_VAR_IMPORT const value_string DisengageRejectReason_vals[]; -WS_VAR_IMPORT const value_string InfoRequestNakReason_vals[]; -int dissect_h225_ReleaseCompleteReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC const value_string AdmissionRejectReason_vals[]; +WS_DLL_PUBLIC const value_string BandRejectReason_vals[]; +WS_DLL_PUBLIC const value_string LocationRejectReason_vals[]; +WS_DLL_PUBLIC const value_string DisengageReason_vals[]; +WS_DLL_PUBLIC const value_string DisengageRejectReason_vals[]; +WS_DLL_PUBLIC const value_string InfoRequestNakReason_vals[]; +WS_DLL_PUBLIC int dissect_h225_ReleaseCompleteReason(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_PresentationIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_ScreeningIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); @@ -146,7 +146,7 @@ int dissect_h225_GenericData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx int dissect_h225_GenericIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_FeatureSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_TransportChannelInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_h225_RasMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_h225_RasMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_TransportQOS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h225_ExtendedAliasAddress_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_); diff --git a/epan/dissectors/packet-h245.h b/epan/dissectors/packet-h245.h index bac081975d..b10c176c8c 100644 --- a/epan/dissectors/packet-h245.h +++ b/epan/dissectors/packet-h245.h @@ -33,6 +33,9 @@ #ifndef PACKET_H245_H #define PACKET_H245_H + +#include "ws_symbol_export.h" + typedef enum _h245_msg_type { H245_TermCapSet, H245_TermCapSetAck, @@ -124,10 +127,10 @@ struct _h223_mux_element { #include typedef void (*h223_set_mc_handle_t) ( packet_info* pinfo, guint8 mc, h223_mux_element* me ); -extern void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ); +WS_DLL_PUBLIC void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ); typedef void (*h223_add_lc_handle_t) ( packet_info* pinfo, guint16 lc, h223_lc_params* params ); -extern void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ); +WS_DLL_PUBLIC void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ); /*--- Included file: packet-h245-exp.h ---*/ @@ -138,7 +141,7 @@ extern const value_string h245_TransportAddress_vals[]; extern const value_string h245_UnicastAddress_vals[]; extern const value_string h245_MulticastAddress_vals[]; int dissect_h245_Capability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -int dissect_h245_H223Capability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_h245_H223Capability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h245_QOSCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h245_DataProtocolCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); int dissect_h245_T38FaxProfile(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); @@ -149,7 +152,7 @@ int dissect_h245_UnicastAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a int dissect_h245_MulticastAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); /*--- End of included file: packet-h245-exp.h ---*/ -#line 125 "../../asn1/h245/packet-h245-template.h" +#line 128 "../../asn1/h245/packet-h245-template.h" void dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str); diff --git a/epan/dissectors/packet-h248.h b/epan/dissectors/packet-h248.h index 9f422b5dbb..bf25462fb6 100644 --- a/epan/dissectors/packet-h248.h +++ b/epan/dissectors/packet-h248.h @@ -36,6 +36,7 @@ #ifndef PACKET_H248_H #include +#include "ws_symbol_export.h" /*#include "packet-h248-exp.h"*/ typedef struct _h248_curr_info_t h248_curr_info_t; @@ -44,7 +45,7 @@ typedef void (*h248_pkg_param_dissector_t)(proto_tree* tree, tvbuff_t* tvb, pack extern void h248_param_bytes_item(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_uint_item(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); -extern void h248_param_ber_integer(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); +WS_DLL_PUBLIC void h248_param_ber_integer(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_ber_octetstring(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void h248_param_ber_boolean(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* ignored); extern void external_dissector(proto_tree*, tvbuff_t*, packet_info* , int, h248_curr_info_t*,void* dissector_handle); @@ -120,6 +121,7 @@ struct _h248_curr_info_t { const h248_pkg_param_t* par; }; +WS_DLL_PUBLIC void h248_register_package(const h248_package_t* pkg, pkg_reg_action reg_action); #endif /* PACKET_H248_H */ diff --git a/epan/dissectors/packet-http.h b/epan/dissectors/packet-http.h index 6b0342dfee..899c363c1b 100644 --- a/epan/dissectors/packet-http.h +++ b/epan/dissectors/packet-http.h @@ -25,8 +25,11 @@ #define __PACKET_HTTP_H__ #include +#include "ws_symbol_export.h" +WS_DLL_PUBLIC void http_dissector_add(guint32 port, dissector_handle_t handle); +WS_DLL_PUBLIC void http_port_add(guint32 port); /* Used for HTTP statistics */ diff --git a/epan/dissectors/packet-i2c.h b/epan/dissectors/packet-i2c.h index a88b1ce86e..db8d05d9a9 100644 --- a/epan/dissectors/packet-i2c.h +++ b/epan/dissectors/packet-i2c.h @@ -24,6 +24,9 @@ #ifndef __PACKET_I2C_H__ #define __PACKET_I2C_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_i2c(union wtap_pseudo_header *, packet_counts *); #endif diff --git a/epan/dissectors/packet-ieee80211-radiotap.h b/epan/dissectors/packet-ieee80211-radiotap.h index a903288a0c..031fb25057 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.h +++ b/epan/dissectors/packet-ieee80211-radiotap.h @@ -25,6 +25,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifndef __PACKET_IEEE80211_RADIOTAP_H__ +#define __PACKET_IEEE80211_RADIOTAP_H__ + +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_radiotap(const guchar *pd, int offset, int len, packet_counts *ld); void proto_register_radiotap(void); void proto_reg_handoff_radiotap(void); @@ -38,3 +44,5 @@ struct _radiotap_info { guint32 flags; guint64 tsft; }; + +#endif diff --git a/epan/dissectors/packet-ieee80211.h b/epan/dissectors/packet-ieee80211.h index d8015d28d7..fa5f8440dd 100644 --- a/epan/dissectors/packet-ieee80211.h +++ b/epan/dissectors/packet-ieee80211.h @@ -27,12 +27,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ieee80211 (const guchar *, int, int, packet_counts *); void capture_ieee80211_datapad (const guchar *, int, int, packet_counts *); void capture_ieee80211_fixed (const guchar *, int, int, packet_counts *); void capture_ieee80211_ht (const guchar *, int, int, packet_counts *); +WS_DLL_PUBLIC void capture_prism(const guchar *, int, int, packet_counts *); +WS_DLL_PUBLIC void capture_wlancap(const guchar *, int, int, packet_counts *); void ieee_80211_add_tagged_parameters (tvbuff_t * tvb, int offset, diff --git a/epan/dissectors/packet-ieee802a.h b/epan/dissectors/packet-ieee802a.h index c491bde97c..d6284ea938 100644 --- a/epan/dissectors/packet-ieee802a.h +++ b/epan/dissectors/packet-ieee802a.h @@ -24,9 +24,12 @@ #ifndef __PACKET_IEEE802A_H__ #define __PACKET_IEEE802A_H__ +#include "ws_symbol_export.h" + /* * Add an entry for a new OUI. */ +WS_DLL_PUBLIC void ieee802a_add_oui(guint32, const char *, const char *, hf_register_info *); #endif diff --git a/epan/dissectors/packet-ip.h b/epan/dissectors/packet-ip.h index 548b0ab718..249b387040 100644 --- a/epan/dissectors/packet-ip.h +++ b/epan/dissectors/packet-ip.h @@ -26,6 +26,8 @@ #ifndef __PACKET_IP_H__ #define __PACKET_IP_H__ +#include "ws_symbol_export.h" + typedef struct _ws_ip { guint8 ip_v_hl; /* combines ip_v and ip_hl */ @@ -44,6 +46,6 @@ void capture_ip(const guchar *, int, int, packet_counts *); guint16 ip_checksum(const guint8 *ptr, int len); /* Export the DSCP extended value-string table for other protocols */ -WS_VAR_IMPORT value_string_ext dscp_vals_ext; +WS_DLL_PUBLIC value_string_ext dscp_vals_ext; #endif diff --git a/epan/dissectors/packet-ipfc.h b/epan/dissectors/packet-ipfc.h index 875dab1af2..645b957e1d 100644 --- a/epan/dissectors/packet-ipfc.h +++ b/epan/dissectors/packet-ipfc.h @@ -24,6 +24,9 @@ #ifndef __PACKET_IPFC_H__ #define __PACKET_IPFC_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ipfc(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-isup.h b/epan/dissectors/packet-isup.h index 50c476f979..cf3827b7af 100644 --- a/epan/dissectors/packet-isup.h +++ b/epan/dissectors/packet-isup.h @@ -27,6 +27,8 @@ #ifndef PACKET_ISUP_H #define PACKET_ISUP_H +#include "ws_symbol_export.h" + #define ISUP_MAX_NUM_MESSAGE_TYPES 256 typedef struct _isup_tap_rec_t { @@ -43,8 +45,8 @@ typedef struct _isup_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT value_string_ext isup_message_type_value_acro_ext; -WS_VAR_IMPORT value_string_ext q850_cause_code_vals_ext; +WS_DLL_PUBLIC value_string_ext isup_message_type_value_acro_ext; +WS_DLL_PUBLIC value_string_ext q850_cause_code_vals_ext; /* * Export some definitions and value_string tables for other dissectors */ @@ -165,16 +167,21 @@ extern value_string_ext isup_transmission_medium_requirement_value_ext; extern value_string_ext bearer_network_connection_characteristics_vals_ext; extern value_string_ext x213_afi_value_ext; -WS_VAR_IMPORT value_string_ext isup_calling_partys_category_value_ext; +WS_DLL_PUBLIC value_string_ext isup_calling_partys_category_value_ext; /* * Export dissection of some parameters */ void dissect_nsap(tvbuff_t *parameter_tvb,gint offset,gint len, proto_tree *parameter_tree); +WS_DLL_PUBLIC void dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); +WS_DLL_PUBLIC void dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); void dissect_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); +WS_DLL_PUBLIC void dissect_isup_redirection_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); +WS_DLL_PUBLIC void dissect_isup_original_called_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); +WS_DLL_PUBLIC void dissect_isup_redirecting_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); void dissect_isup_location_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item); diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index f7cf661f27..89aee3bc5f 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -386,6 +386,7 @@ gboolean krb_decrypt = FALSE; /* keytab filename */ static const char *keytab_filename = ""; +WS_DLL_PUBLIC void read_keytab_file(const char *); void @@ -416,8 +417,9 @@ read_keytab_file_from_preferences(void) #elif defined(_WIN32) -/* Dummy version to allow us to put this function in libwireshark.def--even - * on systems without KERBEROS. +/* + * Dummy version to allow us to export this function -- even + * on systems without KERBEROS. */ void read_keytab_file_from_preferences(void) diff --git a/epan/dissectors/packet-kerberos.h b/epan/dissectors/packet-kerberos.h index 6e65ecf230..2fc9f023f1 100644 --- a/epan/dissectors/packet-kerberos.h +++ b/epan/dissectors/packet-kerberos.h @@ -24,6 +24,8 @@ #ifndef __PACKET_KERBEROS_H #define __PACKET_KERBEROS_H +#include "ws_symbol_export.h" + /* This is a list of callback functions a caller can use to specify that octet strings in kerberos to be passed back to application specific dissectors, outside of kerberos. @@ -85,6 +87,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo, extern gboolean krb_decrypt; +WS_DLL_PUBLIC void read_keytab_file_from_preferences(void); #endif /* HAVE_KERBEROS */ diff --git a/epan/dissectors/packet-ldap.h b/epan/dissectors/packet-ldap.h index 2a5e3ec6b5..2244ff6850 100644 --- a/epan/dissectors/packet-ldap.h +++ b/epan/dissectors/packet-ldap.h @@ -35,6 +35,7 @@ #define __PACKET_LDAP_H__ # include /* for dissector_*_t types */ +#include "ws_symbol_export.h" /* * These are all APPLICATION types; the value is the type tag. @@ -111,6 +112,7 @@ typedef struct ldap_call_response { void register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector); void register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto); +WS_DLL_PUBLIC int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gboolean prepend_dot _U_); /*#include "packet-ldap-exp.h" */ diff --git a/epan/dissectors/packet-llc.h b/epan/dissectors/packet-llc.h index e0507df52a..f31e5d8176 100644 --- a/epan/dissectors/packet-llc.h +++ b/epan/dissectors/packet-llc.h @@ -24,6 +24,8 @@ #ifndef __PACKET_LLC_H__ #define __PACKET_LLC_H__ +#include "ws_symbol_export.h" + void capture_llc(const guchar *, int, int, packet_counts *); extern const value_string sap_vals[]; @@ -36,6 +38,7 @@ void dissect_snap(tvbuff_t *, int, packet_info *, proto_tree *, /* * Add an entry for a new OUI. */ +WS_DLL_PUBLIC void llc_add_oui(guint32, const char *, const char *, hf_register_info *); /* diff --git a/epan/dissectors/packet-mac-lte.h b/epan/dissectors/packet-mac-lte.h index ee9f5efa1b..09931736a6 100644 --- a/epan/dissectors/packet-mac-lte.h +++ b/epan/dissectors/packet-mac-lte.h @@ -48,6 +48,8 @@ * SUCH DAMAGE */ +#include "ws_symbol_export.h" + /* radioType */ #define FDD_RADIO 1 #define TDD_RADIO 2 @@ -266,7 +268,9 @@ void set_mac_lte_channel_mapping(guint16 ueid, guint8 lcid, /* Functions to be called from outside this module (e.g. in a plugin, where mac_lte_info isn't available) to get/set per-packet data */ +WS_DLL_PUBLIC mac_lte_info *get_mac_lte_proto_data(packet_info *pinfo); +WS_DLL_PUBLIC void set_mac_lte_proto_data(packet_info *pinfo, mac_lte_info *p_mac_lte_info); /* Function to attempt to populate p_mac_lte_info using framing definition above */ diff --git a/epan/dissectors/packet-mtp3.h b/epan/dissectors/packet-mtp3.h index 33b2c8c1bd..9178ca8324 100644 --- a/epan/dissectors/packet-mtp3.h +++ b/epan/dissectors/packet-mtp3.h @@ -23,6 +23,8 @@ #ifndef __PACKET_MTP3_H_ #define __PACKET_MTP3_H_ +#include "ws_symbol_export.h" + typedef enum { ITU_STANDARD = 1, ANSI_STANDARD = 2, @@ -34,7 +36,7 @@ typedef enum { extern gint mtp3_standard; extern gboolean mtp3_heuristic_standard; -WS_VAR_IMPORT const value_string mtp3_standard_vals[]; +WS_DLL_PUBLIC const value_string mtp3_standard_vals[]; typedef enum { MTP3_ADDR_FMT_DEC = 1, @@ -74,7 +76,7 @@ typedef struct _mtp3_tap_rec_t { #define JAPAN_PC_LENGTH 2 #define JAPAN_PC_MASK 0xffff -extern void mtp3_addr_to_str_buf(const mtp3_addr_pc_t *addr_pc_p, gchar *buf, int buf_len); +WS_DLL_PUBLIC void mtp3_addr_to_str_buf(const mtp3_addr_pc_t *addr_pc_p, gchar *buf, int buf_len); extern void mtp3_pc_to_str_buf(const guint32 pc, gchar *buf, int buf_len); extern gchar* mtp3_pc_to_str(const guint32 pc); extern gboolean mtp3_pc_structured(void); @@ -98,7 +100,7 @@ extern void dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT const value_string mtp3_service_indicator_code_short_vals[]; +WS_DLL_PUBLIC const value_string mtp3_service_indicator_code_short_vals[]; #define MTP_SI_SNM 0x0 #define MTP_SI_MTN 0x1 @@ -124,6 +126,6 @@ WS_VAR_IMPORT const value_string mtp3_service_indicator_code_short_vals[]; #define MTP3_NI_INT1 0x1 #define MTP3_NI_NAT0 0x2 #define MTP3_NI_NAT1 0x3 -WS_VAR_IMPORT const value_string mtp3_network_indicator_vals[]; +WS_DLL_PUBLIC const value_string mtp3_network_indicator_vals[]; #endif diff --git a/epan/dissectors/packet-null.h b/epan/dissectors/packet-null.h index ef508a160d..3556412194 100644 --- a/epan/dissectors/packet-null.h +++ b/epan/dissectors/packet-null.h @@ -24,6 +24,9 @@ #ifndef __PACKET_NULL_H__ #define __PACKET_NULL_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_null(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-per.h b/epan/dissectors/packet-per.h index 29b01a4d9c..2d81fb2c55 100644 --- a/epan/dissectors/packet-per.h +++ b/epan/dissectors/packet-per.h @@ -26,6 +26,7 @@ #ifndef __PACKET_PER_H__ #define __PACKET_PER_H__ +#include "ws_symbol_export.h" #define PER_NOT_DECODED_YET(x) \ proto_tree_add_text(tree, tvb, 0, 0, "something unknown here [%s]",x); \ @@ -65,67 +66,67 @@ typedef struct _per_sequence_t { per_type_fn func; } per_sequence_t; -extern guint32 dissect_per_null(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); +WS_DLL_PUBLIC guint32 dissect_per_null(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); -extern guint32 dissect_per_GeneralString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); +WS_DLL_PUBLIC guint32 dissect_per_GeneralString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); -extern guint32 dissect_per_sequence_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq); +WS_DLL_PUBLIC guint32 dissect_per_sequence_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq); -extern guint32 dissect_per_IA5String(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_IA5String(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_NumericString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_NumericString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_PrintableString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_PrintableString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_VisibleString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_VisibleString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_BMPString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_BMPString(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); extern guint32 dissect_per_UTF8String(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension); extern guint32 dissect_per_object_descriptor(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, tvbuff_t **value_tvb); -extern guint32 dissect_per_constrained_sequence_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_constrained_sequence_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_constrained_set_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq, int min_len, int max_len, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_constrained_set_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq, int min_len, int max_len, gboolean has_extension); -extern guint32 dissect_per_set_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq); +WS_DLL_PUBLIC guint32 dissect_per_set_of(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *seq); -extern guint32 dissect_per_object_identifier(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, tvbuff_t **value_tvb); -extern guint32 dissect_per_object_identifier_str(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, const char **value_stringx); +WS_DLL_PUBLIC guint32 dissect_per_object_identifier(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, tvbuff_t **value_tvb); +WS_DLL_PUBLIC guint32 dissect_per_object_identifier_str(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, const char **value_stringx); -extern guint32 dissect_per_boolean(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gboolean *bool_val); +WS_DLL_PUBLIC guint32 dissect_per_boolean(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gboolean *bool_val); -extern guint32 dissect_per_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gint32 *value); +WS_DLL_PUBLIC guint32 dissect_per_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gint32 *value); -extern guint32 dissect_per_constrained_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint32 min, guint32 max, guint32 *value, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_constrained_integer(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint32 min, guint32 max, guint32 *value, gboolean has_extension); -extern guint32 dissect_per_constrained_integer_64b(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint64 min, guint64 max, guint64 *value, gboolean has_extension); +WS_DLL_PUBLIC guint32 dissect_per_constrained_integer_64b(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint64 min, guint64 max, guint64 *value, gboolean has_extension); -extern guint32 dissect_per_real(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, double *value); +WS_DLL_PUBLIC guint32 dissect_per_real(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, double *value); -extern guint32 dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, gint *value); +WS_DLL_PUBLIC guint32 dissect_per_choice(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, gint ett_index, const per_choice_t *choice, gint *value); -extern guint32 dissect_per_sequence(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *sequence); -extern guint32 dissect_per_sequence_eag(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, const per_sequence_t *sequence); +WS_DLL_PUBLIC guint32 dissect_per_sequence(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *parent_tree, int hf_index, gint ett_index, const per_sequence_t *sequence); +WS_DLL_PUBLIC guint32 dissect_per_sequence_eag(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, const per_sequence_t *sequence); -extern guint32 dissect_per_octet_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb); -extern guint32 dissect_per_octet_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb); -extern guint32 dissect_per_octet_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_octet_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb); +WS_DLL_PUBLIC guint32 dissect_per_octet_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_octet_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb); -extern guint32 dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb); -extern guint32 dissect_per_bit_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb); -extern guint32 dissect_per_bit_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_bit_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, tvbuff_t **value_tvb); +WS_DLL_PUBLIC guint32 dissect_per_bit_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_bit_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb); -extern guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, const char *alphabet, int alphabet_length, tvbuff_t **value_tvb); +WS_DLL_PUBLIC guint32 dissect_per_restricted_character_string(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, const char *alphabet, int alphabet_length, tvbuff_t **value_tvb); -extern guint32 dissect_per_enumerated(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint32 root_num, guint32 *value, gboolean has_extension, guint32 ext_num, guint32 *value_map); +WS_DLL_PUBLIC guint32 dissect_per_enumerated(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint32 root_num, guint32 *value, gboolean has_extension, guint32 ext_num, guint32 *value_map); -extern guint32 dissect_per_open_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, per_type_fn type_cb); -extern guint32 dissect_per_open_type_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, dissector_t type_cb); -extern guint32 dissect_per_open_type_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, new_dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_open_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, per_type_fn type_cb); +WS_DLL_PUBLIC guint32 dissect_per_open_type_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, dissector_t type_cb); +WS_DLL_PUBLIC guint32 dissect_per_open_type_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, new_dissector_t type_cb); -extern guint32 dissect_per_external_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, per_type_fn type_cb); +WS_DLL_PUBLIC guint32 dissect_per_external_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, per_type_fn type_cb); extern guint32 dissect_per_size_constrained_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, per_type_fn type_cb, const gchar *name, int min_len, int max_len, gboolean has_extension); extern gboolean get_size_constraint_from_stack(asn1_ctx_t *actx, const gchar *name, int *pmin_len, int *pmax_len, gboolean *phas_extension); diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c index 9506619516..1fda7f3445 100644 --- a/epan/dissectors/packet-ppi.c +++ b/epan/dissectors/packet-ppi.c @@ -61,6 +61,7 @@ #include "packet-frame.h" #include "packet-eth.h" #include "packet-ieee80211.h" +#include "packet-ppi.h" /* * Per-Packet Information (PPI) header. diff --git a/epan/dissectors/packet-ppi.h b/epan/dissectors/packet-ppi.h index ab775f9643..30db7d84f4 100644 --- a/epan/dissectors/packet-ppi.h +++ b/epan/dissectors/packet-ppi.h @@ -24,6 +24,9 @@ #ifndef __PACKET_PPI_H__ #define __PACKET_PPI_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_ppi(const guchar *pd, int len, packet_counts *ld); #endif diff --git a/epan/dissectors/packet-ppp.h b/epan/dissectors/packet-ppp.h index 749033e440..4227c0b24c 100644 --- a/epan/dissectors/packet-ppp.h +++ b/epan/dissectors/packet-ppp.h @@ -24,9 +24,12 @@ #ifndef __PACKET_PPP_H__ #define __PACKET_PPP_H__ +#include "ws_symbol_export.h" + /* PPP options */ extern gboolean ppp_vj_decomp;/* FALSE = No VJ header decompression, TRUE = Decompress VJ */ +WS_DLL_PUBLIC void capture_ppp_hdlc(const guchar *, int, int, packet_counts *); tvbuff_t *decode_fcs(tvbuff_t *tvb, proto_tree *fh_tree, int fcs_decode, int proto_offset); diff --git a/epan/dissectors/packet-q708.h b/epan/dissectors/packet-q708.h index cdf3cad840..27cc9c5afd 100644 --- a/epan/dissectors/packet-q708.h +++ b/epan/dissectors/packet-q708.h @@ -26,6 +26,9 @@ #ifndef __PACKET_Q708_H__ #define __PACKET_Q708_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void analyze_q708_ispc(tvbuff_t *tvb, proto_tree *tree, int offset, int length, guint16 ispc); #endif /* __PACKET_Q708_H__ */ diff --git a/epan/dissectors/packet-q931.h b/epan/dissectors/packet-q931.h index b2c813f519..01a64c5d68 100644 --- a/epan/dissectors/packet-q931.h +++ b/epan/dissectors/packet-q931.h @@ -27,7 +27,9 @@ #ifndef __PACKET_Q931_H__ #define __PACKET_Q931_H__ -extern void dissect_q931_bearer_capability_ie(tvbuff_t *, int, int, +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void dissect_q931_bearer_capability_ie(tvbuff_t *, int, int, proto_tree *); extern void dissect_q931_cause_ie(tvbuff_t *, int, int, @@ -36,7 +38,7 @@ extern void dissect_q931_cause_ie(tvbuff_t *, int, int, extern void dissect_q931_progress_indicator_ie(tvbuff_t *, int, int, proto_tree *); -extern void dissect_q931_high_layer_compat_ie(tvbuff_t *, int, int, +WS_DLL_PUBLIC void dissect_q931_high_layer_compat_ie(tvbuff_t *, int, int, proto_tree *); extern void dissect_q931_user_user_ie(tvbuff_t *tvb, packet_info *pinfo, int offset, int len, @@ -57,8 +59,8 @@ typedef struct _q931_packet_info { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT value_string_ext q931_cause_code_vals_ext; -WS_VAR_IMPORT const value_string q931_message_type_vals[]; +WS_DLL_PUBLIC value_string_ext q931_cause_code_vals_ext; +WS_DLL_PUBLIC const value_string q931_message_type_vals[]; extern value_string_ext q931_protocol_discriminator_vals_ext; extern value_string_ext q931_progress_description_vals_ext; diff --git a/epan/dissectors/packet-q932.h b/epan/dissectors/packet-q932.h index 8bbfb480ed..3c7097f726 100644 --- a/epan/dissectors/packet-q932.h +++ b/epan/dissectors/packet-q932.h @@ -96,11 +96,11 @@ static const value_string q932_ScreeningIndicator_vals[] = { }; extern int dissect_q932_PresentedAddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); extern int dissect_q932_PresentedAddressUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -extern int dissect_q932_PresentedNumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -extern int dissect_q932_PresentedNumberUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_q932_PresentedNumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_q932_PresentedNumberUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); extern int dissect_q932_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -extern int dissect_q932_PartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); -extern int dissect_q932_PartySubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_q932_PartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_q932_PartySubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); extern int dissect_q932_ScreeningIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); extern int dissect_q932_PresentationAllowedIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); diff --git a/epan/dissectors/packet-qsig.h b/epan/dissectors/packet-qsig.h index af9ddbcb8a..f73e23270e 100644 --- a/epan/dissectors/packet-qsig.h +++ b/epan/dissectors/packet-qsig.h @@ -53,7 +53,7 @@ static const value_string qsig_na_Name_vals[] = { { 2, "nameNotAvailable" }, { 0, NULL } }; -extern int dissect_qsig_na_Name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); +WS_DLL_PUBLIC int dissect_qsig_na_Name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); /* --- Module Call-Diversion-Operations-asn1-97 --- --- --- */ diff --git a/epan/dissectors/packet-raw.h b/epan/dissectors/packet-raw.h index 66ec75aac6..7dfb7aa753 100644 --- a/epan/dissectors/packet-raw.h +++ b/epan/dissectors/packet-raw.h @@ -24,6 +24,9 @@ #ifndef __PACKET_RAW_H__ #define __PACKET_RAW_H__ +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void capture_raw(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-rpc.h b/epan/dissectors/packet-rpc.h index 82711f7a94..25c502833b 100644 --- a/epan/dissectors/packet-rpc.h +++ b/epan/dissectors/packet-rpc.h @@ -29,6 +29,7 @@ #include #include #include +#include "ws_symbol_export.h" #define RPC_CALL 0 #define RPC_REPLY 1 @@ -140,18 +141,19 @@ typedef struct _vsff { extern const value_string rpc_auth_flavor[]; -extern void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table, +WS_DLL_PUBLIC void rpc_init_proc_table(guint prog, guint vers, const vsff *proc_table, int procedure_hf); -extern void rpc_init_prog(int proto, guint32 prog, int ett); -extern const char *rpc_prog_name(guint32 prog); -extern const char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc); -extern int rpc_prog_hf(guint32 prog, guint32 vers); +WS_DLL_PUBLIC void rpc_init_prog(int proto, guint32 prog, int ett); +WS_DLL_PUBLIC const char *rpc_prog_name(guint32 prog); +WS_DLL_PUBLIC const char *rpc_proc_name(guint32 prog, guint32 vers, guint32 proc); +WS_DLL_PUBLIC int rpc_prog_hf(guint32 prog, guint32 vers); -extern unsigned int rpc_roundup(unsigned int a); -extern int dissect_rpc_bool(tvbuff_t *tvb, +WS_DLL_PUBLIC unsigned int rpc_roundup(unsigned int a); +WS_DLL_PUBLIC int dissect_rpc_bool(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); -extern int dissect_rpc_string(tvbuff_t *tvb, +WS_DLL_PUBLIC int dissect_rpc_string(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset, const char **string_buffer_ret); +WS_DLL_PUBLIC int dissect_rpc_opaque_data(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo, @@ -159,25 +161,25 @@ int dissect_rpc_opaque_data(tvbuff_t *tvb, int offset, gboolean fixed_length, guint32 length, gboolean string_data, const char **string_buffer_ret, dissect_function_t *dissect_it); -extern int dissect_rpc_data(tvbuff_t *tvb, +WS_DLL_PUBLIC int dissect_rpc_data(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); -extern int dissect_rpc_bytes(tvbuff_t *tvb, +WS_DLL_PUBLIC int dissect_rpc_bytes(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset, guint32 length, gboolean string_data, const char **string_buffer_ret); -extern int dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC int dissect_rpc_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, dissect_function_t *rpc_list_dissector); -extern int dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC int dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, dissect_function_t *rpc_array_dissector, int hfindex); -extern int dissect_rpc_uint32(tvbuff_t *tvb, +WS_DLL_PUBLIC int dissect_rpc_uint32(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); -extern int dissect_rpc_uint64(tvbuff_t *tvb, +WS_DLL_PUBLIC int dissect_rpc_uint64(tvbuff_t *tvb, proto_tree *tree, int hfindex, int offset); -extern int dissect_rpc_indir_call(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC int dissect_rpc_indir_call(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int args_id, guint32 prog, guint32 vers, guint32 proc); -extern int dissect_rpc_indir_reply(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC int dissect_rpc_indir_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int result_id, int prog_id, int vers_id, int proc_id); @@ -197,7 +199,7 @@ typedef struct _rpc_prog_info_value { /* rpc_progs is also used in tap. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT GHashTable *rpc_progs; +WS_DLL_PUBLIC GHashTable *rpc_progs; typedef struct _rpc_proc_info_key { guint32 prog; @@ -214,7 +216,7 @@ typedef struct _rpc_proc_info_value { /* rpc_procs is also used in tap. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT GHashTable *rpc_procs; +WS_DLL_PUBLIC GHashTable *rpc_procs; #endif /* packet-rpc.h */ diff --git a/epan/dissectors/packet-rtcp.h b/epan/dissectors/packet-rtcp.h index 77bcafad6b..8d549559f4 100644 --- a/epan/dissectors/packet-rtcp.h +++ b/epan/dissectors/packet-rtcp.h @@ -27,6 +27,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + /* Info to save in RTCP conversation / packet-info. Note that this structure applies to the destination end of an RTP session */ @@ -56,12 +58,14 @@ struct _rtcp_conversation_info /* Add an RTCP conversation with the given details */ +WS_DLL_PUBLIC void rtcp_add_address(packet_info *pinfo, address *addr, int port, int other_port, const gchar *setup_method, guint32 setup_frame_number); /* Add an SRTP conversation with the given details */ +WS_DLL_PUBLIC void srtcp_add_address(packet_info *pinfo, address *addr, int port, int other_port, diff --git a/epan/dissectors/packet-rtp.h b/epan/dissectors/packet-rtp.h index 72722b2e4f..a950675eb5 100644 --- a/epan/dissectors/packet-rtp.h +++ b/epan/dissectors/packet-rtp.h @@ -27,6 +27,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + struct _rtp_info { unsigned int info_version; gboolean info_padding_set; @@ -122,6 +124,7 @@ typedef struct { } encoding_name_and_rate_t; /* Add an RTP conversation with the given details */ +WS_DLL_PUBLIC void rtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, @@ -131,6 +134,7 @@ void rtp_add_address(packet_info *pinfo, GHashTable *rtp_dyn_payload); /* Add an SRTP conversation with the given details */ +WS_DLL_PUBLIC void srtp_add_address(packet_info *pinfo, address *addr, int port, int other_port, @@ -141,5 +145,6 @@ void srtp_add_address(packet_info *pinfo, struct srtp_info *srtp_info); /* Free and destroy the dyn_payload hash table */ +WS_DLL_PUBLIC void rtp_free_hash_dyn_payload(GHashTable *rtp_dyn_payload); diff --git a/epan/dissectors/packet-rtsp.h b/epan/dissectors/packet-rtsp.h index 80da473a14..924c0c66b7 100644 --- a/epan/dissectors/packet-rtsp.h +++ b/epan/dissectors/packet-rtsp.h @@ -35,6 +35,6 @@ typedef struct _rtsp_info_value_t { gchar *request_uri; } rtsp_info_value_t; -WS_VAR_IMPORT const value_string rtsp_status_code_vals[]; +WS_DLL_PUBLIC const value_string rtsp_status_code_vals[]; #endif /* __PACKET_RTSP_H__ */ diff --git a/epan/dissectors/packet-s1ap.h b/epan/dissectors/packet-s1ap.h index 9c6c37ca62..745cc50228 100644 --- a/epan/dissectors/packet-s1ap.h +++ b/epan/dissectors/packet-s1ap.h @@ -36,11 +36,11 @@ /*--- Included file: packet-s1ap-exp.h ---*/ #line 1 "../../asn1/s1ap/packet-s1ap-exp.h" -WS_VAR_IMPORT const value_string s1ap_CauseMisc_vals[]; -WS_VAR_IMPORT const value_string s1ap_CauseProtocol_vals[]; -WS_VAR_IMPORT const value_string s1ap_CauseRadioNetwork_vals[]; -WS_VAR_IMPORT const value_string s1ap_CauseTransport_vals[]; -WS_VAR_IMPORT const value_string s1ap_CauseNas_vals[]; +WS_DLL_PUBLIC const value_string s1ap_CauseMisc_vals[]; +WS_DLL_PUBLIC const value_string s1ap_CauseProtocol_vals[]; +WS_DLL_PUBLIC const value_string s1ap_CauseRadioNetwork_vals[]; +WS_DLL_PUBLIC const value_string s1ap_CauseTransport_vals[]; +WS_DLL_PUBLIC const value_string s1ap_CauseNas_vals[]; extern const value_string s1ap_SONtransferRequestContainer_vals[]; extern const value_string s1ap_SONtransferResponseContainer_vals[]; int dissect_s1ap_Global_ENB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); diff --git a/epan/dissectors/packet-sccp.h b/epan/dissectors/packet-sccp.h index 447fc54683..6cf6461791 100644 --- a/epan/dissectors/packet-sccp.h +++ b/epan/dissectors/packet-sccp.h @@ -25,6 +25,8 @@ #ifndef __PACKET_SCCP_H #define __PACKET_SCCP_H +#include "ws_symbol_export.h" + #define SCCP_MSG_TYPE_CR 0x01 #define SCCP_MSG_TYPE_CC 0x02 #define SCCP_MSG_TYPE_CREF 0x03 @@ -46,15 +48,15 @@ #define SCCP_MSG_TYPE_LUDT 0x13 #define SCCP_MSG_TYPE_LUDTS 0x14 -WS_VAR_IMPORT const value_string sccp_message_type_acro_values[]; -WS_VAR_IMPORT const value_string sccp_release_cause_values[]; -WS_VAR_IMPORT const value_string sccp_return_cause_values[]; -WS_VAR_IMPORT const value_string sccp_reset_cause_values[]; -WS_VAR_IMPORT const value_string sccp_error_cause_values[]; -WS_VAR_IMPORT const value_string sccp_refusal_cause_values[]; +WS_DLL_PUBLIC const value_string sccp_message_type_acro_values[]; +WS_DLL_PUBLIC const value_string sccp_release_cause_values[]; +WS_DLL_PUBLIC const value_string sccp_return_cause_values[]; +WS_DLL_PUBLIC const value_string sccp_reset_cause_values[]; +WS_DLL_PUBLIC const value_string sccp_error_cause_values[]; +WS_DLL_PUBLIC const value_string sccp_refusal_cause_values[]; /* from packet-sua.c */ -WS_VAR_IMPORT const value_string sua_co_class_type_acro_values[]; +WS_DLL_PUBLIC const value_string sua_co_class_type_acro_values[]; typedef enum _sccp_payload_t { SCCP_PLOAD_NONE, @@ -112,6 +114,6 @@ extern gboolean looks_like_valid_sccp(guint32 frame_num, tvbuff_t *tvb, guint8 m #define GT_EVEN_SIGNAL_MASK 0xf0 #define GT_EVEN_SIGNAL_SHIFT 4 #define GT_MAX_SIGNALS (32*7) /* it's a bit big, but it allows for adding a lot of "(spare)" and "Unknown" values (7 chars) if there are errors - e.g. ANSI vs ITU wrongly selected */ -WS_VAR_IMPORT const value_string sccp_address_signal_values[]; +WS_DLL_PUBLIC const value_string sccp_address_signal_values[]; #endif diff --git a/epan/dissectors/packet-scsi-osd.h b/epan/dissectors/packet-scsi-osd.h index f1e8688057..08237216e8 100644 --- a/epan/dissectors/packet-scsi-osd.h +++ b/epan/dissectors/packet-scsi-osd.h @@ -25,10 +25,12 @@ #ifndef __PACKET_SCSI_OSD_H_ #define __PACKET_SCSI_OSD_H_ +#include "ws_symbol_export.h" + #define SCSI_OSD_OPCODE 0x7f extern int hf_scsi_osd_opcode; extern scsi_cdb_table_t scsi_osd_table[256]; -WS_VAR_IMPORT const value_string scsi_osd_vals[]; +WS_DLL_PUBLIC const value_string scsi_osd_vals[]; #endif diff --git a/epan/dissectors/packet-scsi-sbc.h b/epan/dissectors/packet-scsi-sbc.h index 974d0f6185..03933d674a 100644 --- a/epan/dissectors/packet-scsi-sbc.h +++ b/epan/dissectors/packet-scsi-sbc.h @@ -29,6 +29,8 @@ #ifndef __PACKET_SCSI_SBC_H_ #define __PACKET_SCSI_SBC_H_ +#include "ws_symbol_export.h" + /* SBC Commands */ #define SCSI_SBC_FORMATUNIT 0x04 #define SCSI_SBC_LOCKUNLKCACHE10 0x36 @@ -94,6 +96,6 @@ void dissect_sbc_readcapacity10 (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr extern int hf_scsi_sbc_opcode; extern scsi_cdb_table_t scsi_sbc_table[256]; -WS_VAR_IMPORT const value_string scsi_sbc_vals[]; +WS_DLL_PUBLIC const value_string scsi_sbc_vals[]; #endif diff --git a/epan/dissectors/packet-scsi-smc.h b/epan/dissectors/packet-scsi-smc.h index 6eaa76eebe..b512ef367a 100644 --- a/epan/dissectors/packet-scsi-smc.h +++ b/epan/dissectors/packet-scsi-smc.h @@ -29,6 +29,8 @@ #ifndef __PACKET_SCSI_SMC_H_ #define __PACKET_SCSI_SMC_H_ +#include "ws_symbol_export.h" + /* SMC Commands */ #define SCSI_SMC_EXCHANGE_MEDIUM 0x40 #define SCSI_SMC_INITIALIZE_ELEMENT_STATUS 0x07 @@ -50,6 +52,6 @@ void dissect_smc_readelementstatus (tvbuff_t *tvb, packet_info *pinfo, proto_tre extern int hf_scsi_smc_opcode; extern scsi_cdb_table_t scsi_smc_table[256]; -WS_VAR_IMPORT const value_string scsi_smc_vals[]; +WS_DLL_PUBLIC const value_string scsi_smc_vals[]; #endif diff --git a/epan/dissectors/packet-scsi-ssc.h b/epan/dissectors/packet-scsi-ssc.h index 64f4a566ed..5166cb088d 100644 --- a/epan/dissectors/packet-scsi-ssc.h +++ b/epan/dissectors/packet-scsi-ssc.h @@ -29,6 +29,8 @@ #ifndef __PACKET_SCSI_SSC_H_ #define __PACKET_SCSI_SSC_H_ +#include "ws_symbol_export.h" + /* SSC Commands */ #define SCSI_SSC_REWIND 0x01 #define SCSI_SSC_FORMAT_MEDIUM 0x04 @@ -57,6 +59,6 @@ extern int hf_scsi_ssc_opcode; extern scsi_cdb_table_t scsi_ssc_table[256]; -WS_VAR_IMPORT const value_string scsi_ssc_vals[]; +WS_DLL_PUBLIC const value_string scsi_ssc_vals[]; #endif diff --git a/epan/dissectors/packet-scsi.h b/epan/dissectors/packet-scsi.h index 7a3e3b5c09..2b7fe5133e 100644 --- a/epan/dissectors/packet-scsi.h +++ b/epan/dissectors/packet-scsi.h @@ -25,6 +25,7 @@ #ifndef __PACKET_SCSI_H_ #define __PACKET_SCSI_H_ +#include "ws_symbol_export.h" /* Structure containing itl nexus data : * The itlq nexus is a structure containing data specific @@ -212,7 +213,7 @@ void dissect_scsi_snsinfo (tvbuff_t *, packet_info *, proto_tree *, guint, guint void dissect_scsi_lun(proto_tree *, tvbuff_t *, guint); -WS_VAR_IMPORT const value_string scsi_mmc_vals[]; +WS_DLL_PUBLIC const value_string scsi_mmc_vals[]; extern const int *cdb_control_fields[6]; extern gint ett_scsi_control; diff --git a/epan/dissectors/packet-sll.h b/epan/dissectors/packet-sll.h index 3951431d5e..75e813baa7 100644 --- a/epan/dissectors/packet-sll.h +++ b/epan/dissectors/packet-sll.h @@ -24,6 +24,8 @@ #ifndef __PACKET_SLL_H__ #define __PACKET_SLL_H__ +#include "ws_symbol_export.h" + /* * The LINUX_SLL_ values for "sll_protocol". */ @@ -35,6 +37,7 @@ #define LINUX_SLL_P_IRDA_LAP 0x0017 /* IrDA Link Access Protocol */ #define LINUX_SLL_P_IEEE802154 0x00f6 /* 802.15.4 on monitor inteface */ +WS_DLL_PUBLIC void capture_sll(const guchar *, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-smb-sidsnooping.h b/epan/dissectors/packet-smb-sidsnooping.h index 4fb97431e9..f5970a9924 100644 --- a/epan/dissectors/packet-smb-sidsnooping.h +++ b/epan/dissectors/packet-smb-sidsnooping.h @@ -26,16 +26,19 @@ #ifndef _PACKET_SMB_SID_SNOOPING_H_ #define _PACKET_SMB_SID_SNOOPING_H_ +#include "ws_symbol_export.h" + /* With MSVC and a libwireshark.dll, we need a * special declaration for sid_name_table. */ -WS_VAR_IMPORT GHashTable *sid_name_table; +WS_DLL_PUBLIC GHashTable *sid_name_table; typedef struct _sid_name { char *sid; char *name; } sid_name; +WS_DLL_PUBLIC char *find_sid_name(char *sid); #endif diff --git a/epan/dissectors/packet-smb.h b/epan/dissectors/packet-smb.h index e29dbf0e91..074526f6b0 100644 --- a/epan/dissectors/packet-smb.h +++ b/epan/dissectors/packet-smb.h @@ -26,15 +26,17 @@ #ifndef __PACKET_SMB_H__ #define __PACKET_SMB_H__ +#include "ws_symbol_export.h" -WS_VAR_IMPORT gboolean sid_name_snooping; + +WS_DLL_PUBLIC gboolean sid_name_snooping; /* SMB command codes, from the SNIA CIFS spec. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT value_string_ext smb_cmd_vals_ext; -WS_VAR_IMPORT value_string_ext trans2_cmd_vals_ext; -WS_VAR_IMPORT value_string_ext nt_cmd_vals_ext; +WS_DLL_PUBLIC value_string_ext smb_cmd_vals_ext; +WS_DLL_PUBLIC value_string_ext trans2_cmd_vals_ext; +WS_DLL_PUBLIC value_string_ext nt_cmd_vals_ext; #define SMB_COM_CREATE_DIRECTORY 0x00 @@ -194,7 +196,7 @@ typedef struct _smb_eo_t { } smb_eo_t; /* Strings that describes the SMB object type */ -WS_VAR_IMPORT const value_string smb_fid_types[]; +WS_DLL_PUBLIC const value_string smb_fid_types[]; /* the information we need to keep around for NT transatcion commands */ typedef struct { diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h index efed5c41bb..61c9e440fb 100644 --- a/epan/dissectors/packet-smb2.h +++ b/epan/dissectors/packet-smb2.h @@ -28,7 +28,7 @@ /* SMB2 command codes. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT value_string_ext smb2_cmd_vals_ext; +WS_DLL_PUBLIC value_string_ext smb2_cmd_vals_ext; /* Structure to keep track of information specific to a single * SMB2 transaction. Here we store things we need to remember between diff --git a/epan/dissectors/packet-ssl-utils.h b/epan/dissectors/packet-ssl-utils.h index 8e2959ec80..ee47a63e6c 100644 --- a/epan/dissectors/packet-ssl-utils.h +++ b/epan/dissectors/packet-ssl-utils.h @@ -38,6 +38,7 @@ #include #include +#include "ws_symbol_export.h" /* #define SSL_FAST 1 */ #define SSL_DECRYPT_DEBUG @@ -411,7 +412,7 @@ ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd); /** Deallocate the memory used for specified key @param key pointer to the key to be freed */ -extern void +void ssl_free_key(Ssl_private_key_t* key); /* Find private key in associations */ diff --git a/epan/dissectors/packet-ssl.h b/epan/dissectors/packet-ssl.h index 14b34ac6ff..217ed778de 100644 --- a/epan/dissectors/packet-ssl.h +++ b/epan/dissectors/packet-ssl.h @@ -25,12 +25,14 @@ #ifndef __PACKET_SSL_H__ #define __PACKET_SSL_H__ -WS_VAR_IMPORT GHashTable *ssl_session_hash; +#include "ws_symbol_export.h" -extern void ssl_dissector_add(guint port, const gchar *protocol, gboolean tcp); -extern void ssl_dissector_delete(guint port, const gchar *protocol, gboolean tcp); +WS_DLL_PUBLIC GHashTable *ssl_session_hash; -extern void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_cli, +WS_DLL_PUBLIC void ssl_dissector_add(guint port, const gchar *protocol, gboolean tcp); +WS_DLL_PUBLIC void ssl_dissector_delete(guint port, const gchar *protocol, gboolean tcp); + +WS_DLL_PUBLIC void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_cli, port_type ptype, guint32 port_srv, guint32 port_cli, guint32 version, gint cipher, const guchar *_master_secret, const guchar *_client_random, const guchar *_server_random, diff --git a/epan/dissectors/packet-t30.h b/epan/dissectors/packet-t30.h index 6537efeab6..0f2daee7e4 100644 --- a/epan/dissectors/packet-t30.h +++ b/epan/dissectors/packet-t30.h @@ -25,5 +25,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -WS_VAR_IMPORT const value_string t30_facsimile_control_field_vals[]; -WS_VAR_IMPORT const value_string t30_facsimile_control_field_vals_short[]; +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC const value_string t30_facsimile_control_field_vals[]; +WS_DLL_PUBLIC const value_string t30_facsimile_control_field_vals_short[]; diff --git a/epan/dissectors/packet-t38.h b/epan/dissectors/packet-t38.h index 936a96d4d2..7a48f7016a 100644 --- a/epan/dissectors/packet-t38.h +++ b/epan/dissectors/packet-t38.h @@ -33,6 +33,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + #define MAX_T38_DATA_ITEMS 4 #define MAX_T38_DESC 128 @@ -80,6 +82,7 @@ typedef struct _t38_conv } t38_conv; /* Add an T38 conversation with the given details */ +WS_DLL_PUBLIC void t38_add_address(packet_info *pinfo, address *addr, int port, int other_port, @@ -89,11 +92,11 @@ void t38_add_address(packet_info *pinfo, /*--- Included file: packet-t38-exp.h ---*/ #line 1 "../../asn1/t38/packet-t38-exp.h" -WS_VAR_IMPORT const value_string t38_T30_indicator_vals[]; -WS_VAR_IMPORT const value_string t38_T30_data_vals[]; +WS_DLL_PUBLIC const value_string t38_T30_indicator_vals[]; +WS_DLL_PUBLIC const value_string t38_T30_data_vals[]; /*--- End of included file: packet-t38-exp.h ---*/ -#line 82 "../../asn1/t38/packet-t38-template.h" +#line 85 "../../asn1/t38/packet-t38-template.h" diff --git a/epan/dissectors/packet-tcap.h b/epan/dissectors/packet-tcap.h index 9885023b9b..1e3718317c 100644 --- a/epan/dissectors/packet-tcap.h +++ b/epan/dissectors/packet-tcap.h @@ -34,6 +34,9 @@ #ifndef PACKET_tcap_H #define PACKET_tcap_H + +#include "ws_symbol_export.h" + /* TCAP component type */ #define TCAP_COMP_INVOKE 0xa1 #define TCAP_COMP_RRL 0xa2 @@ -85,10 +88,10 @@ extern dissector_handle_t get_itu_tcap_subdissector(guint32 ssn); dissector_handle_t get_ansi_tcap_subdissector(guint32 ssn); extern void add_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -extern void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void add_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); extern void delete_ansi_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); -extern void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); +WS_DLL_PUBLIC void delete_itu_tcap_subdissector(guint32 ssn, dissector_handle_t dissector); extern void call_tcap_dissector(dissector_handle_t, tvbuff_t*, packet_info*, proto_tree*); @@ -101,6 +104,6 @@ int dissect_tcap_UniDialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in int dissect_tcap_DialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); /*--- End of included file: packet-tcap-exp.h ---*/ -#line 88 "../../asn1/tcap/packet-tcap-template.h" +#line 91 "../../asn1/tcap/packet-tcap-template.h" #endif /* PACKET_tcap_H */ diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h index f2e7e92a91..2351d9b376 100644 --- a/epan/dissectors/packet-tcp.h +++ b/epan/dissectors/packet-tcp.h @@ -24,6 +24,8 @@ #ifndef __PACKET_TCP_H__ #define __PACKET_TCP_H__ +#include "ws_symbol_export.h" + #ifndef __CONVERSATION_H__ #include #endif @@ -101,7 +103,7 @@ struct tcpinfo { * * "dissect_pdu()" is the routine to dissect a PDU. */ -extern void +WS_DLL_PUBLIC void tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean proto_desegment, guint fixed_len, guint (*get_pdu_len)(packet_info *, tvbuff_t *, int), diff --git a/epan/dissectors/packet-tetra.c b/epan/dissectors/packet-tetra.c index 36a1703734..12736c6cf9 100644 --- a/epan/dissectors/packet-tetra.c +++ b/epan/dissectors/packet-tetra.c @@ -10530,7 +10530,7 @@ void proto_register_tetra (void) FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_tetra_type2_existance, - { "type2-existence", "tetra.type2_existence", + { "type2-existance", "tetra.type2_existance", FT_BOOLEAN, BASE_NONE, NULL, 0, "BOOLEAN", HFILL }}, { &hf_tetra_type3_identifier, diff --git a/epan/dissectors/packet-tpkt.h b/epan/dissectors/packet-tpkt.h index adb779d393..668fae2287 100644 --- a/epan/dissectors/packet-tpkt.h +++ b/epan/dissectors/packet-tpkt.h @@ -26,6 +26,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "ws_symbol_export.h" + /* * Check whether this could be a TPKT-encapsulated PDU. * Returns -1 if it's not, and the PDU length from the TPKT header @@ -37,12 +39,12 @@ */ static const int TEXT_LAYER_LENGTH = 9; -extern int is_tpkt(tvbuff_t *tvb, int min_len); +WS_DLL_PUBLIC int is_tpkt(tvbuff_t *tvb, int min_len); /* * Dissect TPKT-encapsulated data in a TCP stream. */ -extern void dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, +WS_DLL_PUBLIC void dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean desegment, dissector_handle_t subdissector_handle); diff --git a/epan/dissectors/packet-tr.h b/epan/dissectors/packet-tr.h index 391bb0ac72..5b679b3d0c 100644 --- a/epan/dissectors/packet-tr.h +++ b/epan/dissectors/packet-tr.h @@ -24,6 +24,8 @@ #ifndef __PACKET_TR_H__ #define __PACKET_TR_H__ +#include "ws_symbol_export.h" + typedef struct _tr_hdr { guint8 ac; guint8 fc; @@ -31,6 +33,7 @@ typedef struct _tr_hdr { address src; } tr_hdr; +WS_DLL_PUBLIC void capture_tr(const guchar *, int, int, packet_counts *); #endif diff --git a/epan/dissectors/packet-windows-common.h b/epan/dissectors/packet-windows-common.h index 46c5fe370e..cfbbcc0253 100644 --- a/epan/dissectors/packet-windows-common.h +++ b/epan/dissectors/packet-windows-common.h @@ -25,6 +25,8 @@ #ifndef __PACKET_WINDOWS_COMMON_H__ #define __PACKET_WINDOWS_COMMON_H__ +#include "ws_symbol_export.h" + /* Win32 errors. * These defines specify the WERR error codes often encountered in ms DCE/RPC * interfaces (those that do not return NT status that is) @@ -201,6 +203,7 @@ extern const value_string NT_errors[]; extern const value_string ms_country_codes[]; +WS_DLL_PUBLIC int dissect_nt_64bit_time(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_date); @@ -221,6 +224,7 @@ typedef struct _sid_strings { * field, it will just pass a FT_STRING hf field here */ +WS_DLL_PUBLIC int dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const char *name, char **sid_str, int hf_sid); diff --git a/epan/dissectors/packet-wsp.h b/epan/dissectors/packet-wsp.h index 6170d844e7..afafed666f 100644 --- a/epan/dissectors/packet-wsp.h +++ b/epan/dissectors/packet-wsp.h @@ -30,6 +30,7 @@ #ifndef __PACKET_WSP_H__ #define __PACKET_WSP_H__ +#include "ws_symbol_export.h" /* These reason codes are used in the WTP dissector as the WTP user is * assumed to be WSP */ @@ -40,8 +41,8 @@ extern value_string_ext vals_wsp_reason_codes_ext; * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT value_string_ext wsp_vals_pdu_type_ext; -WS_VAR_IMPORT value_string_ext wsp_vals_status_ext; +WS_DLL_PUBLIC value_string_ext wsp_vals_pdu_type_ext; +WS_DLL_PUBLIC value_string_ext wsp_vals_status_ext; /* * exported functionality */ diff --git a/epan/dissectors/packet-xml.h b/epan/dissectors/packet-xml.h index ae76465ed1..be9a2334c6 100644 --- a/epan/dissectors/packet-xml.h +++ b/epan/dissectors/packet-xml.h @@ -24,6 +24,8 @@ #ifndef __PACKET_XML_H__ #define __PACKET_XML_H__ +#include "ws_symbol_export.h" + typedef struct _xml_ns_t { /* the name of this namespace */ gchar* name; @@ -78,8 +80,11 @@ typedef struct _xml_frame_t { int start_offset; } xml_frame_t; +WS_DLL_PUBLIC xml_frame_t *xml_get_tag(xml_frame_t *frame, const gchar *name); +WS_DLL_PUBLIC xml_frame_t *xml_get_attrib(xml_frame_t *frame, const gchar *name); +WS_DLL_PUBLIC xml_frame_t *xml_get_cdata(xml_frame_t *frame); #endif /* __PACKET_XML_H__ */ diff --git a/epan/dissectors/packet-xmpp-utils.h b/epan/dissectors/packet-xmpp-utils.h index 2addfe4509..3e46d7b8a4 100644 --- a/epan/dissectors/packet-xmpp-utils.h +++ b/epan/dissectors/packet-xmpp-utils.h @@ -26,6 +26,8 @@ #ifndef XMPP_UTILS_H #define XMPP_UTILS_H +#include "ws_symbol_export.h" + #define xmpp_elem_cdata(elem) \ elem->data?elem->data->value:"" diff --git a/epan/eap.h b/epan/eap.h index 0ce8f651f5..1854335d44 100644 --- a/epan/eap.h +++ b/epan/eap.h @@ -26,6 +26,8 @@ #ifndef __EAP_H__ #define __EAP_H__ +#include "ws_symbol_export.h" + /* http://www.iana.org/assignments/eap-numbers */ #define EAP_REQUEST 1 #define EAP_RESPONSE 2 @@ -34,7 +36,7 @@ #define EAP_INITIATE 5 /* [RFC5296] */ #define EAP_FINISH 6 /* [RFC5296] */ -WS_VAR_IMPORT const value_string eap_code_vals[]; +WS_DLL_PUBLIC const value_string eap_code_vals[]; #define EAP_TYPE_ID 1 #define EAP_TYPE_NOTIFY 2 @@ -51,7 +53,7 @@ WS_VAR_IMPORT const value_string eap_code_vals[]; #define EAP_TYPE_AKA_PRIME 50 #define EAP_TYPE_EXT 254 -WS_VAR_IMPORT value_string_ext eap_type_vals_ext; +WS_DLL_PUBLIC value_string_ext eap_type_vals_ext; #define SIM_START 10 #define SIM_CHALLENGE 11 @@ -59,7 +61,7 @@ WS_VAR_IMPORT value_string_ext eap_type_vals_ext; #define SIM_RE_AUTHENTICATION 13 #define SIM_CLIENT_ERROR 14 -WS_VAR_IMPORT const value_string eap_sim_subtype_vals[]; +WS_DLL_PUBLIC const value_string eap_sim_subtype_vals[]; #define AKA_CHALLENGE 1 #define AKA_AUTHENTICATION_REJECT 2 @@ -69,7 +71,7 @@ WS_VAR_IMPORT const value_string eap_sim_subtype_vals[]; #define AKA_REAUTHENTICATION 13 #define AKA_CLIENT_ERROR 14 -WS_VAR_IMPORT const value_string eap_aka_subtype_vals[]; +WS_DLL_PUBLIC const value_string eap_aka_subtype_vals[]; #define MS_CHAP_V2_CHALLENGE 1 #define MS_CHAP_V2_RESPONSE 2 @@ -77,6 +79,6 @@ WS_VAR_IMPORT const value_string eap_aka_subtype_vals[]; #define MS_CHAP_V2_FAILURE 4 #define MS_CHAP_V2_CHANGE_PASSWORD 7 -WS_VAR_IMPORT const value_string eap_ms_chap_v2_opcode_vals[]; +WS_DLL_PUBLIC const value_string eap_ms_chap_v2_opcode_vals[]; #endif diff --git a/epan/emem.h b/epan/emem.h index e3b5f37c6f..54f429dd16 100644 --- a/epan/emem.h +++ b/epan/emem.h @@ -26,12 +26,15 @@ #ifndef __EMEM_H__ #define __EMEM_H__ +#include "ws_symbol_export.h" + /** @file */ /** Initialize all the memory allocation pools described below. * This function must be called once when *shark initialize to set up the * required structures. */ +WS_DLL_PUBLIC void emem_init(void); /* Functions for handling memory allocation and garbage collection with @@ -47,27 +50,35 @@ void emem_init(void); */ /** Allocate memory with a packet lifetime scope */ +WS_DLL_PUBLIC void *ep_alloc(size_t size) G_GNUC_MALLOC; #define ep_new(type) ((type*)ep_alloc(sizeof(type))) /** Allocate memory with a packet lifetime scope and fill it with zeros*/ +WS_DLL_PUBLIC void* ep_alloc0(size_t size) G_GNUC_MALLOC; #define ep_new0(type) ((type*)ep_alloc0(sizeof(type))) /** Duplicate a string with a packet lifetime scope */ +WS_DLL_PUBLIC gchar* ep_strdup(const gchar* src) G_GNUC_MALLOC; /** Duplicate at most n characters of a string with a packet lifetime scope */ +WS_DLL_PUBLIC gchar* ep_strndup(const gchar* src, size_t len) G_GNUC_MALLOC; /** Duplicate a buffer with a packet lifetime scope */ +WS_DLL_PUBLIC void* ep_memdup(const void* src, size_t len) G_GNUC_MALLOC; /** Create a formatted string with a packet lifetime scope */ +WS_DLL_PUBLIC gchar* ep_strdup_vprintf(const gchar* fmt, va_list ap) G_GNUC_MALLOC; +WS_DLL_PUBLIC gchar* ep_strdup_printf(const gchar* fmt, ...) G_GNUC_MALLOC G_GNUC_PRINTF(1, 2); +WS_DLL_PUBLIC gchar *ep_strconcat(const gchar *string, ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; /** allocates with a packet lifetime scope an array of type made of num elements */ @@ -85,6 +96,7 @@ gchar *ep_strconcat(const gchar *string, ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINAT * * The vector and all the strings are allocated with packet lifetime scope */ +WS_DLL_PUBLIC gchar** ep_strsplit(const gchar* string, const gchar* delimiter, int max_tokens); /** release all memory allocated in the previous packet dissection */ @@ -104,16 +116,19 @@ struct _ep_stack_frame_t { /** * creates an empty stack with a packet lifetime scope */ +WS_DLL_PUBLIC ep_stack_t ep_stack_new(void) G_GNUC_MALLOC; /** * pushes item into stack, returns item */ +WS_DLL_PUBLIC void* ep_stack_push(ep_stack_t stack, void* item); /** * pops an item from the stack */ +WS_DLL_PUBLIC void* ep_stack_pop(ep_stack_t stack); /** @@ -134,24 +149,31 @@ void* ep_stack_pop(ep_stack_t stack); */ /** Allocate memory with a capture lifetime scope */ +WS_DLL_PUBLIC void *se_alloc(size_t size) G_GNUC_MALLOC; #define se_new(type) ((type*)se_alloc(sizeof(type))) /** Allocate memory with a capture lifetime scope and fill it with zeros*/ +WS_DLL_PUBLIC void* se_alloc0(size_t size) G_GNUC_MALLOC; #define se_new0(type) ((type*)se_alloc0(sizeof(type))) /** Duplicate a string with a capture lifetime scope */ +WS_DLL_PUBLIC gchar* se_strdup(const gchar* src) G_GNUC_MALLOC; /** Duplicate at most n characters of a string with a capture lifetime scope */ +WS_DLL_PUBLIC gchar* se_strndup(const gchar* src, size_t len) G_GNUC_MALLOC; /** Duplicate a buffer with a capture lifetime scope */ +WS_DLL_PUBLIC void* se_memdup(const void* src, size_t len) G_GNUC_MALLOC; /* Create a formatted string with a capture lifetime scope */ +WS_DLL_PUBLIC gchar* se_strdup_vprintf(const gchar* fmt, va_list ap) G_GNUC_MALLOC; +WS_DLL_PUBLIC gchar* se_strdup_printf(const gchar* fmt, ...) G_GNUC_MALLOC G_GNUC_PRINTF(1, 2); @@ -191,11 +213,15 @@ struct ws_memory_slab { void *freed; }; +WS_DLL_PUBLIC void *sl_alloc(struct ws_memory_slab *mem_chunk); +WS_DLL_PUBLIC void *sl_alloc0(struct ws_memory_slab *mem_chunk); +WS_DLL_PUBLIC void sl_free(struct ws_memory_slab *mem_chunk, gpointer ptr); /** release all memory allocated */ +WS_DLL_PUBLIC void sl_free_all(struct ws_memory_slab *mem_chunk); /************************************************************** @@ -241,6 +267,7 @@ typedef struct _emem_tree_t { * * type is : EMEM_TREE_TYPE_RED_BLACK for a standard red/black tree. */ +WS_DLL_PUBLIC emem_tree_t *se_tree_create(int type, const char *name) G_GNUC_MALLOC; /** This function is similar to the se_tree_create() call but with the @@ -252,6 +279,7 @@ emem_tree_t *se_tree_create(int type, const char *name) G_GNUC_MALLOC; * another structure that is also se allocated so that when the structure is * released, the tree will be completely released as well. */ +WS_DLL_PUBLIC emem_tree_t *se_tree_create_non_persistent(int type, const char *name) G_GNUC_MALLOC; /** se_tree_insert32 @@ -304,6 +332,7 @@ emem_tree_t *se_tree_create_non_persistent(int type, const char *name) G_GNUC_MA * ******************************************************************* */ /* These trees have PErmanent allocation scope and will never be released */ +WS_DLL_PUBLIC emem_tree_t *pe_tree_create(int type, const char *name) G_GNUC_MALLOC; #define pe_tree_insert32 emem_tree_insert32 #define pe_tree_lookup32 emem_tree_lookup32 @@ -325,11 +354,13 @@ emem_tree_t *pe_tree_create(int type, const char *name) G_GNUC_MALLOC; * so that it will be released at the same time as the tree itself is * destroyed. */ +WS_DLL_PUBLIC void emem_tree_insert32(emem_tree_t *se_tree, guint32 key, void *data); /** This function will look up a node in the tree indexed by a guint32 integer * value. */ +WS_DLL_PUBLIC void *emem_tree_lookup32(emem_tree_t *se_tree, guint32 key); /** This function will look up a node in the tree indexed by a guint32 integer @@ -338,6 +369,7 @@ void *emem_tree_lookup32(emem_tree_t *se_tree, guint32 key); * equal to or smaller than the search key, or NULL if no such key was * found. */ +WS_DLL_PUBLIC void *emem_tree_lookup32_le(emem_tree_t *se_tree, guint32 key); typedef struct _emem_tree_key_t { @@ -376,11 +408,13 @@ typedef struct _emem_tree_key_t { * fhkey[1].key=nns->fh; * fhkey[2].length=0; */ +WS_DLL_PUBLIC void emem_tree_insert32_array(emem_tree_t *se_tree, emem_tree_key_t *key, void *data); /** This function will look up a node in the tree indexed by a sequence of * guint32 integer values. */ +WS_DLL_PUBLIC void *emem_tree_lookup32_array(emem_tree_t *se_tree, emem_tree_key_t *key); /** This function will look up a node in the tree indexed by a @@ -391,20 +425,24 @@ void *emem_tree_lookup32_array(emem_tree_t *se_tree, emem_tree_key_t *key); * Note: The key returned will be "less" in key order. The usefullness * of the returned node must be verified prior to use. */ +WS_DLL_PUBLIC void *emem_tree_lookup32_array_le(emem_tree_t *se_tree, emem_tree_key_t *key); /** case insensitive strings as keys */ #define EMEM_TREE_STRING_NOCASE 0x00000001 /** Insert a new value under a string key */ +WS_DLL_PUBLIC void emem_tree_insert_string(emem_tree_t* h, const gchar* k, void* v, guint32 flags); /** Lookup the value under a string key */ +WS_DLL_PUBLIC void* emem_tree_lookup_string(emem_tree_t* h, const gchar* k, guint32 flags); /** traverse a tree. if the callback returns TRUE the traversal will end */ typedef gboolean (*tree_foreach_func)(void *value, void *userdata); +WS_DLL_PUBLIC gboolean emem_tree_foreach(emem_tree_t* emem_tree, tree_foreach_func callback, void *user_data); @@ -433,6 +471,7 @@ typedef struct _emem_strbuf_t { * * @return A newly-allocated string buffer. */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_new(const gchar *init) G_GNUC_MALLOC; /** @@ -443,6 +482,7 @@ emem_strbuf_t *ep_strbuf_new(const gchar *init) G_GNUC_MALLOC; * * @return A newly-allocated string buffer. */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_new_label(const gchar *init) G_GNUC_MALLOC; /** @@ -456,6 +496,7 @@ emem_strbuf_t *ep_strbuf_new_label(const gchar *init) G_GNUC_MALLOC; * * @return A newly-allocated string buffer. str will be empty. */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_sized_new(gsize alloc_len, gsize max_alloc_len) G_GNUC_MALLOC; /** @@ -465,6 +506,7 @@ emem_strbuf_t *ep_strbuf_sized_new(gsize alloc_len, gsize max_alloc_len) G_GNUC_ * @param format A printf-style string format. * @param ap The list of arguments to append. */ +WS_DLL_PUBLIC void ep_strbuf_append_vprintf(emem_strbuf_t *strbuf, const gchar *format, va_list ap); /** @@ -473,6 +515,7 @@ void ep_strbuf_append_vprintf(emem_strbuf_t *strbuf, const gchar *format, va_lis * @param strbuf The ep_strbuf-allocated string buffer to set to. * @param format A printf-style string format. */ +WS_DLL_PUBLIC void ep_strbuf_printf(emem_strbuf_t *strbuf, const gchar *format, ...) G_GNUC_PRINTF(2, 3); @@ -482,6 +525,7 @@ void ep_strbuf_printf(emem_strbuf_t *strbuf, const gchar *format, ...) * @param strbuf The ep_strbuf-allocated string buffer to append to. * @param format A printf-style string format. */ +WS_DLL_PUBLIC void ep_strbuf_append_printf(emem_strbuf_t *strbuf, const gchar *format, ...) G_GNUC_PRINTF(2, 3); @@ -493,6 +537,7 @@ void ep_strbuf_append_printf(emem_strbuf_t *strbuf, const gchar *format, ...) * * @return strbuf */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_append(emem_strbuf_t *strbuf, const gchar *str); /** @@ -503,6 +548,7 @@ emem_strbuf_t *ep_strbuf_append(emem_strbuf_t *strbuf, const gchar *str); * * @return strbuf */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_append_c(emem_strbuf_t *strbuf, const gchar c); /** @@ -513,6 +559,7 @@ emem_strbuf_t *ep_strbuf_append_c(emem_strbuf_t *strbuf, const gchar c); * * @return strbuf */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_append_unichar(emem_strbuf_t *strbuf, const gunichar c); /** @@ -523,6 +570,7 @@ emem_strbuf_t *ep_strbuf_append_unichar(emem_strbuf_t *strbuf, const gunichar c) * * @return strbuf */ +WS_DLL_PUBLIC emem_strbuf_t *ep_strbuf_truncate(emem_strbuf_t *strbuf, gsize len); /** diff --git a/epan/epan.h b/epan/epan.h index 492980b7dd..cec8191eb6 100644 --- a/epan/epan.h +++ b/epan/epan.h @@ -32,6 +32,7 @@ extern "C" { #include "frame_data.h" #include "column_info.h" #include "register.h" +#include "ws_symbol_export.h" typedef struct _epan_dissect_t epan_dissect_t; @@ -82,6 +83,7 @@ Ref2 for further edits - delete when done - \ref radiotap */ /** init the whole epan module, this is used to be called only once in a program */ +WS_DLL_PUBLIC void epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_data), void (*register_all_handoffs_func)(register_cb cb, gpointer client_data), register_cb cb, @@ -92,6 +94,7 @@ void epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer clie void (*report_write_failure_fcn_p)(const char *, int)); /** cleanup the whole epan module, this is used to be called only once in a program */ +WS_DLL_PUBLIC void epan_cleanup(void); /** @@ -132,45 +135,54 @@ epan_new(void); void epan_free(epan_t*); -extern const gchar* +WS_DLL_PUBLIC const gchar* epan_get_version(void); /** initialize an existing single packet dissection */ +WS_DLL_PUBLIC epan_dissect_t* epan_dissect_init(epan_dissect_t *edt, const gboolean create_proto_tree, const gboolean proto_tree_visible); /** get a new single packet dissection * should be freed using epan_dissect_free() after packet dissection completed */ +WS_DLL_PUBLIC epan_dissect_t* epan_dissect_new(const gboolean create_proto_tree, const gboolean proto_tree_visible); /** Indicate whether we should fake protocols or not */ +WS_DLL_PUBLIC void epan_dissect_fake_protocols(epan_dissect_t *edt, const gboolean fake_protocols); /** run a single packet dissection */ +WS_DLL_PUBLIC void epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr, const guint8* data, frame_data *fd, column_info *cinfo); +WS_DLL_PUBLIC void epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr, const guint8* data, frame_data *fd, column_info *cinfo); /** Prime a proto_tree using the fields/protocols used in a dfilter. */ +WS_DLL_PUBLIC void epan_dissect_prime_dfilter(epan_dissect_t *edt, const dfilter_t *dfcode); /** fill the dissect run output into the packet list columns */ +WS_DLL_PUBLIC void epan_dissect_fill_in_columns(epan_dissect_t *edt, const gboolean fill_col_exprs, const gboolean fill_fd_colums); /** releases resources attached to the packet dissection. DOES NOT free the actual pointer */ +WS_DLL_PUBLIC void epan_dissect_cleanup(epan_dissect_t* edt); /** free a single packet dissection */ +WS_DLL_PUBLIC void epan_dissect_free(epan_dissect_t* edt); @@ -182,12 +194,14 @@ epan_custom_set(epan_dissect_t *edt, int id, gint occurrence, /** * Get compile-time information for libraries used by libwireshark. */ +WS_DLL_PUBLIC void epan_get_compiled_version_info(GString *str); /** * Get runtime information for libraries used by libwireshark. */ +WS_DLL_PUBLIC void epan_get_runtime_version_info(GString *str); diff --git a/epan/etypes.h b/epan/etypes.h index 138416a29e..0d728b48cc 100644 --- a/epan/etypes.h +++ b/epan/etypes.h @@ -25,6 +25,8 @@ #ifndef __ETYPES_H__ #define __ETYPES_H__ +#include "ws_symbol_export.h" + /* * Maximum length of an IEEE 802.3 frame; Ethernet type/length values * less than or equal to it are lengths. @@ -536,6 +538,6 @@ #define ETHERTYPE_ROCE 0x8915 /* Infiniband RDMA over Converged Ethernet */ #endif -WS_VAR_IMPORT const value_string etype_vals[]; +WS_DLL_PUBLIC const value_string etype_vals[]; #endif /* etypes.h */ diff --git a/epan/ex-opt.h b/epan/ex-opt.h index 4e5873dc11..db5ba7bf90 100644 --- a/epan/ex-opt.h +++ b/epan/ex-opt.h @@ -29,21 +29,23 @@ #ifndef _EX_OPT_H #define _EX_OPT_H +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* will be called by main each time a -X option is found */ -extern gboolean ex_opt_add(const gchar* optarg); +WS_DLL_PUBLIC gboolean ex_opt_add(const gchar* optarg); /* yields the number of arguments of a given key obviously returns 0 if there aren't */ -extern gint ex_opt_count(const gchar* key); +WS_DLL_PUBLIC gint ex_opt_count(const gchar* key); /* fetches the nth argument of a given key returns NULL if there isn't */ -extern const gchar* ex_opt_get_nth(const gchar* key, guint index); +WS_DLL_PUBLIC const gchar* ex_opt_get_nth(const gchar* key, guint index); /* extracts the next value of a given key */ -extern const gchar* ex_opt_get_next(const gchar* key); +WS_DLL_PUBLIC const gchar* ex_opt_get_next(const gchar* key); #ifdef __cplusplus } diff --git a/epan/except.h b/epan/except.h index 68fa58e7fc..6dcfb23a49 100644 --- a/epan/except.h +++ b/epan/except.h @@ -36,6 +36,7 @@ #include #include #include +#include "ws_symbol_export.h" #define XCEPT_GROUP_ANY 0 #define XCEPT_CODE_ANY 0 @@ -86,26 +87,26 @@ struct except_stacknode { /* private functions made external so they can be used in macros */ extern void except_setup_clean(struct except_stacknode *, struct except_cleanup *, void (*)(void *), void *); -extern void except_setup_try(struct except_stacknode *, +WS_DLL_PUBLIC void except_setup_try(struct except_stacknode *, struct except_catch *, const except_id_t [], size_t); -extern struct except_stacknode *except_pop(void); +WS_DLL_PUBLIC struct except_stacknode *except_pop(void); /* public interface functions */ -extern int except_init(void); -extern void except_deinit(void); -extern WS_MSVC_NORETURN void except_rethrow(except_t *) G_GNUC_NORETURN; -extern WS_MSVC_NORETURN void except_throw(long, long, const char *) G_GNUC_NORETURN; -extern WS_MSVC_NORETURN void except_throwd(long, long, const char *, void *) G_GNUC_NORETURN; -extern WS_MSVC_NORETURN void except_throwf(long, long, const char *, ...) G_GNUC_NORETURN; -extern void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *); +WS_DLL_PUBLIC int except_init(void); +WS_DLL_PUBLIC void except_deinit(void); +WS_DLL_PUBLIC WS_MSVC_NORETURN void except_rethrow(except_t *) G_GNUC_NORETURN; +WS_DLL_PUBLIC WS_MSVC_NORETURN void except_throw(long, long, const char *) G_GNUC_NORETURN; +WS_DLL_PUBLIC WS_MSVC_NORETURN void except_throwd(long, long, const char *, void *) G_GNUC_NORETURN; +WS_DLL_PUBLIC WS_MSVC_NORETURN void except_throwf(long, long, const char *, ...) G_GNUC_NORETURN; +WS_DLL_PUBLIC void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *); extern unsigned long except_code(except_t *); extern unsigned long except_group(except_t *); extern const char *except_message(except_t *); extern void *except_data(except_t *); -extern void *except_take_data(except_t *); -extern void except_set_allocator(void *(*)(size_t), void (*)(void *)); -extern void *except_alloc(size_t); -extern void except_free(void *); +WS_DLL_PUBLIC void *except_take_data(except_t *); +WS_DLL_PUBLIC void except_set_allocator(void *(*)(size_t), void (*)(void *)); +WS_DLL_PUBLIC void *except_alloc(size_t); +WS_DLL_PUBLIC void except_free(void *); #define except_code(E) ((E)->except_id.except_code) #define except_group(E) ((E)->except_id.except_group) diff --git a/epan/expert.h b/epan/expert.h index d87a2c4a14..b01f407188 100644 --- a/epan/expert.h +++ b/epan/expert.h @@ -30,6 +30,7 @@ #include #include #include "value_string.h" +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -45,13 +46,13 @@ typedef struct expert_info_s { proto_item *pitem; } expert_info_t; -WS_VAR_IMPORT const value_string expert_severity_vals[]; -WS_VAR_IMPORT const value_string expert_group_vals[]; +WS_DLL_PUBLIC const value_string expert_severity_vals[]; +WS_DLL_PUBLIC const value_string expert_group_vals[]; /* "proto_expert" is exported from libwireshark.dll. * Thus we need a special declaration. */ -WS_VAR_IMPORT int proto_expert; +WS_DLL_PUBLIC int proto_expert; extern void expert_init(void); @@ -59,7 +60,7 @@ expert_init(void); extern void expert_cleanup(void); -extern int +WS_DLL_PUBLIC int expert_get_highest_severity(void); /** Add an expert info. @@ -71,7 +72,7 @@ expert_get_highest_severity(void); @param severity The expert severity (like PI_WARN - see: proto.h) @param format Printf-style format string for additional arguments */ -extern void +WS_DLL_PUBLIC void expert_add_info_format(packet_info *pinfo, proto_item *pi, int group, int severity, const char *format, ...) G_GNUC_PRINTF(5, 6); @@ -86,7 +87,7 @@ expert_add_info_format(packet_info *pinfo, proto_item *pi, int group, @param severity The expert severity (like PI_WARN - see: proto.h) */ -extern void +WS_DLL_PUBLIC void expert_add_undecoded_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, const int severity); #ifdef __cplusplus } diff --git a/epan/filesystem.h b/epan/filesystem.h index 2ba5e1dacb..a972712af4 100644 --- a/epan/filesystem.h +++ b/epan/filesystem.h @@ -25,6 +25,8 @@ #ifndef FILESYSTEM_H #define FILESYSTEM_H +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -40,38 +42,38 @@ extern "C" { * and save it for future use. Returns NULL on success, and a * g_mallocated string containing an error on failure. */ -extern char *init_progfile_dir(const char *arg0, int (*main)(int, char **)); +WS_DLL_PUBLIC char *init_progfile_dir(const char *arg0, int (*main)(int, char **)); /* * Get the directory in which the program resides. */ -extern const char *get_progfile_dir(void); +WS_DLL_PUBLIC const char *get_progfile_dir(void); /* * Get the directory in which plugins are stored; this must not be called * before init_progfile_dir() is called, as they might be stored in a * subdirectory of the program file directory. */ -extern const char *get_plugin_dir(void); +WS_DLL_PUBLIC const char *get_plugin_dir(void); /* * Get the directory in which python plugins are stored; this must not be * called before init_progfile_dir() is called, as they might be stored in a * subdirectory of the program file directory. */ -extern const char *get_wspython_dir(void); +WS_DLL_PUBLIC const char *get_wspython_dir(void); /* * Get the flag indicating whether we're running from a build * directory. */ -extern gboolean running_in_build_directory(void); +WS_DLL_PUBLIC gboolean running_in_build_directory(void); /* * Get the directory in which global configuration files are * stored. */ -extern const char *get_datafile_dir(void); +WS_DLL_PUBLIC const char *get_datafile_dir(void); /* * Construct the path name of a global configuration file, given the @@ -80,12 +82,12 @@ extern const char *get_datafile_dir(void); * The returned file name was g_malloc()'d so it must be g_free()d when the * caller is done with it. */ -extern char *get_datafile_path(const char *filename); +WS_DLL_PUBLIC char *get_datafile_path(const char *filename); /* * Get the personal plugin dir. */ -extern char *get_plugins_pers_dir(void); +WS_DLL_PUBLIC char *get_plugins_pers_dir(void); /* * Get the directory in which files that, at least on UNIX, are @@ -93,51 +95,51 @@ extern char *get_plugins_pers_dir(void); * there's no "/etc" directory, so we get them from the Wireshark * global configuration and data file directory. */ -extern const char *get_systemfile_dir(void); +WS_DLL_PUBLIC const char *get_systemfile_dir(void); /* * Set the configuration profile name to be used for storing * personal configuration files. */ -extern void set_profile_name(const gchar *profilename); +WS_DLL_PUBLIC void set_profile_name(const gchar *profilename); /* * Get the current configuration profile name used for storing * personal configuration files. */ -extern const char *get_profile_name(void); +WS_DLL_PUBLIC const char *get_profile_name(void); /* * Check if current profile is default profile. */ -extern gboolean is_default_profile(void); +WS_DLL_PUBLIC gboolean is_default_profile(void); /* * Check if we have global profiles. */ -extern gboolean has_global_profiles(void); +WS_DLL_PUBLIC gboolean has_global_profiles(void); /* * Get the directory used to store configuration profile directories. */ -extern const char *get_profiles_dir(void); +WS_DLL_PUBLIC const char *get_profiles_dir(void); /* * Get the directory used to store global configuration profile directories. */ -extern const char *get_global_profiles_dir(void); +WS_DLL_PUBLIC const char *get_global_profiles_dir(void); /* * Store filenames used for personal config files so we know which * files to copy when duplicate a configuration profile. */ -extern void profile_store_persconffiles(gboolean store); +WS_DLL_PUBLIC void profile_store_persconffiles(gboolean store); /* * Check if given configuration profile exists. */ -extern gboolean profile_exists(const gchar *profilename, gboolean global); +WS_DLL_PUBLIC gboolean profile_exists(const gchar *profilename, gboolean global); /* * Create a directory for the given configuration profile. @@ -146,7 +148,7 @@ extern gboolean profile_exists(const gchar *profilename, gboolean global); * to create (it's g_mallocated, so our caller should free it); otherwise, * return 0. */ -extern int create_persconffile_profile(const char *profilename, +WS_DLL_PUBLIC int create_persconffile_profile(const char *profilename, char **pf_dir_path_return); /* @@ -156,20 +158,20 @@ extern int create_persconffile_profile(const char *profilename, * to delete (it's g_mallocated, so our caller should free it); otherwise, * return 0. */ -extern int delete_persconffile_profile(const char *profilename, +WS_DLL_PUBLIC int delete_persconffile_profile(const char *profilename, char **pf_dir_path_return); /* * Rename the directory for the given confinguration profile. */ -extern int rename_persconffile_profile(const char *fromname, const char *toname, +WS_DLL_PUBLIC int rename_persconffile_profile(const char *fromname, const char *toname, char **pf_from_dir_path_return, char **pf_to_dir_path_return); /* * Copy files in one profile to the other. */ -extern int copy_persconffile_profile(const char *toname, const char *fromname, +WS_DLL_PUBLIC int copy_persconffile_profile(const char *toname, const char *fromname, gboolean from_global, char **pf_filename_return, char **pf_to_dir_path_return, @@ -182,7 +184,7 @@ extern int copy_persconffile_profile(const char *toname, const char *fromname, * to create (it's g_mallocated, so our caller should free it); otherwise, * return 0. */ -extern int create_persconffile_dir(char **pf_dir_path_return); +WS_DLL_PUBLIC int create_persconffile_dir(char **pf_dir_path_return); /* * Construct the path name of a personal configuration file, given the @@ -198,7 +200,7 @@ extern int create_persconffile_dir(char **pf_dir_path_return); * The returned file name was g_malloc()'d so it must be g_free()d when the * caller is done with it. */ -extern char *get_persconffile_path(const char *filename, gboolean from_profile, +WS_DLL_PUBLIC char *get_persconffile_path(const char *filename, gboolean from_profile, gboolean for_writing); /* @@ -207,7 +209,7 @@ extern char *get_persconffile_path(const char *filename, gboolean from_profile, * On Win32, this is the "My Documents" folder in the personal profile. * On UNIX this is simply the current directory. */ -extern const char *get_persdatafile_dir(void); +WS_DLL_PUBLIC const char *get_persdatafile_dir(void); /* * Construct the path name of a file in $TMP/%TEMP% directory. @@ -215,43 +217,43 @@ extern const char *get_persdatafile_dir(void); * * Return value is g_malloced so the caller should g_free it. */ -extern char *get_tempfile_path(const char *filename); +WS_DLL_PUBLIC char *get_tempfile_path(const char *filename); /* * process command line option belonging to the filesystem settings */ -extern int filesystem_opt(int opt, const char *optstr); +WS_DLL_PUBLIC int filesystem_opt(int opt, const char *optstr); /* * Return an error message for UNIX-style errno indications on open or * create operations. */ -extern const char *file_open_error_message(int err, gboolean for_writing); +WS_DLL_PUBLIC const char *file_open_error_message(int err, gboolean for_writing); /* * Return an error message for UNIX-style errno indications on write * operations. */ -extern const char *file_write_error_message(int err); +WS_DLL_PUBLIC const char *file_write_error_message(int err); /* * Given a pathname, return the last component. */ -extern const char *get_basename(const char *); +WS_DLL_PUBLIC const char *get_basename(const char *); /* * Given a pathname, return a pointer to the last pathname separator * character in the pathname, or NULL if the pathname contains no * separators. */ -extern char *find_last_pathname_separator(const char *path); +WS_DLL_PUBLIC char *find_last_pathname_separator(const char *path); /* * Given a pathname, return a string containing everything but the * last component. NOTE: this overwrites the pathname handed into * it.... */ -extern char *get_dirname(char *); +WS_DLL_PUBLIC char *get_dirname(char *); /* * Given a pathname, return: @@ -264,7 +266,7 @@ extern char *get_dirname(char *); * 0, if the attempt succeeded and the file turned out not * to be a directory. */ -extern int test_for_directory(const char *); +WS_DLL_PUBLIC int test_for_directory(const char *); /* * Given a pathname, return: @@ -277,20 +279,20 @@ extern int test_for_directory(const char *); * 0, if the attempt succeeded and the file turned out not * to be a FIFO. */ -extern int test_for_fifo(const char *); +WS_DLL_PUBLIC int test_for_fifo(const char *); /* Delete a file */ -extern gboolean deletefile (const char *path); +WS_DLL_PUBLIC gboolean deletefile (const char *path); /* * Check, if file is existing. */ -extern gboolean file_exists(const char *fname); +WS_DLL_PUBLIC gboolean file_exists(const char *fname); /* * Check if two filenames are identical (with absolute and relative paths). */ -extern gboolean files_identical(const char *fname1, const char *fname2); +WS_DLL_PUBLIC gboolean files_identical(const char *fname1, const char *fname2); /* * Copy a file in binary mode, for those operating systems that care about @@ -301,7 +303,7 @@ extern gboolean files_identical(const char *fname1, const char *fname2); * Returns TRUE on success, FALSE on failure. If a failure, it also * displays a simple dialog window with the error message. */ -extern gboolean copy_file_binary_mode(const char *from_filename, +WS_DLL_PUBLIC gboolean copy_file_binary_mode(const char *from_filename, const char *to_filename); #ifdef __cplusplus diff --git a/epan/filter_expressions.h b/epan/filter_expressions.h index 9ee5baffca..626c388cfe 100644 --- a/epan/filter_expressions.h +++ b/epan/filter_expressions.h @@ -25,6 +25,8 @@ #ifndef __FILTER_EXPRESSIONS_H__ #define __FILTER_EXPRESSIONS_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -41,8 +43,9 @@ struct filter_expression { struct filter_expression *next; }; -WS_VAR_IMPORT struct filter_expression **pfilter_expression_head; +WS_DLL_PUBLIC struct filter_expression **pfilter_expression_head; +WS_DLL_PUBLIC struct filter_expression *filter_expression_new(const gchar *label, const gchar *expr, const gboolean enabled); diff --git a/epan/follow.c b/epan/follow.c index 12b79d396c..8673cd68b4 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -50,6 +50,7 @@ typedef struct _tcp_frag { struct _tcp_frag *next; } tcp_frag; +WS_DLL_PUBLIC_NOEXTERN FILE* data_out_file = NULL; gboolean empty_tcp_stream; diff --git a/epan/follow.h b/epan/follow.h index 46fe5c45cf..585ea07438 100644 --- a/epan/follow.h +++ b/epan/follow.h @@ -28,12 +28,13 @@ #define __FOLLOW_H__ #include +#include "ws_symbol_export.h" #define MAX_IPADDR_LEN 16 /* With MSVC and a libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT gboolean empty_tcp_stream; -WS_VAR_IMPORT gboolean incomplete_tcp_stream; +WS_DLL_PUBLIC gboolean empty_tcp_stream; +WS_DLL_PUBLIC gboolean incomplete_tcp_stream; typedef struct _tcp_stream_chunk { guint8 src_addr[MAX_IPADDR_LEN]; @@ -41,11 +42,15 @@ typedef struct _tcp_stream_chunk { guint32 dlen; } tcp_stream_chunk; +WS_DLL_PUBLIC char* build_follow_filter( packet_info * ); +WS_DLL_PUBLIC gboolean follow_tcp_addr( const address *, guint, const address *, guint ); +WS_DLL_PUBLIC gboolean follow_tcp_index( guint32 ); void reassemble_tcp( guint32, guint32, guint32, guint32, const char*, guint32, int, address *, address *, guint, guint ); +WS_DLL_PUBLIC void reset_tcp_reassembly( void ); typedef struct { @@ -55,6 +60,7 @@ typedef struct { gboolean is_ipv6; } follow_stats_t; +WS_DLL_PUBLIC void follow_stats(follow_stats_t* stats); #endif diff --git a/epan/frame_data.h b/epan/frame_data.h index e227a73610..acda8d5d99 100644 --- a/epan/frame_data.h +++ b/epan/frame_data.h @@ -28,6 +28,7 @@ #include #include #include +#include "ws_symbol_export.h" #define PINFO_FD_NUM(pinfo) ((pinfo)->fd->num) #define PINFO_FD_VISITED(pinfo) ((pinfo)->fd->flags.visited) @@ -89,16 +90,16 @@ typedef struct { /* Utility routines used by packet*.c */ -extern void p_add_proto_data(frame_data *fd, int proto, void *proto_data); -extern void *p_get_proto_data(frame_data *fd, int proto); -extern void p_remove_proto_data(frame_data *fd, int proto); +WS_DLL_PUBLIC void p_add_proto_data(frame_data *fd, int proto, void *proto_data); +WS_DLL_PUBLIC void *p_get_proto_data(frame_data *fd, int proto); +void p_remove_proto_data(frame_data *fd, int proto); /** compare two frame_datas */ -extern gint frame_data_compare(const frame_data *fdata1, const frame_data *fdata2, int field); +WS_DLL_PUBLIC gint frame_data_compare(const frame_data *fdata1, const frame_data *fdata2, int field); -extern void frame_data_cleanup(frame_data *fdata); +WS_DLL_PUBLIC void frame_data_cleanup(frame_data *fdata); -extern void frame_data_init(frame_data *fdata, guint32 num, +WS_DLL_PUBLIC void frame_data_init(frame_data *fdata, guint32 num, const struct wtap_pkthdr *phdr, gint64 offset, guint32 cum_bytes); @@ -107,13 +108,13 @@ extern void frame_delta_abs_time(const frame_data *fdata, /** * Sets the frame data struct values before dissection. */ -extern void frame_data_set_before_dissect(frame_data *fdata, +WS_DLL_PUBLIC void frame_data_set_before_dissect(frame_data *fdata, nstime_t *elapsed_time, nstime_t *first_ts, const frame_data *prev_dis, const frame_data *prev_cap); -extern void frame_data_set_after_dissect(frame_data *fdata, +WS_DLL_PUBLIC void frame_data_set_after_dissect(frame_data *fdata, guint32 *cum_bytes); #endif /* __FRAME_DATA__ */ diff --git a/epan/frequency-utils.h b/epan/frequency-utils.h index 78e28ed2e5..d631b86230 100644 --- a/epan/frequency-utils.h +++ b/epan/frequency-utils.h @@ -25,6 +25,8 @@ #ifndef __FREQUENCY_UTILS_H__ #define __FREQUENCY_UTILS_H__ +#include "ws_symbol_export.h" + /** @file * Frequency and channel conversion utilities. */ @@ -34,6 +36,7 @@ * @param freq Frequency in MHz. * @return The equivalent channel or -1 if no match is found. */ +WS_DLL_PUBLIC gint ieee80211_mhz_to_chan(guint freq); @@ -43,6 +46,7 @@ ieee80211_mhz_to_chan(guint freq); * @param is_bg TRUE if the channel is a b/g channel, FALSE otherwise. * @return The equivalent frequency or 0 if no match is found. */ +WS_DLL_PUBLIC guint ieee80211_chan_to_mhz(gint chan, gboolean is_bg); @@ -51,6 +55,7 @@ ieee80211_chan_to_mhz(gint chan, gboolean is_bg); * @param freq Frequench in MHz. * @return A string showing the frequency, channel number, and type. The string must be freed with g_free() after use. */ +WS_DLL_PUBLIC gchar* ieee80211_mhz_to_str(guint freq); diff --git a/epan/ftypes/Makefile.nmake b/epan/ftypes/Makefile.nmake index 4506b9a2ed..5392545bdb 100644 --- a/epan/ftypes/Makefile.nmake +++ b/epan/ftypes/Makefile.nmake @@ -11,7 +11,7 @@ include Makefile.common CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I. /I.. /I../.. $(GLIB_CFLAGS) \ - /I$(PCAP_DIR)\include + /I$(PCAP_DIR)\include -DWS_BUILD_DLL .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h index 3f9907ece6..2e951e4730 100644 --- a/epan/ftypes/ftypes.h +++ b/epan/ftypes/ftypes.h @@ -28,6 +28,7 @@ #include #include "../emem.h" +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -103,12 +104,14 @@ ftypes_initialize(void); /* ---------------- FTYPE ----------------- */ /* Return a string representing the name of the type */ +WS_DLL_PUBLIC const char* ftype_name(ftenum_t ftype); /* Return a string presenting a "pretty" representation of the * name of the type. The pretty name means more to the user than * that "FT_*" name. */ +WS_DLL_PUBLIC const char* ftype_pretty_name(ftenum_t ftype); @@ -116,33 +119,42 @@ ftype_pretty_name(ftenum_t ftype); int ftype_length(ftenum_t ftype); +WS_DLL_PUBLIC gboolean ftype_can_slice(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_eq(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_ne(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_gt(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_ge(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_lt(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_le(enum ftenum ftype); gboolean ftype_can_bitwise_and(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_contains(enum ftenum ftype); +WS_DLL_PUBLIC gboolean ftype_can_matches(enum ftenum ftype); @@ -257,7 +269,7 @@ fvalue_init(fvalue_t *fv, ftenum_t ftype); /* Free all memory used by an fvalue_t. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT struct ws_memory_slab fvalue_t_slab; +WS_DLL_PUBLIC struct ws_memory_slab fvalue_t_slab; #define FVALUE_CLEANUP(fv) \ @@ -275,7 +287,7 @@ WS_VAR_IMPORT struct ws_memory_slab fvalue_t_slab; sl_free(&fvalue_t_slab, fv); \ } - +WS_DLL_PUBLIC fvalue_t* fvalue_from_unparsed(ftenum_t ftype, char *s, gboolean allow_partial_value, LogFunc logfunc); @@ -288,6 +300,7 @@ fvalue_from_string(ftenum_t ftype, char *s, LogFunc logfunc); * Returns -1 if the string cannot be represented in the given rtype. * * The length DOES NOT include the terminating NUL. */ +WS_DLL_PUBLIC int fvalue_string_repr_len(fvalue_t *fv, ftrepr_t rtype); @@ -301,7 +314,7 @@ fvalue_string_repr_len(fvalue_t *fv, ftrepr_t rtype); * 'buf'. * * Returns NULL if the string cannot be represented in the given rtype.*/ -extern char * +WS_DLL_PUBLIC char * fvalue_to_string_repr(fvalue_t *fv, ftrepr_t rtype, char *buf); ftype_t* @@ -325,19 +338,21 @@ fvalue_set_integer64(fvalue_t *fv, guint64 value); void fvalue_set_floating(fvalue_t *fv, gdouble value); +WS_DLL_PUBLIC gpointer fvalue_get(fvalue_t *fv); -extern guint32 +WS_DLL_PUBLIC guint32 fvalue_get_uinteger(fvalue_t *fv); -extern gint32 +WS_DLL_PUBLIC gint32 fvalue_get_sinteger(fvalue_t *fv); +WS_DLL_PUBLIC guint64 fvalue_get_integer64(fvalue_t *fv); -extern double +WS_DLL_PUBLIC double fvalue_get_floating(fvalue_t *fv); gboolean diff --git a/epan/funnel.h b/epan/funnel.h index baa83a5a86..f770d6ba56 100644 --- a/epan/funnel.h +++ b/epan/funnel.h @@ -30,6 +30,7 @@ #include #include "../stat_menu.h" +#include "ws_symbol_export.h" typedef struct _funnel_progress_window_t funnel_progress_window_t ; typedef struct _funnel_text_window_t funnel_text_window_t ; @@ -92,10 +93,10 @@ typedef struct _funnel_ops_t { void (*destroy_progress_window)(funnel_progress_window_t*); } funnel_ops_t; -extern const funnel_ops_t* funnel_get_funnel_ops(void); -extern void funnel_set_funnel_ops(const funnel_ops_t*); +WS_DLL_PUBLIC const funnel_ops_t* funnel_get_funnel_ops(void); +WS_DLL_PUBLIC void funnel_set_funnel_ops(const funnel_ops_t*); -extern void funnel_register_menu(const char *name, +WS_DLL_PUBLIC void funnel_register_menu(const char *name, register_stat_group_t group, void (*callback)(gpointer), gpointer callback_data, @@ -107,7 +108,7 @@ typedef void (*funnel_registration_cb_t)(const char *name, gpointer callback_data, gboolean retap); -extern void funnel_register_all_menus(funnel_registration_cb_t r_cb); +WS_DLL_PUBLIC void funnel_register_all_menus(funnel_registration_cb_t r_cb); extern void initialize_funnel_ops(void); diff --git a/epan/gcp.h b/epan/gcp.h index 715d1dc733..97377faac5 100644 --- a/epan/gcp.h +++ b/epan/gcp.h @@ -44,6 +44,7 @@ #include #include +#include "ws_symbol_export.h" typedef struct _gcp_hf_ett_t { struct { @@ -186,8 +187,8 @@ typedef struct _gcp_ctx_t { gcp_terms_t terms; } gcp_ctx_t; -WS_VAR_IMPORT const value_string gcp_cmd_type[]; -WS_VAR_IMPORT const value_string gcp_term_types[]; +WS_DLL_PUBLIC const value_string gcp_cmd_type[]; +WS_DLL_PUBLIC const value_string gcp_term_types[]; extern void gcp_init(void); extern gcp_msg_t* gcp_msg(packet_info* pinfo, int o, gboolean persistent); diff --git a/epan/geoip_db.h b/epan/geoip_db.h index 908f97897c..0408124fdd 100644 --- a/epan/geoip_db.h +++ b/epan/geoip_db.h @@ -29,6 +29,7 @@ #include #include +#include "ws_symbol_export.h" /* Fake databases to make lat/lon values available */ /* XXX - find a better way to interface */ @@ -46,7 +47,7 @@ extern void geoip_db_pref_init(module_t *nameres); * * @return The number GeoIP databases successfully loaded */ -extern guint geoip_db_num_dbs(void); +WS_DLL_PUBLIC guint geoip_db_num_dbs(void); /** * Fetch the name of a database @@ -54,7 +55,7 @@ extern guint geoip_db_num_dbs(void); * @param dbnum Database index * @return The database name or "Invalid database" */ -extern const gchar *geoip_db_name(guint dbnum); +WS_DLL_PUBLIC const gchar *geoip_db_name(guint dbnum); /** * Fetch the database type. Types are enumerated in GeoIPDBTypes in GeoIP.h. @@ -62,7 +63,7 @@ extern const gchar *geoip_db_name(guint dbnum); * @param dbnum Database index * @return The database type or -1 */ -extern int geoip_db_type(guint dbnum); +WS_DLL_PUBLIC int geoip_db_type(guint dbnum); /** * Look up an IPv4 address in a database @@ -72,7 +73,7 @@ extern int geoip_db_type(guint dbnum); * @param not_found The string to return if the lookup fails. May be NULL. * @return The database entry if found, else not_found */ -extern const char *geoip_db_lookup_ipv4(guint dbnum, guint32 addr, const char *not_found); +WS_DLL_PUBLIC const char *geoip_db_lookup_ipv4(guint dbnum, guint32 addr, const char *not_found); /** * Look up an IPv6 address in a database @@ -82,13 +83,13 @@ extern const char *geoip_db_lookup_ipv4(guint dbnum, guint32 addr, const char *n * @param not_found The string to return if the lookup fails. May be NULL. * @return The database entry if found, else not_found */ -extern const char *geoip_db_lookup_ipv6(guint dbnum, struct e_in6_addr addr, const char *not_found); +WS_DLL_PUBLIC const char *geoip_db_lookup_ipv6(guint dbnum, struct e_in6_addr addr, const char *not_found); /** * Get all configured paths * * @return String with all paths separated by a path separator */ -extern gchar *geoip_db_get_paths(void); +WS_DLL_PUBLIC gchar *geoip_db_get_paths(void); #endif /* __GEOIP_DB_H__ */ diff --git a/epan/golay.h b/epan/golay.h index d754129cb5..48daae2f47 100644 --- a/epan/golay.h +++ b/epan/golay.h @@ -31,19 +31,24 @@ #ifndef __GOLAY_H__ #define __GOLAY_H__ +#include "ws_symbol_export.h" + /* encodes a 12-bit word to a 24-bit codeword */ +WS_DLL_PUBLIC guint32 golay_encode(guint w); /* return a mask showing the bits which are in error in a received * 24-bit codeword, or -1 if 4 errors were detected. */ +WS_DLL_PUBLIC gint32 golay_errors(guint32 codeword); /* decode a received codeword. Up to 3 errors are corrected for; 4 errors are detected as uncorrectable (return -1); 5 or more errors cause an incorrect correction. */ +WS_DLL_PUBLIC gint golay_decode(guint32 w); #endif diff --git a/epan/guid-utils.h b/epan/guid-utils.h index 94938365ce..87df9d919c 100644 --- a/epan/guid-utils.h +++ b/epan/guid-utils.h @@ -26,6 +26,8 @@ #ifndef __GUID_UTILS_H__ #define __GUID_UTILS_H__ +#include "ws_symbol_export.h" + #define GUID_LEN 16 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets @@ -38,17 +40,17 @@ typedef struct _e_guid_t { } e_guid_t; -extern void guids_init(void); +WS_DLL_PUBLIC void guids_init(void); /* add a GUID */ -extern void guids_add_guid(e_guid_t *guid, const gchar *name); +WS_DLL_PUBLIC void guids_add_guid(e_guid_t *guid, const gchar *name); /* try to get registered name for this GUID */ -extern const gchar *guids_get_guid_name(e_guid_t *guid); +WS_DLL_PUBLIC const gchar *guids_get_guid_name(e_guid_t *guid); /* resolve GUID to name (or if unknown to hex string) */ /* (if you need hex string only, use guid_to_str instead) */ -extern const gchar* guids_resolve_guid_to_str(e_guid_t *guid); +WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(e_guid_t *guid); /* add a UUID (dcerpc_init_uuid() will call this too) */ #define guids_add_uuid(uuid, name) guids_add_guid((e_guid_t *) (uuid), (name)) diff --git a/epan/in_cksum.h b/epan/in_cksum.h index 57f117e7ae..3a7ff56310 100644 --- a/epan/in_cksum.h +++ b/epan/in_cksum.h @@ -7,13 +7,15 @@ #ifndef __IN_CKSUM_H__ #define __IN_CKSUM_H__ +#include "ws_symbol_export.h" + typedef struct { const guint8 *ptr; int len; } vec_t; -extern int in_cksum(const vec_t *vec, int veclen); +WS_DLL_PUBLIC int in_cksum(const vec_t *vec, int veclen); -extern guint16 in_cksum_shouldbe(guint16 sum, guint16 computed_sum); +guint16 in_cksum_shouldbe(guint16 sum, guint16 computed_sum); #endif /* __IN_CKSUM_H__ */ diff --git a/epan/ip_opts.h b/epan/ip_opts.h index 2553a95f20..b152d097fd 100644 --- a/epan/ip_opts.h +++ b/epan/ip_opts.h @@ -26,6 +26,8 @@ #ifndef __IP_OPTS_H__ #define __IP_OPTS_H__ +#include "ws_symbol_export.h" + /** @file */ @@ -65,7 +67,7 @@ extern void dissect_ip_tcp_options(tvbuff_t *, int, guint, #define QS_RATE_REQUEST 0 #define QS_RATE_REPORT 8 -WS_VAR_IMPORT const value_string qs_func_vals[]; -WS_VAR_IMPORT value_string_ext qs_rate_vals_ext; +WS_DLL_PUBLIC const value_string qs_func_vals[]; +WS_DLL_PUBLIC value_string_ext qs_rate_vals_ext; #endif diff --git a/epan/ipproto.h b/epan/ipproto.h index 2447383fc0..cee5aa6649 100644 --- a/epan/ipproto.h +++ b/epan/ipproto.h @@ -26,6 +26,8 @@ #ifndef __IPPROTO_H__ #define __IPPROTO_H__ +#include "ws_symbol_export.h" + /* * IP protocol numbers. * http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml @@ -194,6 +196,6 @@ #define IP_PROTO_NCS_HEARTBEAT 224 /* Novell NCS Heartbeat - http://support.novell.com/cgi-bin/search/searchtid.cgi?/10071158.htm */ extern value_string_ext ipproto_val_ext; -extern const char *ipprotostr(const int proto); +WS_DLL_PUBLIC const char *ipprotostr(const int proto); #endif /* ipproto.h */ diff --git a/epan/ipv4.h b/epan/ipv4.h index 7bfe905527..cc21ea5cc6 100644 --- a/epan/ipv4.h +++ b/epan/ipv4.h @@ -30,6 +30,8 @@ #define __IPV4_H__ #include +#include "ws_symbol_export.h" + typedef struct { guint32 addr; /* stored in host order */ @@ -46,6 +48,7 @@ void ipv4_addr_set_host_order_addr(ipv4_addr *ipv4, const guint32 new_addr); void ipv4_addr_set_net_order_addr(ipv4_addr *ipv4, const guint32 new_addr); void ipv4_addr_set_netmask_bits(ipv4_addr *ipv4, const guint new_nmask_bits); +WS_DLL_PUBLIC guint32 ipv4_get_net_order_addr(ipv4_addr *ipv4); guint32 ipv4_get_host_order_addr(ipv4_addr *ipv4); diff --git a/epan/libwireshark.def b/epan/libwireshark.def deleted file mode 100644 index 7fc16dd3c6..0000000000 --- a/epan/libwireshark.def +++ /dev/null @@ -1,1266 +0,0 @@ -; libwireshark.def -; $Id$ - -; Add symbols that should be exported out of libwireshark.dll, -; e.g. when used inside the GUI. -; -; DATA symbols must be declared WS_VAR_IMPORT in the header file! -; -; NOTE: TABS DON'T WORK IN THIS FILE, USE SPACES INSTEAD!!! -; -EXPORTS -_match_strval_ext_init -abs_time_secs_to_str -abs_time_to_str -add_hosts_file -add_ip_name_from_string -add_ipv4_name -add_ipv6_name -add_itu_tcap_subdissector -add_new_data_source -address_to_str_buf -AdmissionRejectReason_vals DATA -airpdcap_ctx DATA -AirPDcapDestroyContext -AirPDcapInitContext -analyze_q708_ispc -ansi_a_bsmap_strings DATA -ansi_a_dtap_strings DATA -ansi_a_ios401_bsmap_strings DATA -ansi_a_ios401_dtap_strings DATA -ansi_a_ios501_bsmap_strings DATA -ansi_a_ios501_dtap_strings DATA -ansi_map_opr_code_strings DATA -asn1_ctx_init -BandRejectReason_vals DATA -ber_decode_as -ber_decode_as_foreach -ber_set_filename -build_column_format_array -build_follow_filter -byte_array_dup -byte_array_equal -bytes_to_str -bytes_to_str_punct -bytestring_to_str -call_ber_oid_callback -call_dissector -call_dissector_only -call_dissector_with_data -camel_opr_code_strings DATA -camelSRTtype_naming DATA -capture_ap1394 -capture_arcnet -capture_atm -capture_ax25 -capture_ax25_kiss -capture_chdlc -capture_clip -capture_enc -capture_eth -capture_fddi -capture_fr -capture_i2c -capture_ieee80211 -capture_ipfc -capture_llap -capture_null -capture_ppi -capture_ppp_hdlc -capture_prism -capture_radiotap -capture_raw -capture_sll -capture_tr -capture_wlancap -check_col -check_xdlc_control -circuit_add_proto_data -circuit_get_proto_data -circuit_new -cleanup_dissection -codec_decode -codec_init -codec_release -col_add_fstr -col_add_str -col_append_fstr -col_append_sep_fstr -col_append_sep_str -col_append_str -col_based_on_frame_data -col_cleanup -col_clear -col_custom_prime_edt -col_fill_in -col_fill_in_error -col_fill_in_frame_data -col_format_desc -col_format_to_string -col_get_writable -col_has_time_fmt -col_prepend_fence_fstr -col_prepend_fstr -col_set_fence -col_set_str -col_set_time -col_set_writable -col_setup -CommandCode_vals_ext DATA -conversation_add_proto_data -conversation_delete_proto_data -conversation_get_proto_data -conversation_new -conversation_set_dissector -convert_string_case -convert_string_to_hex -copy_file_binary_mode -copy_persconffile_profile -crc16_ccitt_tvb -crc16_ccitt_tvb_offset -crc16_ccitt_tvb_offset_seed -crc16_ccitt_tvb_seed -crc16_plain_tvb_offset -crc16_plain_tvb_offset_seed -crc16_x25_ccitt_tvb -crc32_802_tvb -crc32_ccitt_tvb -crc32_ccitt_tvb_offset -crc32_ccitt_tvb_offset_seed -crc32_ccitt_tvb_seed -crc32_mpeg2_tvb -crc32_mpeg2_tvb_offset -crc32_mpeg2_tvb_offset_seed -crc32_mpeg2_tvb_seed -create_dissector_handle -create_persconffile_dir -create_persconffile_profile -data_out_file DATA -dcerpc_add_conv_to_bind_table -dcerpc_fragment_table_init -dcerpc_get_proto_hf_opnum -dcerpc_get_proto_name -dcerpc_get_proto_sub_dissector -dcerpc_get_transport_salt -dcerpc_hooks_init_protos DATA -dcerpc_init_uuid -dcerpc_uuids DATA -dcom_hresult_vals DATA -dcom_interface_find -dcom_interface_new -dcom_variant_type_vals DATA -de_cell_id -de_d_gb_call_ref -de_gmm_drx_param -de_gmm_ms_net_cap -de_gmm_ms_radio_acc_cap -de_gmm_rai -de_lai -de_mid -de_ms_cm_1 -de_ms_cm_2 -de_ms_cm_3 -de_rej_cause -de_rr_cause -de_rr_cell_dsc -de_rr_ch_dsc -de_rr_ch_mode -de_rr_chnl_needed -de_rr_cip_mode_set -de_rr_cm_enq_mask -de_rr_multirate_conf -de_rr_sus_cau -de_rr_tlli -de_sm_apn -de_sm_pflow_id -de_sm_qos -decode_bitfield_value -decode_bits_in_field -decode_boolean_bitfield -decode_enumerated_bitfield -decode_enumerated_bitfield_shifted -decode_numeric_bitfield -delete_itu_tcap_subdissector -delete_persconffile_profile -deletefile -dfilter_apply_edt -dfilter_compile -dfilter_deprecated_tokens -dfilter_dump -dfilter_error_msg DATA -dfilter_free -dfilter_macro_build_ftv_cache -dfilter_macro_foreach -dfilter_macro_get_uat -DisengageReason_vals DATA -DisengageRejectReason_vals DATA -display_epoch_time -display_signed_time -dissect_ber_bitstring -dissect_ber_boolean -dissect_ber_choice -dissect_ber_EmbeddedPDV_Type -dissect_ber_GeneralizedTime -dissect_ber_identifier -dissect_ber_integer -dissect_ber_integer64 -dissect_ber_length -dissect_ber_null -dissect_ber_object_identifier -dissect_ber_object_identifier_str -dissect_ber_octet_string -dissect_ber_old_choice -dissect_ber_old_sequence -dissect_ber_old_sequence_of -dissect_ber_restricted_string -dissect_ber_sequence -dissect_ber_sequence_of -dissect_ber_set -dissect_ber_set_of -dissect_ber_tagged_type -dissect_ber_UTCTime -dissect_dap_SecurityParameters -dissect_dcerpc_uint16 -dissect_dcerpc_uint32 -dissect_dcerpc_uint64 -dissect_dcerpc_uint8 -dissect_dcerpc_uuid_t -dissect_dcom_BSTR -dissect_dcom_dcerpc_array_size -dissect_dcom_dcerpc_pointer -dissect_dcom_HRESULT -dissect_dcom_HRESULT_item -dissect_dcom_indexed_DWORD -dissect_dcom_indexed_HRESULT -dissect_dcom_indexed_LPWSTR -dissect_dcom_LPWSTR -dissect_dcom_MInterfacePointer -dissect_dcom_PMInterfacePointer -dissect_dcom_SAFEARRAY -dissect_dcom_simple_resp -dissect_dcom_simple_rqst -dissect_dcom_that -dissect_dcom_this -dissect_dcom_VARIANT -dissect_dcom_VARTYPE -dissect_dsp_AccessPointInformation -dissect_e164_cc -dissect_e212_mcc_mnc -dissect_e212_mcc_mnc_in_address -dissect_gsm_map_GlobalCellId -dissect_gsm_map_IMSI -dissect_gsm_map_ISDN_AddressString -dissect_gsm_map_lcs_Ext_GeographicalInformation -dissect_h245_H223Capability -dissect_IDispatch_GetIDsOfNames_resp -dissect_IDispatch_GetIDsOfNames_rqst -dissect_IDispatch_GetTypeInfo_resp -dissect_IDispatch_GetTypeInfo_rqst -dissect_IDispatch_GetTypeInfoCount_resp -dissect_IDispatch_Invoke_resp -dissect_IDispatch_Invoke_rqst -dissect_isup_called_party_number_parameter -dissect_isup_calling_party_number_parameter -dissect_isup_original_called_number_parameter -dissect_isup_redirecting_number_parameter -dissect_isup_redirection_information_parameter -dissect_mscldap_string -dissect_ndr_double -dissect_ndr_duint32 -dissect_ndr_uint16 -dissect_ndr_uint1632 -dissect_ndr_uint32 -dissect_ndr_uint3264 -dissect_ndr_uint8 -dissect_ndr_uuid_t -dissect_nt_64bit_time -dissect_nt_sid -dissect_per_bit_string -dissect_per_bit_string_containing_pdu -dissect_per_bit_string_containing_pdu_new -dissect_per_BMPString -dissect_per_boolean -dissect_per_choice -dissect_per_constrained_integer -dissect_per_constrained_integer_64b -dissect_per_constrained_sequence_of -dissect_per_constrained_set_of -dissect_per_enumerated -dissect_per_external_type -dissect_per_GeneralString -dissect_per_IA5String -dissect_per_integer -dissect_per_null -dissect_per_NumericString -dissect_per_object_identifier -dissect_per_object_identifier_str -dissect_per_octet_string -dissect_per_octet_string_containing_pdu -dissect_per_octet_string_containing_pdu_new -dissect_per_open_type -dissect_per_open_type_pdu -dissect_per_open_type_pdu_new -dissect_per_PrintableString -dissect_per_real -dissect_per_restricted_character_string -dissect_per_sequence -dissect_per_sequence_eag -dissect_per_sequence_of -dissect_per_set_of -dissect_per_VisibleString -dissect_q931_bearer_capability_ie -dissect_q931_high_layer_compat_ie -dissect_q932_PartyNumber -dissect_q932_PartySubaddress -dissect_q932_PresentedNumberScreened -dissect_q932_PresentedNumberUnscreened -dissect_qsig_na_Name -dissect_rpc_array -dissect_rpc_bool -dissect_rpc_bytes -dissect_rpc_data -dissect_rpc_indir_call -dissect_rpc_indir_reply -dissect_rpc_list -dissect_rpc_opaque_data -dissect_rpc_string -dissect_rpc_uint32 -dissect_rpc_uint64 -dissect_tpkt_encap -dissect_unknown_ber -dissect_xdlc_control -dissector_add_handle -dissector_add_string -dissector_add_uint -dissector_all_heur_tables_foreach_table -dissector_all_tables_foreach_changed -dissector_all_tables_foreach_table -dissector_change_string -dissector_change_uint -dissector_delete_string -dissector_delete_uint -dissector_dump_decodes -dissector_dump_heur_decodes -dissector_filter_list DATA -dissector_get_string_handle -dissector_get_uint_handle -dissector_handle_get_protocol_index -dissector_handle_get_short_name -dissector_reset_string -dissector_reset_uint -dissector_table_foreach -dissector_table_foreach_handle -dissector_try_heuristic -dissector_try_string -dissector_try_uint -draw_tap_listeners -dscp_vals_ext DATA -dtbl_entry_get_handle -dtbl_entry_get_initial_handle -eap_code_vals DATA -eap_type_vals_ext DATA -EBCDIC_to_ASCII -EBCDIC_to_ASCII1 -elem_lv -elem_t -elem_tlv -elem_tv -elem_tv_short -elem_v -elem_v_short -emem_init -emem_tree_foreach -emem_tree_insert_string -emem_tree_insert32 -emem_tree_insert32_array -emem_tree_lookup_string -emem_tree_lookup32 -emem_tree_lookup32_array -emem_tree_lookup32_array_le -emem_tree_lookup32_le -empty_tcp_stream DATA -ep_address_to_str -ep_alloc -ep_alloc0 -ep_memdup -ep_stack_new -ep_stack_pop -ep_stack_push -ep_strbuf_append -ep_strbuf_append_c -ep_strbuf_append_printf -ep_strbuf_append_unichar -ep_strbuf_append_vprintf -ep_strbuf_new -ep_strbuf_new_label -ep_strbuf_printf -ep_strbuf_sized_new -ep_strbuf_truncate -ep_strconcat -ep_strdup -ep_strdup_printf -ep_strdup_vprintf -ep_strndup -ep_strsplit -ep_tvb_get_bits -ep_tvb_memdup -epan_base64_decode -epan_cleanup -epan_dissect_cleanup -epan_dissect_fake_protocols -epan_dissect_fill_in_columns -epan_dissect_free -epan_dissect_init -epan_dissect_new -epan_dissect_prime_dfilter -epan_dissect_run -epan_dissect_run_with_taps -epan_get_compiled_version_info -epan_get_runtime_version_info -epan_get_version -epan_init -epan_strcasestr -escape_string -escape_string_len -ether_to_str -ethertype -etype_vals DATA -eui64_to_str -ex_opt_add -ex_opt_count -ex_opt_get_next -ex_opt_get_nth -except_alloc -except_deinit -except_free -except_init -except_pop -except_rethrow -except_set_allocator -except_setup_try -except_take_data -except_throw -except_throwd -except_throwf -except_unhandled_catcher -expert_add_info_format -expert_add_undecoded_item -expert_get_highest_severity -expert_group_vals DATA -expert_severity_vals DATA -FacilityReason_vals DATA -fc_fc4_val DATA -fetch_tapped_data -file_exists -file_open_error_message -file_write_error_message -files_identical -filesystem_opt -filter_expression_new -find_circuit -find_codec -find_conversation -find_dissector -find_dissector_table -find_last_pathname_separator -find_or_create_conversation -find_protocol_by_id -find_sid_name -find_stream_circ -find_tap_id -follow_stats -follow_tcp_addr -follow_tcp_index -format_text -format_uri -fragment_add -fragment_add_check -fragment_add_dcerpc_dg -fragment_add_multiple_ok -fragment_add_seq -fragment_add_seq_802_11 -fragment_add_seq_check -fragment_add_seq_next -fragment_delete -fragment_end_seq_next -fragment_get -fragment_get_reassembled_id -fragment_get_tot_len -fragment_set_partial_reassembly -fragment_set_tot_len -fragment_table_init -frame_data_cleanup -frame_data_compare -frame_data_init -frame_data_set_after_dissect -frame_data_set_before_dissect -ftype_can_contains -ftype_can_eq -ftype_can_ge -ftype_can_gt -ftype_can_le -ftype_can_lt -ftype_can_matches -ftype_can_ne -ftype_can_slice -ftype_name -ftype_pretty_name -funnel_get_funnel_ops -funnel_register_all_menus -funnel_register_menu -funnel_set_funnel_ops -fvalue_from_unparsed -fvalue_get -fvalue_get_floating -fvalue_get_integer64 -fvalue_get_sinteger -fvalue_get_uinteger -fvalue_string_repr_len -fvalue_t_slab DATA -fvalue_to_string_repr -GatekeeperRejectReason_vals DATA -gbl_resolv_flags DATA -gcamel_StatSRT DATA -geoip_db_get_paths -geoip_db_lookup_ipv4 -geoip_db_lookup_ipv6 -geoip_db_name -geoip_db_num_dbs -geoip_db_type -get_addr_name -get_addrinfo_list -get_asn1_ctx -get_basename -get_ber_identifier -get_ber_length -get_CDR_any -get_CDR_boolean -get_CDR_char -get_CDR_double -get_CDR_encap_info -get_CDR_enum -get_CDR_fixed -get_CDR_float -get_CDR_interface -get_CDR_long -get_CDR_long_long -get_CDR_object -get_CDR_octet -get_CDR_octet_seq -get_CDR_short -get_CDR_string -get_CDR_typeCode -get_CDR_ulong -get_CDR_ulong_long -get_CDR_ushort -get_CDR_wchar -get_CDR_wstring -get_column_char_width -get_column_custom_field -get_column_custom_occurrence -get_column_format -get_column_format_from_str -get_column_format_matches -get_column_longest_string -get_column_resolved -get_column_title -get_column_visible -get_column_width_string -get_data_source_name -get_data_source_tvb -get_datafile_dir -get_datafile_path -get_dirname -get_dissector_table_base -get_dissector_table_selector_type -get_dissector_table_ui_name -get_ether_name -get_global_profiles_dir -get_host_ipaddr -get_host_ipaddr6 -get_hostname -get_hostname6 -get_key_string -get_mac_lte_proto_data -get_manuf_name_if_known -get_persconffile_path -get_persdatafile_dir -get_plugin_dir -get_plugins_pers_dir -get_profile_name -get_profiles_dir -get_progfile_dir -get_rose_ctx -get_sctp_port -get_systemfile_dir -get_tcp_port -get_tempfile_path -get_udp_port -get_wspython_dir -golay_decode -golay_encode -golay_errors -gsm_a_bssmap_msg_strings DATA -gsm_a_dtap_msg_cc_strings DATA -gsm_a_dtap_msg_gmm_strings DATA -gsm_a_dtap_msg_mm_strings DATA -gsm_a_dtap_msg_rr_strings DATA -gsm_a_dtap_msg_sm_strings DATA -gsm_a_dtap_msg_sms_strings DATA -gsm_a_dtap_msg_ss_strings DATA -gsm_a_dtap_msg_tp_strings DATA -gsm_a_pd_str DATA -gsm_a_rr_short_pd_msg_strings DATA -gsm_map_opr_code_strings DATA -gtcap_StatSRT DATA -guid_to_str -guids_add_guid -guids_get_guid_name -guids_init -guids_resolve_guid_to_str -h225_RasMessage_vals DATA -h225_ReleaseCompleteReason_vals DATA -h245_set_h223_add_lc_handle -h245_set_h223_set_mc_handle -h248_param_ber_integer -h248_register_package -has_global_profiles -have_custom_cols -have_filtering_tap_listeners -heur_dissector_add -heur_dissector_delete -hex_str_to_bytes -hf_frame_arrival_time DATA -hf_frame_capture_len DATA -hf_frame_len DATA -hf_frame_number DATA -hf_text_only DATA -host_ip_af -host_name_lookup_process -http_dissector_add -http_port_add -ieee80211_chan_to_mhz -ieee80211_mhz_to_chan -ieee80211_mhz_to_str -ieee802a_add_oui -in_cksum -incomplete_tcp_stream DATA -InfoRequestNakReason_vals DATA -init_dissection -init_progfile_dir -ip_to_str -ip6_to_str -ipprotostr -ipv4_get_net_order_addr -is_big_endian -is_default_profile -is_tpkt -isup_calling_partys_category_value_ext DATA -isup_message_type_value_acro_ext DATA -list_stat_cmd_args -llc_add_oui -LocationRejectReason_vals DATA -make_printable_string -mark_frame_as_depended_upon -match_strrval -match_strrval_idx -match_strval -match_strval_ext -match_strval_idx -md5_append -md5_finish -md5_hmac -md5_init -mtp3_addr_to_str_buf -mtp3_service_indicator_code_short_vals DATA -new_create_dissector_handle -new_register_dissector -next_tvb_add_handle -next_tvb_add_string -next_tvb_add_uint -next_tvb_call -next_tvb_init -nstime_cmp -nstime_copy -nstime_delta -nstime_is_unset -nstime_is_zero -nstime_set_unset -nstime_set_zero -nstime_sum -nstime_to_msec -nstime_to_sec -nt_cmd_vals_ext DATA -num_tree_types DATA -oid_add -oid_add_from_encoded -oid_add_from_string -oid_both -oid_both_from_encoded -oid_both_from_string -oid_encoded2string -oid_encoded2subid -oid_get -oid_get_default_mib_path -oid_get_from_encoded -oid_get_from_string -oid_has_dissector -oid_resolved -oid_resolved_from_encoded -oid_resolved_from_string -oid_string2encoded -oid_string2subid -oid_subid2encoded -oid_subid2string -oids_cleanup -oids_init -other_decode_bitfield_value -p_add_proto_data -p_get_proto_data -parse_key_string -pe_tree_create -pfilter_expression_head DATA -plugin_list DATA -plugins_dump_all -postseq_cleanup_all_protocols -prefs DATA -prefs_apply -prefs_apply_all -prefs_capture_device_monitor_mode -prefs_capture_options_dialog_column_is_visible -prefs_clear_string_list -prefs_find_module -prefs_find_preference -prefs_get_string_list -prefs_get_title_by_name -prefs_is_capture_device_hidden -prefs_is_registered_protocol -prefs_module_has_submodules -prefs_modules_foreach -prefs_modules_foreach_submodules -prefs_pref_foreach -prefs_pref_to_str -prefs_pref_type_description -prefs_pref_type_name -prefs_register_bool_preference -prefs_register_directory_preference -prefs_register_enum_preference -prefs_register_filename_preference -prefs_register_modules -prefs_register_obsolete_preference -prefs_register_protocol -prefs_register_protocol_subtree -prefs_register_range_preference -prefs_register_stat -prefs_register_static_text_preference -prefs_register_string_preference -prefs_register_uat_preference -prefs_register_uint_preference -prefs_reset -prefs_set_pref -process_reassembled_data -process_stat_cmd_arg -profile_exists -profile_store_persconffiles -proto_all_finfos -proto_can_match_selected -proto_can_toggle_protocol -proto_check_field_name -proto_construct_match_selected_string -proto_data DATA -proto_enable_all -proto_expert DATA -proto_field_is_referenced -proto_find_field_from_offset -proto_find_finfo -proto_frame DATA -proto_get_data_protocol -proto_get_finfo_ptr_array -proto_get_first_protocol -proto_get_first_protocol_field -proto_get_id -proto_get_id_by_filter_name -proto_get_next_protocol -proto_get_next_protocol_field -proto_get_protocol_filter_name -proto_get_protocol_long_name -proto_get_protocol_name -proto_get_protocol_short_name -proto_initialize_all_prefixes -proto_is_private -proto_is_protocol_enabled -proto_item_add_subtree -proto_item_append_string -proto_item_append_text -proto_item_fill_label -proto_item_get_len -proto_item_get_parent -proto_item_get_parent_nth -proto_item_get_subtree -proto_item_prepend_text -proto_item_set_end -proto_item_set_expert_flags -proto_item_set_len -proto_item_set_text -proto_malformed -proto_mark_private -proto_register_field_array -proto_register_prefix -proto_register_protocol -proto_register_subtree_array -proto_registrar_dump_fields -proto_registrar_dump_ftypes -proto_registrar_dump_protocols -proto_registrar_dump_values -proto_registrar_get_abbrev -proto_registrar_get_byname -proto_registrar_get_ftype -proto_registrar_get_nth -proto_registrar_get_parent -proto_registrar_is_protocol -proto_registrar_n -proto_set_cant_toggle -proto_set_decoding -proto_tracking_interesting_fields -proto_tree_add_bitmask -proto_tree_add_bitmask_text -proto_tree_add_bits_item -proto_tree_add_bits_ret_val -proto_tree_add_boolean -proto_tree_add_boolean_format -proto_tree_add_boolean_format_value -proto_tree_add_bytes -proto_tree_add_bytes_format -proto_tree_add_bytes_format_value -proto_tree_add_debug_text -proto_tree_add_double -proto_tree_add_double_format -proto_tree_add_double_format_value -proto_tree_add_ether -proto_tree_add_ether_format -proto_tree_add_ether_format_value -proto_tree_add_eui64 -proto_tree_add_eui64_format -proto_tree_add_eui64_format_value -proto_tree_add_float -proto_tree_add_float_format -proto_tree_add_float_format_value -proto_tree_add_guid -proto_tree_add_guid_format -proto_tree_add_guid_format_value -proto_tree_add_int -proto_tree_add_int_format -proto_tree_add_int_format_value -proto_tree_add_int64 -proto_tree_add_int64_format -proto_tree_add_int64_format_value -proto_tree_add_ipv4 -proto_tree_add_ipv4_format -proto_tree_add_ipv4_format_value -proto_tree_add_ipv6 -proto_tree_add_ipv6_format -proto_tree_add_ipv6_format_value -proto_tree_add_ipxnet -proto_tree_add_ipxnet_format -proto_tree_add_ipxnet_format_value -proto_tree_add_item -proto_tree_add_none_format -proto_tree_add_protocol_format -proto_tree_add_string -proto_tree_add_string_format -proto_tree_add_string_format_value -proto_tree_add_text -proto_tree_add_time -proto_tree_add_time_format -proto_tree_add_time_format_value -proto_tree_add_uint -proto_tree_add_uint_bits_format_value -proto_tree_add_uint_format -proto_tree_add_uint_format_value -proto_tree_add_uint64 -proto_tree_add_uint64_format -proto_tree_add_uint64_format_value -proto_tree_children_foreach -proto_tree_free -proto_tree_get_parent -proto_tree_get_root -proto_tree_move_item -proto_tree_set_appendix -proto_tree_set_visible -proto_unregister_field -protocols_module DATA -ptvcursor_add -ptvcursor_add_no_advance -ptvcursor_add_text_with_subtree -ptvcursor_add_with_subtree -ptvcursor_advance -ptvcursor_current_offset -ptvcursor_free -ptvcursor_new -ptvcursor_pop_subtree -ptvcursor_push_subtree -ptvcursor_set_subtree -ptvcursor_set_tree -ptvcursor_tree -ptvcursor_tvbuff -q850_cause_code_vals_ext DATA -q931_cause_code_vals_ext DATA -q931_message_type_vals DATA -range_convert_range -range_convert_str -range_copy -range_empty -range_foreach -ranges_are_equal -read_keytab_file -read_keytab_file_from_preferences -read_prefs -read_prefs_file -reassembled_table_init -register_all_plugin_tap_listeners -register_all_protocol_handoffs -register_all_protocols -register_ber_oid_dissector -register_ber_oid_dissector_handle -register_ber_oid_syntax -register_ber_syntax_dissector -register_codec -register_count -register_dissector -register_dissector_filter -register_dissector_table -register_final_registration_routine -register_giop_user -register_giop_user_module -register_heur_dissector_list -register_init_routine -register_postdissector -register_postseq_cleanup_routine -register_stat_cmd_arg -register_tap -register_tap_listener -RegistrationRejectReason_vals DATA -rel_time_to_secs_str -rel_time_to_str -remove_tap_listener -rename_persconffile_profile -report_failure -report_open_failure -report_read_failure -report_write_failure -req_resp_hdrs_do_reassembly -reset_tap_listeners -reset_tcp_reassembly -rose_ctx_clean_data -rose_ctx_init -rpc_init_proc_table -rpc_init_prog -rpc_proc_name -rpc_procs DATA -rpc_prog_hf -rpc_prog_name -rpc_progs DATA -rpc_roundup -rtcp_add_address -rtp_add_address -rtp_free_hash_dyn_payload -rtp_payload_type_short_vals_ext DATA -rtp_payload_type_vals_ext DATA -rtsp_status_code_vals DATA -running_in_build_directory -rval_to_str -sccp_message_type_acro_values DATA -scsi_mmc_vals DATA -scsi_osd_vals DATA -scsi_sbc_vals DATA -scsi_smc_vals DATA -scsi_ssc_vals DATA -se_alloc -se_alloc0 -se_memdup -se_strdup -se_strdup_printf -se_strdup_vprintf -se_strndup -se_tree_create -se_tree_create_non_persistent -set_actual_length -set_column_custom_field -set_column_custom_occurrence -set_column_format -set_column_resolved -set_column_title -set_column_visible -set_fd_time -set_mac_lte_proto_data -set_profile_name -set_tap_dfilter -show_exception -show_fragment_seq_tree -show_fragment_tree -sid_name_snooping DATA -sid_name_table DATA -sl_alloc -sl_alloc0 -sl_free -sl_free_all -smb_cmd_vals_ext DATA -smb_fid_types DATA -smb2_cmd_vals_ext DATA -sminmpec_values_ext DATA -srtcp_add_address -srtp_add_address -ssl_dissector_add -ssl_dissector_delete -ssl_session_hash DATA -ssl_set_master_secret -start_requested_stats -stats_tree_branch_max_namelen -stats_tree_branch_to_str -stats_tree_create_node -stats_tree_create_node_by_pname -stats_tree_create_pivot -stats_tree_create_pivot_by_pname -stats_tree_create_range_node -stats_tree_create_range_node_string -stats_tree_free -stats_tree_get_abbr -stats_tree_get_cfg_by_abbr -stats_tree_get_cfg_list -stats_tree_get_strs_from_node -stats_tree_manip_node -stats_tree_new -stats_tree_node_to_str -stats_tree_packet -stats_tree_parent_id_by_name -stats_tree_presentation -stats_tree_range_node_with_pname -stats_tree_register -stats_tree_register_plugin -stats_tree_register_with_group -stats_tree_reinit -stats_tree_reset -stats_tree_tick_pivot -stats_tree_tick_range -str_to_str -stream_add_frag -stream_find_frag -stream_new_circ -stream_process_reassembled -string_or_null -string_replace -string_to_name_resolve -sua_co_class_type_acro_values DATA -swaptab -T_h323_message_body_vals DATA -t30_facsimile_control_field_vals DATA -t30_facsimile_control_field_vals_short DATA -t38_add_address -t38_T30_data_vals DATA -t38_T30_indicator_vals DATA -tap_build_interesting -tap_listeners_require_dissection -tap_queue_packet -tcp_dissect_pdus -test_for_directory -test_for_fifo -tfs_accept_reject DATA -tfs_accepted_not_accepted DATA -tfs_ack_nack DATA -tfs_active_inactive DATA -tfs_allow_block DATA -tfs_allowed_not_allowed DATA -tfs_capable_not_capable DATA -tfs_command_response DATA -tfs_detected_not_detected DATA -tfs_enabled_disabled DATA -tfs_error_ok DATA -tfs_fail_success DATA -tfs_found_not_found DATA -tfs_high_low DATA -tfs_implemented_not_implemented DATA -tfs_more_nomore DATA -tfs_odd_even DATA -tfs_ok_error DATA -tfs_on_off DATA -tfs_present_absent DATA -tfs_present_not_present DATA -tfs_pressed_not_pressed DATA -tfs_reliable_not_reliable DATA -tfs_requested_not_requested DATA -tfs_restricted_allowed DATA -tfs_set_notset DATA -tfs_success_fail DATA -tfs_supported_not_supported DATA -tfs_true_false DATA -tfs_used_notused DATA -tfs_yes_no DATA -time_msecs_to_str -time_secs_to_str -timestamp_get_precision -timestamp_get_seconds_type -timestamp_get_type -timestamp_set_precision -timestamp_set_seconds_type -timestamp_set_type -trans2_cmd_vals_ext DATA -tree_is_expanded DATA -tvb_bcd_dig_to_ep_str -tvb_bytes_exist -tvb_bytes_to_str -tvb_bytes_to_str_punct -tvb_composite_append -tvb_composite_finalize -tvb_ensure_bytes_exist -tvb_ensure_length_remaining -tvb_ether_to_str -tvb_eui64_to_str -tvb_fake_unicode -tvb_fc_to_str -tvb_fcwwn_to_str -tvb_find_guint8 -tvb_find_line_end -tvb_find_line_end_unquoted -tvb_find_tvb -tvb_format_text -tvb_format_text_wsp -tvb_free -tvb_get_bits -tvb_get_bits_buf -tvb_get_bits16 -tvb_get_bits32 -tvb_get_bits64 -tvb_get_bits8 -tvb_get_const_stringz -tvb_get_ds_tvb -tvb_get_ephemeral_faked_unicode -tvb_get_ephemeral_string -tvb_get_ephemeral_string_enc -tvb_get_ephemeral_stringz -tvb_get_ephemeral_stringz_enc -tvb_get_guid -tvb_get_guint8 -tvb_get_ipv4 -tvb_get_ipv6 -tvb_get_letoh24 -tvb_get_letoh40 -tvb_get_letoh48 -tvb_get_letoh56 -tvb_get_letoh64 -tvb_get_letohguid -tvb_get_letohieee_double -tvb_get_letohieee_float -tvb_get_letohl -tvb_get_letohs -tvb_get_manuf_name -tvb_get_manuf_name_if_known -tvb_get_nstringz -tvb_get_nstringz0 -tvb_get_ntoh24 -tvb_get_ntoh40 -tvb_get_ntoh48 -tvb_get_ntoh56 -tvb_get_ntoh64 -tvb_get_ntohguid -tvb_get_ntohieee_double -tvb_get_ntohieee_float -tvb_get_ntohl -tvb_get_ntohs -tvb_get_ptr -tvb_get_string -tvb_get_stringz -tvb_get_stringz_enc -tvb_get_unicode_string -tvb_ip_to_str -tvb_ip6_to_str -tvb_length -tvb_length_remaining -tvb_memcpy -tvb_memdup -tvb_memeql -tvb_new_child_real_data -tvb_new_composite -tvb_new_octet_aligned -tvb_new_real_data -tvb_new_subset -tvb_new_subset_length -tvb_new_subset_remaining -tvb_offset_exists -tvb_offset_from_real_beginning -tvb_pbrk_guint8 -tvb_raw_offset -tvb_reported_length -tvb_reported_length_remaining -tvb_set_child_real_data_tvbuff -tvb_set_free_cb -tvb_set_reported_length -tvb_skip_wsp -tvb_skip_wsp_return -tvb_strncaseeql -tvb_strneql -tvb_strnlen -tvb_strsize -tvb_uncompress -tvb_unicode_strsize -tvbparse_casestring -tvbparse_char -tvbparse_chars -tvbparse_curr_offset -tvbparse_find -tvbparse_get -tvbparse_handle -tvbparse_hashed -tvbparse_hashed_add -tvbparse_init -tvbparse_not_char -tvbparse_not_chars -tvbparse_peek -tvbparse_quoted -tvbparse_reset -tvbparse_set_oneof -tvbparse_set_seq -tvbparse_shrink_token_cb -tvbparse_some -tvbparse_string -tvbparse_tree_add_elem -tvbparse_until -uat_add_record -uat_clear -uat_fld_chk_enum -uat_fld_chk_num_dec -uat_fld_chk_num_hex -uat_fld_chk_proto -uat_fld_chk_range -uat_fld_chk_str -uat_fld_chk_str_isalnum -uat_fld_chk_str_isalpha -uat_fld_chk_str_isdigit -uat_fld_chk_str_isprint -uat_fld_chk_str_isxdigit -uat_foreach_table -uat_get_table_by_name -uat_load -uat_new -uat_remove_record_idx -uat_save -uat_swap -union_of_tap_listener_flags -UnregRejectReason_vals DATA -UnregRequestReason_vals DATA -uri_str_to_bytes -val_to_str -val_to_str_const -val_to_str_ext -val_to_str_ext_const -value_is_in_range -write_prefs -ws_strdup_escape_char -ws_strdup_unescape_char -wslua_plugin_list DATA -wsp_vals_pdu_type_ext DATA -wsp_vals_status_ext DATA -wtap_nstime_to_sec -xml_escape -xml_get_attrib -xml_get_cdata -xml_get_tag diff --git a/epan/libwireshark.vcproj b/epan/libwireshark.vcproj index 049cd8981d..23cb5693f6 100644 --- a/epan/libwireshark.vcproj +++ b/epan/libwireshark.vcproj @@ -74,10 +74,6 @@ > - - diff --git a/epan/next_tvb.h b/epan/next_tvb.h index 695a1a2251..5e8ca5f04c 100644 --- a/epan/next_tvb.h +++ b/epan/next_tvb.h @@ -32,6 +32,8 @@ #ifndef __NEXT_TVB_H__ #define __NEXT_TVB_H__ +#include "ws_symbol_export.h" + typedef enum { NTVB_HANDLE, NTVB_UINT, @@ -59,10 +61,10 @@ typedef struct { int count; } next_tvb_list_t; -extern void next_tvb_init(next_tvb_list_t *list); -extern void next_tvb_add_handle(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_handle_t handle); -extern void next_tvb_add_uint(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, guint32 uint_val); -extern void next_tvb_add_string(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, const gchar *string); -extern void next_tvb_call(next_tvb_list_t *list, packet_info *pinfo, proto_tree *tree, dissector_handle_t handle, dissector_handle_t data_handle); +WS_DLL_PUBLIC void next_tvb_init(next_tvb_list_t *list); +WS_DLL_PUBLIC void next_tvb_add_handle(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_handle_t handle); +WS_DLL_PUBLIC void next_tvb_add_uint(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, guint32 uint_val); +WS_DLL_PUBLIC void next_tvb_add_string(next_tvb_list_t *list, tvbuff_t *tvb, proto_tree *tree, dissector_table_t table, const gchar *string); +WS_DLL_PUBLIC void next_tvb_call(next_tvb_list_t *list, packet_info *pinfo, proto_tree *tree, dissector_handle_t handle, dissector_handle_t data_handle); #endif /* __NEXT_TVB_H__ */ diff --git a/epan/nstime.h b/epan/nstime.h index 7c4b642e64..01fd469b62 100644 --- a/epan/nstime.h +++ b/epan/nstime.h @@ -28,6 +28,7 @@ #include #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -46,25 +47,25 @@ typedef struct { /* functions */ /** set the given nstime_t to zero */ -extern void nstime_set_zero(nstime_t *nstime); +WS_DLL_PUBLIC void nstime_set_zero(nstime_t *nstime); /** is the given nstime_t currently zero? */ -extern gboolean nstime_is_zero(nstime_t *nstime); +WS_DLL_PUBLIC gboolean nstime_is_zero(nstime_t *nstime); /** set the given nstime_t to (0,maxint) to mark it as "unset" * That way we can find the first frame even when a timestamp * is zero (fix for bug 1056) */ -extern void nstime_set_unset(nstime_t *nstime); +WS_DLL_PUBLIC void nstime_set_unset(nstime_t *nstime); /* is the given nstime_t currently (0,maxint)? */ -extern gboolean nstime_is_unset(nstime_t *nstime); +WS_DLL_PUBLIC gboolean nstime_is_unset(nstime_t *nstime); /** duplicate the current time * * a = b */ -extern void nstime_copy(nstime_t *a, const nstime_t *b); +WS_DLL_PUBLIC void nstime_copy(nstime_t *a, const nstime_t *b); /** calculate the delta between two times (can be negative!) * @@ -73,7 +74,7 @@ extern void nstime_copy(nstime_t *a, const nstime_t *b); * Note that it is acceptable for two or more of the arguments to point at the * same structure. */ -extern void nstime_delta(nstime_t *delta, const nstime_t *b, const nstime_t *a ); +WS_DLL_PUBLIC void nstime_delta(nstime_t *delta, const nstime_t *b, const nstime_t *a ); /** calculate the sum of two times * @@ -82,7 +83,7 @@ extern void nstime_delta(nstime_t *delta, const nstime_t *b, const nstime_t *a ) * Note that it is acceptable for two or more of the arguments to point at the * same structure. */ -extern void nstime_sum(nstime_t *sum, const nstime_t *b, const nstime_t *a ); +WS_DLL_PUBLIC void nstime_sum(nstime_t *sum, const nstime_t *b, const nstime_t *a ); /** sum += a */ #define nstime_add(sum, a) nstime_sum(sum, sum, a) @@ -96,16 +97,16 @@ extern void nstime_sum(nstime_t *sum, const nstime_t *b, const nstime_t *a ); * a = b : 0 * a < b : < 0 */ -extern int nstime_cmp (const nstime_t *a, const nstime_t *b ); +WS_DLL_PUBLIC int nstime_cmp (const nstime_t *a, const nstime_t *b ); /** converts nstime to double, time base is milli seconds */ -extern double nstime_to_msec(const nstime_t *nstime); +WS_DLL_PUBLIC double nstime_to_msec(const nstime_t *nstime); /** converts nstime to double, time base is seconds */ -extern double nstime_to_sec(const nstime_t *nstime); +WS_DLL_PUBLIC double nstime_to_sec(const nstime_t *nstime); /** converts wtap_nstime to double, time base is seconds */ -extern double wtap_nstime_to_sec(const struct wtap_nstime *nstime); +WS_DLL_PUBLIC double wtap_nstime_to_sec(const struct wtap_nstime *nstime); #ifdef __cplusplus } diff --git a/epan/oids.h b/epan/oids.h index 3fd03ff293..7d802ce8cd 100644 --- a/epan/oids.h +++ b/epan/oids.h @@ -29,6 +29,8 @@ #include #include +#include "ws_symbol_export.h" + /** *@file */ @@ -106,11 +108,11 @@ typedef struct _oid_info_t { } oid_info_t; /** init funcion called from epan.h */ -extern void oids_init(void); +WS_DLL_PUBLIC void oids_init(void); extern void oid_pref_init(module_t *nameres); /** init funcion called from epan.h */ -extern void oids_cleanup(void); +WS_DLL_PUBLIC void oids_cleanup(void); /* * The objects returned by all these functions are all allocated with a @@ -129,39 +131,43 @@ extern void oids_cleanup(void); */ /* return length of encoded buffer */ +WS_DLL_PUBLIC guint oid_subid2encoded(guint len, guint32* subids, guint8** encoded_p); +WS_DLL_PUBLIC guint oid_string2encoded(const gchar *oid_str, guint8** encoded_p); /* return length of subid array */ +WS_DLL_PUBLIC guint oid_encoded2subid(const guint8 *oid, gint len, guint32** subids_p); +WS_DLL_PUBLIC guint oid_string2subid(const gchar *oid_str, guint32** subids_p); -extern const gchar* oid_encoded2string(const guint8* encoded, guint len); -extern const gchar* oid_subid2string(guint32 *subids, guint len); +WS_DLL_PUBLIC const gchar* oid_encoded2string(const guint8* encoded, guint len); +WS_DLL_PUBLIC const gchar* oid_subid2string(guint32 *subids, guint len); /* these return a formated string as human readable as posible */ -extern const gchar *oid_resolved(guint len, guint32 *subids); -extern const gchar *oid_resolved_from_encoded(const guint8 *oid, gint len); -extern const gchar *oid_resolved_from_string(const gchar *oid_str); +WS_DLL_PUBLIC const gchar *oid_resolved(guint len, guint32 *subids); +WS_DLL_PUBLIC const gchar *oid_resolved_from_encoded(const guint8 *oid, gint len); +WS_DLL_PUBLIC const gchar *oid_resolved_from_string(const gchar *oid_str); /* these yield two formated strings one resolved and one numeric */ -extern void oid_both(guint oid_len, guint32 *subids, char** resolved_p, char** numeric_p); -extern void oid_both_from_encoded(const guint8 *oid, gint oid_len, char** resolved_p, char** numeric_p); -extern void oid_both_from_string(const gchar *oid_str, char** resolved_p, char** numeric_p); +WS_DLL_PUBLIC void oid_both(guint oid_len, guint32 *subids, char** resolved_p, char** numeric_p); +WS_DLL_PUBLIC void oid_both_from_encoded(const guint8 *oid, gint oid_len, char** resolved_p, char** numeric_p); +WS_DLL_PUBLIC void oid_both_from_string(const gchar *oid_str, char** resolved_p, char** numeric_p); /* * These return the info for the best match. * *matched_p will be set to the number of nodes used by the returned oid * *left_p will be set to the number of remaining unresolved subids */ -extern oid_info_t* oid_get(guint oid_len, guint32 *subids, guint* matched_p, guint* left_p); -extern oid_info_t* oid_get_from_encoded(const guint8 *oid, gint oid_len, guint32 **subids, guint* matched, guint* left); -extern oid_info_t* oid_get_from_string(const gchar *oid_str, guint32 **subids, guint* matched, guint* left); +WS_DLL_PUBLIC oid_info_t* oid_get(guint oid_len, guint32 *subids, guint* matched_p, guint* left_p); +WS_DLL_PUBLIC oid_info_t* oid_get_from_encoded(const guint8 *oid, gint oid_len, guint32 **subids, guint* matched, guint* left); +WS_DLL_PUBLIC oid_info_t* oid_get_from_string(const gchar *oid_str, guint32 **subids, guint* matched, guint* left); /* these are used to add oids to the collection */ -extern void oid_add(const char* name, guint oid_len, guint32 *subids); -extern void oid_add_from_encoded(const char* name, const guint8 *oid, gint oid_len); -extern void oid_add_from_string(const char* name, const gchar *oid_str); +WS_DLL_PUBLIC void oid_add(const char* name, guint oid_len, guint32 *subids); +WS_DLL_PUBLIC void oid_add_from_encoded(const char* name, const guint8 *oid, gint oid_len); +WS_DLL_PUBLIC void oid_add_from_string(const char* name, const gchar *oid_str); /** * Fetch the default MIB/PIB path @@ -169,7 +175,7 @@ extern void oid_add_from_string(const char* name, const gchar *oid_str); * @return A string containing the default MIB/PIB path. It must be * g_free()d by the caller. */ -extern gchar *oid_get_default_mib_path(void); +WS_DLL_PUBLIC gchar *oid_get_default_mib_path(void); /* macros for legacy oid functions */ #define oid_resolv_cleanup() ((void)0) diff --git a/epan/packet.h b/epan/packet.h index 88ec915c14..fca61710fe 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -37,6 +37,7 @@ #include "column-utils.h" #include "epan.h" #include "tfs.h" +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -132,102 +133,102 @@ typedef void (*DATFunc_heur_table) (const gchar *table_name,gpointer table, /* Opaque structure - provides type checking but no access to components */ typedef struct dtbl_entry dtbl_entry_t; -extern dissector_handle_t dtbl_entry_get_handle (dtbl_entry_t *dtbl_entry); -extern dissector_handle_t dtbl_entry_get_initial_handle (dtbl_entry_t * entry); -extern void dissector_table_foreach_changed (const char *name, DATFunc func, +WS_DLL_PUBLIC dissector_handle_t dtbl_entry_get_handle (dtbl_entry_t *dtbl_entry); +WS_DLL_PUBLIC dissector_handle_t dtbl_entry_get_initial_handle (dtbl_entry_t * entry); +void dissector_table_foreach_changed (const char *name, DATFunc func, gpointer user_data); -extern void dissector_table_foreach (const char *name, DATFunc func, +WS_DLL_PUBLIC void dissector_table_foreach (const char *name, DATFunc func, gpointer user_data); -extern void dissector_all_tables_foreach_changed (DATFunc func, +WS_DLL_PUBLIC void dissector_all_tables_foreach_changed (DATFunc func, gpointer user_data); -extern void dissector_table_foreach_handle(const char *name, DATFunc_handle func, +WS_DLL_PUBLIC void dissector_table_foreach_handle(const char *name, DATFunc_handle func, gpointer user_data); -extern void dissector_all_tables_foreach_table (DATFunc_table func, +WS_DLL_PUBLIC void dissector_all_tables_foreach_table (DATFunc_table func, gpointer user_data, GCompareFunc compare_key_func); /* a protocol uses the function to register a sub-dissector table */ -extern dissector_table_t register_dissector_table(const char *name, +WS_DLL_PUBLIC dissector_table_t register_dissector_table(const char *name, const char *ui_name, const ftenum_t type, const int base); /* Find a dissector table by table name. */ -extern dissector_table_t find_dissector_table(const char *name); +WS_DLL_PUBLIC dissector_table_t find_dissector_table(const char *name); /* Get the UI name for a sub-dissector table, given its internal name */ -extern const char *get_dissector_table_ui_name(const char *name); +WS_DLL_PUBLIC const char *get_dissector_table_ui_name(const char *name); /* Get the field type for values of the selector for a dissector table, given the table's internal name */ -extern ftenum_t get_dissector_table_selector_type(const char *name); +WS_DLL_PUBLIC ftenum_t get_dissector_table_selector_type(const char *name); /* Get the base to use when displaying values of the selector for a sub-dissector table, given the table's internal name */ -extern int get_dissector_table_base(const char *name); +WS_DLL_PUBLIC int get_dissector_table_base(const char *name); /* Add an entry to a uint dissector table. */ -extern void dissector_add_uint(const char *abbrev, const guint32 pattern, +WS_DLL_PUBLIC void dissector_add_uint(const char *abbrev, const guint32 pattern, dissector_handle_t handle); /* Delete the entry for a dissector in a uint dissector table with a particular pattern. */ -extern void dissector_delete_uint(const char *name, const guint32 pattern, +WS_DLL_PUBLIC void dissector_delete_uint(const char *name, const guint32 pattern, dissector_handle_t handle); /* Change the entry for a dissector in a uint dissector table with a particular pattern to use a new dissector handle. */ -extern void dissector_change_uint(const char *abbrev, const guint32 pattern, +WS_DLL_PUBLIC void dissector_change_uint(const char *abbrev, const guint32 pattern, dissector_handle_t handle); /* Reset an entry in a uint dissector table to its initial value. */ -extern void dissector_reset_uint(const char *name, const guint32 pattern); +WS_DLL_PUBLIC void dissector_reset_uint(const char *name, const guint32 pattern); /* Look for a given value in a given uint dissector table and, if found, call the dissector with the arguments supplied, and return TRUE, otherwise return FALSE. */ -extern gboolean dissector_try_uint(dissector_table_t sub_dissectors, +WS_DLL_PUBLIC gboolean dissector_try_uint(dissector_table_t sub_dissectors, const guint32 uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Look for a given value in a given uint dissector table and, if found, call the dissector with the arguments supplied, and return TRUE, otherwise return FALSE. */ -extern gboolean dissector_try_uint_new(dissector_table_t sub_dissectors, +gboolean dissector_try_uint_new(dissector_table_t sub_dissectors, const guint32 uint_val, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const gboolean add_proto_name, void *data); /* Look for a given value in a given uint dissector table and, if found, return the dissector handle for that value. */ -extern dissector_handle_t dissector_get_uint_handle( +WS_DLL_PUBLIC dissector_handle_t dissector_get_uint_handle( dissector_table_t const sub_dissectors, const guint32 uint_val); /* Add an entry to a string dissector table. */ -extern void dissector_add_string(const char *name, const gchar *pattern, +WS_DLL_PUBLIC void dissector_add_string(const char *name, const gchar *pattern, dissector_handle_t handle); /* Delete the entry for a dissector in a string dissector table with a particular pattern. */ -extern void dissector_delete_string(const char *name, const gchar *pattern, +WS_DLL_PUBLIC void dissector_delete_string(const char *name, const gchar *pattern, dissector_handle_t handle); /* Change the entry for a dissector in a string dissector table with a particular pattern to use a new dissector handle. */ -extern void dissector_change_string(const char *name, const gchar *pattern, +WS_DLL_PUBLIC void dissector_change_string(const char *name, const gchar *pattern, dissector_handle_t handle); /* Reset an entry in a string sub-dissector table to its initial value. */ -extern void dissector_reset_string(const char *name, const gchar *pattern); +WS_DLL_PUBLIC void dissector_reset_string(const char *name, const gchar *pattern); /* Look for a given string in a given dissector table and, if found, call the dissector with the arguments supplied, and return TRUE, otherwise return FALSE. */ -extern gboolean dissector_try_string(dissector_table_t sub_dissectors, +WS_DLL_PUBLIC gboolean dissector_try_string(dissector_table_t sub_dissectors, const gchar *string, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Look for a given value in a given string dissector table and, if found, return the dissector handle for that value. */ -extern dissector_handle_t dissector_get_string_handle( +WS_DLL_PUBLIC dissector_handle_t dissector_get_string_handle( dissector_table_t sub_dissectors, const gchar *string); /* Add a handle to the list of handles that *could* be used with this table. That list is used by code in the UI. */ -extern void dissector_add_handle(const char *name, dissector_handle_t handle); +WS_DLL_PUBLIC void dissector_add_handle(const char *name, dissector_handle_t handle); /* List of "heuristic" dissectors (which get handed a packet, look at it, and either recognize it as being for their protocol, dissect it, and @@ -248,10 +249,10 @@ typedef struct { * @param name the name of this protocol * @param list the list of heuristic sub-dissectors to be registered */ -extern void register_heur_dissector_list(const char *name, +WS_DLL_PUBLIC void register_heur_dissector_list(const char *name, heur_dissector_list_t *list); -extern void dissector_all_heur_tables_foreach_table (DATFunc_heur_table func, +WS_DLL_PUBLIC void dissector_all_heur_tables_foreach_table (DATFunc_heur_table func, gpointer user_data); /** Try all the dissectors in a given heuristic dissector list. This is done, @@ -265,7 +266,7 @@ extern void dissector_all_heur_tables_foreach_table (DATFunc_heur_table func, * @param data parameter to pass to subdissector * @return TRUE if the packet was recognized by the sub-dissector (stop dissection here) */ -extern gboolean dissector_try_heuristic(heur_dissector_list_t sub_dissectors, +WS_DLL_PUBLIC gboolean dissector_try_heuristic(heur_dissector_list_t sub_dissectors, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); /** Add a sub-dissector to a heuristic dissector list. @@ -275,7 +276,7 @@ extern gboolean dissector_try_heuristic(heur_dissector_list_t sub_dissectors, * @param dissector the sub-dissector to be registered * @param proto the protocol id of the sub-dissector */ -extern void heur_dissector_add(const char *name, heur_dissector_t dissector, +WS_DLL_PUBLIC void heur_dissector_add(const char *name, heur_dissector_t dissector, const int proto); /** Remove a sub-dissector from a heuristic dissector list. @@ -285,7 +286,7 @@ extern void heur_dissector_add(const char *name, heur_dissector_t dissector, * @param dissector the sub-dissector to be unregistered * @param proto the protocol id of the sub-dissector */ -extern void heur_dissector_delete(const char *name, heur_dissector_t dissector, const int proto); +WS_DLL_PUBLIC void heur_dissector_delete(const char *name, heur_dissector_t dissector, const int proto); /** Enable/Disable a sub-dissector in a heuristic dissector list * Call this in the prefs_reinit function of the sub-dissector. @@ -298,27 +299,27 @@ extern void heur_dissector_delete(const char *name, heur_dissector_t dissector, extern void heur_dissector_set_enabled(const char *name, heur_dissector_t dissector, const int proto, const gboolean enabled); /* Register a dissector. */ -extern void register_dissector(const char *name, dissector_t dissector, +WS_DLL_PUBLIC void register_dissector(const char *name, dissector_t dissector, const int proto); -extern void new_register_dissector(const char *name, new_dissector_t dissector, +WS_DLL_PUBLIC void new_register_dissector(const char *name, new_dissector_t dissector, const int proto); /* Get the long name of the protocol for a dissector handle. */ extern const char *dissector_handle_get_long_name(const dissector_handle_t handle); /* Get the short name of the protocol for a dissector handle. */ -extern const char *dissector_handle_get_short_name(const dissector_handle_t handle); +WS_DLL_PUBLIC const char *dissector_handle_get_short_name(const dissector_handle_t handle); /* Get the index of the protocol for a dissector handle. */ -extern int dissector_handle_get_protocol_index(const dissector_handle_t handle); +WS_DLL_PUBLIC int dissector_handle_get_protocol_index(const dissector_handle_t handle); /* Find a dissector by name. */ -extern dissector_handle_t find_dissector(const char *name); +WS_DLL_PUBLIC dissector_handle_t find_dissector(const char *name); /* Create an anonymous handle for a dissector. */ -extern dissector_handle_t create_dissector_handle(dissector_t dissector, +WS_DLL_PUBLIC dissector_handle_t create_dissector_handle(dissector_t dissector, const int proto); -extern dissector_handle_t new_create_dissector_handle(new_dissector_t dissector, +WS_DLL_PUBLIC dissector_handle_t new_create_dissector_handle(new_dissector_t dissector, const int proto); /* Call a dissector through a handle and if no dissector was found @@ -334,9 +335,9 @@ extern dissector_handle_t new_create_dissector_handle(new_dissector_t dissector, * dissector, call the dissector and return its return value, otherwise call * it and return the length of the tvbuff pointed to by the argument. */ -extern int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb, +WS_DLL_PUBLIC int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); -extern int call_dissector(dissector_handle_t handle, tvbuff_t *tvb, +WS_DLL_PUBLIC int call_dissector(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* Call a dissector through a handle but if no dissector was found @@ -352,7 +353,7 @@ extern int call_dissector(dissector_handle_t handle, tvbuff_t *tvb, * dissector, call the dissector and return its return value, otherwise call * it and return the length of the tvbuff pointed to by the argument. */ -extern int call_dissector_only(dissector_handle_t handle, tvbuff_t *tvb, +WS_DLL_PUBLIC int call_dissector_only(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data); /* Do all one-time initialization. */ @@ -364,28 +365,28 @@ extern void dissect_cleanup(void); * Given a tvbuff, and a length from a packet header, adjust the length * of the tvbuff to reflect the specified length. */ -extern void set_actual_length(tvbuff_t *tvb, const guint specified_len); +WS_DLL_PUBLIC void set_actual_length(tvbuff_t *tvb, const guint specified_len); /* Allow protocols to register "init" routines, which are called before we make a pass through a capture file and dissect all its packets (e.g., when we read in a new capture file, or run a "filter packets" or "colorize packets" pass over the current capture file). */ -extern void register_init_routine(void (*func)(void)); +WS_DLL_PUBLIC void register_init_routine(void (*func)(void)); /* Initialize all data structures used for dissection. */ -extern void init_dissection(void); +WS_DLL_PUBLIC void init_dissection(void); /* Free data structures allocated for dissection. */ -extern void cleanup_dissection(void); +WS_DLL_PUBLIC void cleanup_dissection(void); /* Allow protocols to register a "cleanup" routine to be * run after the initial sequential run through the packets. * Note that the file can still be open after this; this is not * the final cleanup. */ -extern void register_postseq_cleanup_routine(void (*func)(void)); +WS_DLL_PUBLIC void register_postseq_cleanup_routine(void (*func)(void)); /* Call all the registered "postseq_cleanup" routines. */ -extern void postseq_cleanup_all_protocols(void); +WS_DLL_PUBLIC void postseq_cleanup_all_protocols(void); /* Allow dissectors to register a "final_registration" routine * that is run like the proto_register_XXX() routine, but the end @@ -394,7 +395,7 @@ extern void postseq_cleanup_all_protocols(void); * useful for dissector registration routines which need to compile * display filters. dfilters can't initialize itself until all protocols * have registereed themselvs. */ -extern void +WS_DLL_PUBLIC void register_final_registration_routine(void (*func)(void)); /* Call all the registered "final_registration" routines. */ @@ -405,7 +406,7 @@ final_registration_all_protocols(void); * Add a new data source to the list of data sources for a frame, given * the tvbuff for the data source and its name. */ -extern void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, +WS_DLL_PUBLIC void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, const char *name); @@ -413,8 +414,8 @@ extern void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, * Return the data source name, tvb. */ struct data_source; -extern const char *get_data_source_name(const struct data_source *src); -extern tvbuff_t *get_data_source_tvb(const struct data_source *src); +WS_DLL_PUBLIC const char *get_data_source_name(const struct data_source *src); +WS_DLL_PUBLIC tvbuff_t *get_data_source_tvb(const struct data_source *src); /* * Free up a frame's list of data sources. @@ -427,7 +428,7 @@ extern void free_data_sources(packet_info *pinfo); * if the user does a File->Save-As of only the Displayed packets and the * current frame passed the display filter. */ -extern void mark_frame_as_depended_upon(packet_info *pinfo, guint32 frame_num); +WS_DLL_PUBLIC void mark_frame_as_depended_upon(packet_info *pinfo, guint32 frame_num); /* * Dissectors should never modify the packet data. @@ -439,7 +440,7 @@ extern void dissect_packet(epan_dissect_t *edt, /* These functions are in packet-ethertype.c */ extern void capture_ethertype(guint16 etype, const guchar *pd, int offset, int len, packet_counts *ld); -extern void ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_ethertype, +WS_DLL_PUBLIC void ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_ethertype, packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, int etype_id, int trailer_id, int fcs_len); @@ -447,18 +448,18 @@ extern void ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_ethertype, * Dump layer/selector/dissector records in a fashion similar to the * proto_registrar_dump_* routines. */ -extern void dissector_dump_decodes(void); +WS_DLL_PUBLIC void dissector_dump_decodes(void); /* * For each heuristic dissector table, dump list of dissectors (filter_names) for that table */ -extern void dissector_dump_heur_decodes(void); +WS_DLL_PUBLIC void dissector_dump_heur_decodes(void); /* * post dissectors are to be called by packet-frame.c after every other * dissector has been called. */ -extern void register_postdissector(dissector_handle_t); +WS_DLL_PUBLIC void register_postdissector(dissector_handle_t); extern gboolean have_postdissector(void); extern void call_all_postdissectors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); diff --git a/epan/plugins.h b/epan/plugins.h index 0892857d17..4ac73bc5ab 100644 --- a/epan/plugins.h +++ b/epan/plugins.h @@ -33,6 +33,7 @@ extern "C" { #include #include "packet.h" +#include "ws_symbol_export.h" typedef struct _plugin { GModule *handle; /* handle returned by g_module_open */ @@ -46,13 +47,13 @@ typedef struct _plugin { struct _plugin *next; /* forward link */ } plugin; -WS_VAR_IMPORT plugin *plugin_list; +WS_DLL_PUBLIC plugin *plugin_list; extern void init_plugins(void); extern void register_all_plugin_registrations(void); extern void register_all_plugin_handoffs(void); -extern void register_all_plugin_tap_listeners(void); -extern void plugins_dump_all(void); +WS_DLL_PUBLIC void register_all_plugin_tap_listeners(void); +WS_DLL_PUBLIC void plugins_dump_all(void); typedef struct _wslua_plugin { gchar *name; /**< plugin name */ @@ -61,7 +62,7 @@ typedef struct _wslua_plugin { struct _wslua_plugin *next; } wslua_plugin; -WS_VAR_IMPORT wslua_plugin *wslua_plugin_list; +WS_DLL_PUBLIC wslua_plugin *wslua_plugin_list; #ifdef __cplusplus } diff --git a/epan/prefs-int.h b/epan/prefs-int.h index 46c19429f0..8b9379714b 100644 --- a/epan/prefs-int.h +++ b/epan/prefs-int.h @@ -27,6 +27,7 @@ #define __PREFS_INT_H__ #include +#include "ws_symbol_export.h" /** *@file @@ -63,7 +64,7 @@ typedef struct { * Module used for protocol preferences. * With MSVC and a libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT module_t *protocols_module; +WS_DLL_PUBLIC module_t *protocols_module; typedef void (*pref_custom_free_cb) (pref_t* pref); typedef void (*pref_custom_reset_cb) (pref_t* pref); @@ -170,6 +171,7 @@ typedef prefs_set_pref_e (*pref_set_pair_cb) (gchar *key, const gchar *value, vo /** read the preferences file (or similiar) and call the callback * function to set each key/value pair found */ +WS_DLL_PUBLIC int read_prefs_file(const char *pf_path, FILE *pf, pref_set_pair_cb pref_set_pair_fct, void *private_data); diff --git a/epan/prefs.h b/epan/prefs.h index 8249bc42ce..d4053545fd 100644 --- a/epan/prefs.h +++ b/epan/prefs.h @@ -36,6 +36,7 @@ extern "C" { #include #include #include +#include "ws_symbol_export.h" #define PR_DEST_CMD 0 #define PR_DEST_FILE 1 @@ -55,6 +56,7 @@ extern "C" { * Set "*name_resolve" to the bitmask, and return '\0', on success; * return the bad character in the string on error. */ +WS_DLL_PUBLIC char string_to_name_resolve(const char *string, e_addr_resolve *name_resolve); /* @@ -195,7 +197,7 @@ typedef struct _e_prefs { gint gui_update_interval; } e_prefs; -WS_VAR_IMPORT e_prefs prefs; +WS_DLL_PUBLIC e_prefs prefs; /* * Routines to let modules that have preference settings register @@ -209,13 +211,13 @@ struct pref_custom_cbs; typedef struct pref_module module_t; /** Sets up memory used by proto routines. Called at program startup */ -extern void prefs_init(void); +void prefs_init(void); /** Reset preferences to default values. Called at profile change */ -extern void prefs_reset(void); +WS_DLL_PUBLIC void prefs_reset(void); /** Frees memory used by proto routines. Called at program shutdown */ -extern void prefs_cleanup(void); +void prefs_cleanup(void); /* * Register a module that will have preferences. @@ -231,7 +233,7 @@ extern void prefs_cleanup(void); * name is the protocol name specified at the "proto_register_protocol()" * call so that the "Protocol Properties..." menu item works. */ -extern module_t *prefs_register_module(module_t *parent, const char *name, +module_t *prefs_register_module(module_t *parent, const char *name, const char *title, const char *description, void (*apply_cb)(void), const gboolean use_gui); @@ -241,13 +243,13 @@ extern module_t *prefs_register_module(module_t *parent, const char *name, * at the top level and the title used in the tab for it in a preferences * dialog box. */ -extern module_t *prefs_register_subtree(module_t *parent, const char *title, +module_t *prefs_register_subtree(module_t *parent, const char *title, const char *description, void (*apply_cb)(void)); /* * Register that a protocol has preferences. */ -extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void)); +WS_DLL_PUBLIC module_t *prefs_register_protocol(int id, void (*apply_cb)(void)); /* * Register that a statistical tap has preferences. @@ -259,7 +261,7 @@ extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void)); * * "description" is a longer human-readable description of the tap. */ -extern module_t *prefs_register_stat(const char *name, const char *title, +WS_DLL_PUBLIC module_t *prefs_register_stat(const char *name, const char *title, const char *description, void (*apply_cb)(void)); @@ -268,14 +270,14 @@ extern module_t *prefs_register_stat(const char *name, const char *title, * subtree */ #define PREFERENCE_GROUPING -extern module_t *prefs_register_protocol_subtree(const char *subtree, int id, +WS_DLL_PUBLIC module_t *prefs_register_protocol_subtree(const char *subtree, int id, void (*apply_cb)(void)); /* * Register that a protocol used to have preferences but no longer does, * by creating an "obsolete" module for it. */ -extern module_t *prefs_register_protocol_obsolete(int id); +module_t *prefs_register_protocol_obsolete(int id); /* * Callback function for module list scanners. @@ -285,7 +287,7 @@ typedef guint (*module_cb)(module_t *module, gpointer user_data); /* * Returns TRUE if module has any submodules */ -extern gboolean prefs_module_has_submodules(module_t *module); +WS_DLL_PUBLIC gboolean prefs_module_has_submodules(module_t *module); /* * Call a callback function, with a specified argument, for each module @@ -295,7 +297,7 @@ extern gboolean prefs_module_has_submodules(module_t *module); * preferences for dissectors that no longer have preferences to be * silently ignored in preference files. */ -extern guint prefs_modules_foreach(module_cb callback, gpointer user_data); +WS_DLL_PUBLIC guint prefs_modules_foreach(module_cb callback, gpointer user_data); /* * Call a callback function, with a specified argument, for each submodule @@ -307,7 +309,7 @@ extern guint prefs_modules_foreach(module_cb callback, gpointer user_data); * silently ignored in preference files. Does not ignore subtrees, * as this can be used when walking the display tree of modules. */ -extern guint prefs_modules_foreach_submodules(module_t *module, module_cb callback, gpointer user_data); +WS_DLL_PUBLIC guint prefs_modules_foreach_submodules(module_t *module, module_cb callback, gpointer user_data); /* * Call the "apply" callback function for each module if any of its @@ -315,7 +317,7 @@ extern guint prefs_modules_foreach_submodules(module_t *module, module_cb callba * preferences have changed, as the module has been notified of that * fact. */ -extern void prefs_apply_all(void); +WS_DLL_PUBLIC void prefs_apply_all(void); /* * Call the "apply" callback function for a specific module if any of @@ -323,7 +325,7 @@ extern void prefs_apply_all(void); * preferences have changed, as the module has been notified of that * fact. */ -extern void prefs_apply(module_t *module); +WS_DLL_PUBLIC void prefs_apply(module_t *module); struct preference; @@ -333,12 +335,12 @@ typedef struct preference pref_t; /* * Returns TRUE if the given protocol has registered preferences. */ -extern gboolean prefs_is_registered_protocol(const char *name); +WS_DLL_PUBLIC gboolean prefs_is_registered_protocol(const char *name); /* * Returns the module title of a registered protocol (or NULL if unknown). */ -extern const char *prefs_get_title_by_name(const char *name); +WS_DLL_PUBLIC const char *prefs_get_title_by_name(const char *name); /** Given a module name, return a pointer to its pref_module struct, * or NULL if it's not found. @@ -348,7 +350,7 @@ extern const char *prefs_get_title_by_name(const char *name); * @return A pointer to the corresponding preference module, or NULL if it * wasn't found. */ -extern module_t *prefs_find_module(const char *name); +WS_DLL_PUBLIC module_t *prefs_find_module(const char *name); /** Given a module name, and a preference name return a pointer to the given * module's given preference or NULL if it's not found. @@ -359,32 +361,32 @@ extern module_t *prefs_find_module(const char *name); * @return A pointer to the corresponding preference, or NULL if it * wasn't found. */ -extern pref_t *prefs_find_preference(module_t * module, const char *pref); +WS_DLL_PUBLIC pref_t *prefs_find_preference(module_t * module, const char *pref); /* * Register a preference with an unsigned integral value. */ -extern void prefs_register_uint_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_uint_preference(module_t *module, const char *name, const char *title, const char *description, guint base, guint *var); /* * Register a preference with an Boolean value. * Note that the name must be in lowercase letters only (underscore allowed). */ -extern void prefs_register_bool_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_bool_preference(module_t *module, const char *name, const char *title, const char *description, gboolean *var); /* * Register a preference with an enumerated value. */ -extern void prefs_register_enum_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_enum_preference(module_t *module, const char *name, const char *title, const char *description, gint *var, const enum_val_t *enumvals, gboolean radio_buttons); /* * Register a preference with a character-string value. */ -extern void prefs_register_string_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_string_preference(module_t *module, const char *name, const char *title, const char *description, const char **var); /* @@ -393,7 +395,7 @@ extern void prefs_register_string_preference(module_t *module, const char *name, * except that the GUI gives the user the ability to browse for the * file. */ -extern void prefs_register_filename_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_filename_preference(module_t *module, const char *name, const char *title, const char *description, const char **var); /* @@ -402,27 +404,27 @@ extern void prefs_register_filename_preference(module_t *module, const char *nam * except that the GUI gives the user the ability to browse for a * directory. */ -extern void prefs_register_directory_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_directory_preference(module_t *module, const char *name, const char *title, const char *description, const char **var); /* * Register a preference with a ranged value. */ -extern void prefs_register_range_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_range_preference(module_t *module, const char *name, const char *title, const char *description, range_t **var, guint32 max_value); /* * Register a static text 'preference'. It can be used to add some info/explanation. */ -extern void prefs_register_static_text_preference(module_t *module, const char *name, +WS_DLL_PUBLIC void prefs_register_static_text_preference(module_t *module, const char *name, const char *title, const char *description); /* * Register a uat 'preference'. It adds a button that opens the uat's window in the * preferences tab of the module. */ -extern void prefs_register_uat_preference(module_t *module, +WS_DLL_PUBLIC void prefs_register_uat_preference(module_t *module, const char *name, const char* title, const char *description, @@ -434,7 +436,7 @@ extern void prefs_register_uat_preference(module_t *module, * "GUI preferences" to aid in reading/writing the preferences file, but the * "data" is still managed by the specific "GUI preferences" dialog. */ -extern void prefs_register_color_preference(module_t *module, const char *name, +void prefs_register_color_preference(module_t *module, const char *name, const char *title, const char *description, color_t *color); /* @@ -443,14 +445,14 @@ extern void prefs_register_color_preference(module_t *module, const char *name, * "GUI preferences" to aid in reading/writing the preferences file, but the * "data" is still managed by the specific "GUI preferences" dialog. */ -extern void prefs_register_custom_preference(module_t *module, const char *name, +void prefs_register_custom_preference(module_t *module, const char *name, const char *title, const char *description, struct pref_custom_cbs* custom_cbs, void** custom_data); /* * Register a preference that used to be supported but no longer is. */ -extern void prefs_register_obsolete_preference(module_t *module, +WS_DLL_PUBLIC void prefs_register_obsolete_preference(module_t *module, const char *name); @@ -463,21 +465,21 @@ typedef guint (*pref_cb)(pref_t *pref, gpointer user_data); * If any of the callbacks return a non-zero value, stop and return that * value, otherwise return 0. */ -extern guint prefs_pref_foreach(module_t *module, pref_cb callback, +WS_DLL_PUBLIC guint prefs_pref_foreach(module_t *module, pref_cb callback, gpointer user_data); /* Parse through a list of comma-separated, possibly quoted strings. * Return a list of the string data. */ -extern GList *prefs_get_string_list(const gchar *str); +WS_DLL_PUBLIC GList *prefs_get_string_list(const gchar *str); /* Clear the given list of string data. */ -extern void prefs_clear_string_list(GList *sl); +WS_DLL_PUBLIC void prefs_clear_string_list(GList *sl); /* * Register all non-dissector modules' preferences. */ -extern void prefs_register_modules(void); +WS_DLL_PUBLIC void prefs_register_modules(void); /** Fetch a short preference type name, e.g. "Integer". * @@ -485,6 +487,7 @@ extern void prefs_register_modules(void); * * @return The preference type name. May be NULL. */ +WS_DLL_PUBLIC const char *prefs_pref_type_name(pref_t *pref); /** Fetch a long description of the preference type @@ -495,6 +498,7 @@ const char *prefs_pref_type_name(pref_t *pref); * values for enums. The description may include newlines. Must be * g_free()d. */ +WS_DLL_PUBLIC char *prefs_pref_type_description(pref_t *pref); /** Fetch a string representation of the preference. @@ -505,6 +509,7 @@ char *prefs_pref_type_description(pref_t *pref); * * @return A string representation of the preference. Must be g_free()d. */ +WS_DLL_PUBLIC char *prefs_pref_to_str(pref_t *pref, pref_source_t source); /* Read the preferences file, fill in "prefs", and return a pointer to it. @@ -520,13 +525,13 @@ char *prefs_pref_to_str(pref_t *pref, pref_source_t source); on an open error and into "*pf_read_errno_return" on a read error, stuff a pointer to the path of the file into "*pf_path_return", and return NULL. */ -extern e_prefs *read_prefs(int *, int *, char **, int *, int *, char **); +WS_DLL_PUBLIC e_prefs *read_prefs(int *, int *, char **, int *, int *, char **); /* Write out "prefs" to the user's preferences file, and return 0. If we got an error, stuff a pointer to the path of the preferences file into "*pf_path_return", and return the errno. */ -extern int write_prefs(char **); +WS_DLL_PUBLIC int write_prefs(char **); /* * Given a string of the form ":", as might appear @@ -544,28 +549,28 @@ typedef enum { PREFS_SET_OBSOLETE /* preference used to exist but no longer does */ } prefs_set_pref_e; -extern prefs_set_pref_e prefs_set_pref(char *prefarg); +WS_DLL_PUBLIC prefs_set_pref_e prefs_set_pref(char *prefarg); /* * Get or set a preference's obsolete status. These can be used to make a * preference obsolete after startup so that we can fetch its value but * keep it from showing up in the prefrences dialog. */ -extern gboolean prefs_get_preference_obsolete(pref_t *pref); -extern prefs_set_pref_e prefs_set_preference_obsolete(pref_t *pref); +gboolean prefs_get_preference_obsolete(pref_t *pref); +prefs_set_pref_e prefs_set_preference_obsolete(pref_t *pref); /* * Returns TRUE if the given device is hidden */ -extern gboolean prefs_is_capture_device_hidden(const char *name); +WS_DLL_PUBLIC gboolean prefs_is_capture_device_hidden(const char *name); /* * Returns TRUE if the given device should capture in monitor mode by default */ -extern gboolean prefs_capture_device_monitor_mode(const char *name); +WS_DLL_PUBLIC gboolean prefs_capture_device_monitor_mode(const char *name); -extern gboolean prefs_capture_options_dialog_column_is_visible(const gchar *column); +WS_DLL_PUBLIC gboolean prefs_capture_options_dialog_column_is_visible(const gchar *column); #ifdef __cplusplus } diff --git a/epan/proto.h b/epan/proto.h index 9a77c9c997..0e2d051dcf 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -51,13 +51,14 @@ #include "tvbuff.h" #include "ftypes/ftypes.h" #include "register.h" +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** The header-field index for the special text pseudo-field. Exported by libwireshark.dll */ -WS_VAR_IMPORT int hf_text_only; +WS_DLL_PUBLIC int hf_text_only; /** the maximum length of a protocol field string representation */ #define ITEM_LABEL_LENGTH 240 @@ -580,7 +581,7 @@ typedef gboolean (*proto_tree_traverse_func)(proto_node *, gpointer); extern gboolean proto_tree_traverse_post_order(proto_tree *tree, proto_tree_traverse_func func, gpointer data); -extern void proto_tree_children_foreach(proto_tree *tree, +WS_DLL_PUBLIC void proto_tree_children_foreach(proto_tree *tree, proto_tree_foreach_func func, gpointer data); /** Retrieve the field_info from a proto_node */ @@ -596,7 +597,7 @@ extern void proto_tree_children_foreach(proto_tree *tree, #define PTREE_DATA(proto_tree) ((proto_tree)->tree_data) /** Sets up memory used by proto routines. Called at program startup */ -extern void proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_data), +void proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_data), void (register_all_handoffs_func)(register_cb cb, gpointer client_data), register_cb cb, void *client_data); @@ -617,55 +618,55 @@ extern void proto_cleanup(void); The purpose of this is to optimize wireshark for speed and make it faster for when filters are being used. */ -extern gboolean proto_field_is_referenced(proto_tree *tree, int proto_id); +WS_DLL_PUBLIC gboolean proto_field_is_referenced(proto_tree *tree, int proto_id); /** Create a subtree under an existing item. @param ti the parent item of the new subtree @param idx one of the ett_ array elements registered with proto_register_subtree_array() @return the new subtree */ -extern proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx) G_GNUC_WARN_UNUSED_RESULT; +WS_DLL_PUBLIC proto_tree* proto_item_add_subtree(proto_item *ti, const gint idx) G_GNUC_WARN_UNUSED_RESULT; /** Get an existing subtree under an item. @param ti the parent item of the subtree @return the subtree or NULL */ -extern proto_tree* proto_item_get_subtree(const proto_item *ti); +WS_DLL_PUBLIC proto_tree* proto_item_get_subtree(const proto_item *ti); /** Get the parent of a subtree item. @param ti the child item in the subtree @return parent item or NULL */ -extern proto_item* proto_item_get_parent(const proto_item *ti); +WS_DLL_PUBLIC proto_item* proto_item_get_parent(const proto_item *ti); /** Get Nth generation parent item. @param ti the child item in the subtree @param gen the generation to get (using 1 here is the same as using proto_item_get_parent()) @return parent item */ -extern proto_item* proto_item_get_parent_nth(proto_item *ti, int gen); +WS_DLL_PUBLIC proto_item* proto_item_get_parent_nth(proto_item *ti, int gen); /** Replace text of item after it already has been created. @param ti the item to set the text @param format printf like format string @param ... printf like parameters */ -extern void proto_item_set_text(proto_item *ti, const char *format, ...) +WS_DLL_PUBLIC void proto_item_set_text(proto_item *ti, const char *format, ...) G_GNUC_PRINTF(2,3); /** Append to text of item after it has already been created. @param ti the item to append the text to @param format printf like format string @param ... printf like parameters */ -extern void proto_item_append_text(proto_item *ti, const char *format, ...) +WS_DLL_PUBLIC void proto_item_append_text(proto_item *ti, const char *format, ...) G_GNUC_PRINTF(2,3); /** Prepend to text of item after it has already been created. @param ti the item to prepend the text to @param format printf like format string @param ... printf like parameters */ -extern void proto_item_prepend_text(proto_item *ti, const char *format, ...) +WS_DLL_PUBLIC void proto_item_prepend_text(proto_item *ti, const char *format, ...) G_GNUC_PRINTF(2,3); /** Set proto_item's length inside tvb, after it has already been created. @param ti the item to set the length @param length the new length ot the item */ -extern void proto_item_set_len(proto_item *ti, const gint length); +WS_DLL_PUBLIC void proto_item_set_len(proto_item *ti, const gint length); /** * Sets the length of the item based on its start and on the specified @@ -677,13 +678,13 @@ extern void proto_item_set_len(proto_item *ti, const gint length); @param end this end offset is relative to the beginning of tvb @todo make usage clearer, I don't understand it! */ -extern void proto_item_set_end(proto_item *ti, tvbuff_t *tvb, gint end); +WS_DLL_PUBLIC void proto_item_set_end(proto_item *ti, tvbuff_t *tvb, gint end); /** Get length of a proto_item. Useful after using proto_tree_add_item() * to add a variable-length field (e.g., FT_NSTRING_UINT8). @param ti the item to get the length from @return the current length */ -extern int proto_item_get_len(const proto_item *ti); +WS_DLL_PUBLIC int proto_item_get_len(const proto_item *ti); /** * Sets an expert info to the proto_item. @@ -692,7 +693,7 @@ extern int proto_item_get_len(const proto_item *ti); @param severity of this info (e.g. PI_ERROR) @return TRUE if value was written */ -extern gboolean proto_item_set_expert_flags(proto_item *ti, const int group, const guint severity); +WS_DLL_PUBLIC gboolean proto_item_set_expert_flags(proto_item *ti, const int group, const guint severity); @@ -703,7 +704,7 @@ extern proto_tree* proto_tree_create_root(struct _packet_info *pinfo); /** Clear memory for entry proto_tree. Clears proto_tree struct also. @param tree the tree to free */ -extern void proto_tree_free(proto_tree *tree); +WS_DLL_PUBLIC void proto_tree_free(proto_tree *tree); /** Set the tree visible or invisible. Is the parsing being done for a visible proto_tree or an invisible one? @@ -712,7 +713,7 @@ extern void proto_tree_free(proto_tree *tree); @param tree the tree to be set @param visible ... or not @return the old value */ -extern gboolean +WS_DLL_PUBLIC gboolean proto_tree_set_visible(proto_tree *tree, gboolean visible); /** Indicate whether we should fake protocols during dissection (default = TRUE) @@ -731,18 +732,18 @@ proto_tree_prime_hfid(proto_tree *tree, const int hfid); /** Get a parent item of a subtree. @param tree the tree to get the parent from @return parent item */ -extern proto_item* proto_tree_get_parent(const proto_tree *tree); +WS_DLL_PUBLIC proto_item* proto_tree_get_parent(const proto_tree *tree); /** Get the root tree from any subtree. @param tree the tree to get the root from @return root tree */ -extern proto_tree* proto_tree_get_root(proto_tree *tree); +WS_DLL_PUBLIC proto_tree* proto_tree_get_root(proto_tree *tree); /** Move an existing item behind another existing item. @param tree the tree to which both items belong @param fixed_item the item which keeps its position @param item_to_move the item which will be moved */ -extern void proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto_item *item_to_move); +WS_DLL_PUBLIC void proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto_item *item_to_move); /** Set start and length of an appendix for a proto_tree. @@ -750,7 +751,7 @@ extern void proto_tree_move_item(proto_tree *tree, proto_item *fixed_item, proto @param tvb the tv buffer of the current data @param start the start offset of the appendix @param length the length of the appendix */ -extern void proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, const gint length); +WS_DLL_PUBLIC void proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, const gint length); /** Add an item to a proto_tree, using the text label registered to that item. @@ -762,7 +763,7 @@ extern void proto_tree_set_appendix(proto_tree *tree, tvbuff_t *tvb, gint start, @param length length of data in tvb @param encoding data encoding @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding); @@ -774,7 +775,7 @@ proto_tree_add_item(proto_tree *tree, const int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format, ...) G_GNUC_PRINTF(5,6); @@ -786,7 +787,7 @@ proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, co @param format printf like format string @param ap variable argument list @return the newly created item */ -extern proto_item * +proto_item * proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *format, va_list ap); @@ -800,7 +801,7 @@ proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_none_format(proto_tree *tree, const int hfindex, tvbuff_t *tvb, const gint start, gint length, const char *format, ...) G_GNUC_PRINTF(6,7); @@ -813,7 +814,7 @@ proto_tree_add_none_format(proto_tree *tree, const int hfindex, tvbuff_t *tvb, c @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *format, ...) G_GNUC_PRINTF(6,7); @@ -828,7 +829,7 @@ proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gin @param length length of data in tvb @param start_ptr pointer to the data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* start_ptr); @@ -844,7 +845,7 @@ proto_tree_add_bytes(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* start_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -860,7 +861,7 @@ proto_tree_add_bytes_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* start_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -872,7 +873,7 @@ proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint s @param length length of data in tvb @param value_ptr pointer to the data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, nstime_t* value_ptr); @@ -888,7 +889,7 @@ proto_tree_add_time(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_time_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, nstime_t* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -905,7 +906,7 @@ proto_tree_add_time_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, nstime_t* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -917,7 +918,7 @@ proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value); @@ -933,7 +934,7 @@ proto_tree_add_ipxnet(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -949,7 +950,7 @@ proto_tree_add_ipxnet_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -961,7 +962,7 @@ proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value); @@ -977,7 +978,7 @@ proto_tree_add_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -993,7 +994,7 @@ proto_tree_add_ipv4_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1005,7 +1006,7 @@ proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st @param length length of data in tvb @param value_ptr data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value_ptr); @@ -1021,7 +1022,7 @@ proto_tree_add_ipv6(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1037,7 +1038,7 @@ proto_tree_add_ipv6_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1061,7 +1062,7 @@ proto_tree_add_ax25(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value); @@ -1077,7 +1078,7 @@ proto_tree_add_ether(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ether_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1093,7 +1094,7 @@ proto_tree_add_ether_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint8* value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1105,7 +1106,7 @@ proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint s @param length length of data in tvb @param value_ptr data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_guid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr); @@ -1121,7 +1122,7 @@ proto_tree_add_guid(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_guid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1137,7 +1138,7 @@ proto_tree_add_guid_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_guid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const e_guid_t *value_ptr, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1193,7 +1194,7 @@ proto_tree_add_oid_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint sta @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char* value); @@ -1209,7 +1210,7 @@ proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_string_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char* value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1225,7 +1226,7 @@ proto_tree_add_string_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char* value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1241,7 +1242,7 @@ proto_tree_add_unicode_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value); @@ -1257,7 +1258,7 @@ proto_tree_add_boolean(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_boolean_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1273,7 +1274,7 @@ proto_tree_add_boolean_format_value(proto_tree *tree, int hfindex, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1285,7 +1286,7 @@ proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value); @@ -1301,7 +1302,7 @@ proto_tree_add_float(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_float_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1317,7 +1318,7 @@ proto_tree_add_float_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, float value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1329,7 +1330,7 @@ proto_tree_add_float_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint s @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value); @@ -1345,7 +1346,7 @@ proto_tree_add_double(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_double_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1361,7 +1362,7 @@ proto_tree_add_double_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, double value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1373,7 +1374,7 @@ proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value); @@ -1389,7 +1390,7 @@ proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1406,7 +1407,7 @@ proto_tree_add_uint_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1418,7 +1419,7 @@ proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value); @@ -1434,7 +1435,7 @@ proto_tree_add_uint64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1450,7 +1451,7 @@ proto_tree_add_uint64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1462,7 +1463,7 @@ proto_tree_add_uint64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value); @@ -1478,7 +1479,7 @@ proto_tree_add_int(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1495,7 +1496,7 @@ proto_tree_add_int_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1507,7 +1508,7 @@ proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint sta @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value); @@ -1523,7 +1524,7 @@ proto_tree_add_int64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1539,7 +1540,7 @@ proto_tree_add_int64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, gint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1551,7 +1552,7 @@ proto_tree_add_int64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint s @param length length of data in tvb @param value data to display @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value); @@ -1567,7 +1568,7 @@ proto_tree_add_eui64(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_eui64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1583,7 +1584,7 @@ proto_tree_add_eui64_format_value(proto_tree *tree, int hfindex, tvbuff_t *tvb, @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_eui64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const guint64 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -1594,7 +1595,7 @@ proto_tree_add_eui64_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint s @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_debug_text(proto_tree *tree, const char *format, ...) G_GNUC_PRINTF(2,3); @@ -1614,7 +1615,7 @@ proto_tree_add_debug_text(proto_tree *tree, const char *format, proto_item_append_string() on. @param pi the item to append the string to @param str the string to append */ -extern void +WS_DLL_PUBLIC void proto_item_append_string(proto_item *pi, const char *str); @@ -1623,7 +1624,7 @@ proto_item_append_string(proto_item *pi, const char *str); @param fi the item to get the info from @param label_str the string to fill @todo think about changing the parameter profile */ -extern void +WS_DLL_PUBLIC void proto_item_fill_label(field_info *fi, gchar *label_str); @@ -1632,18 +1633,19 @@ proto_item_fill_label(field_info *fi, gchar *label_str); @param short_name abbreviated name of the new protocol @param filter_name protocol name used for a display filter string @return the new protocol handle */ -extern int +WS_DLL_PUBLIC int proto_register_protocol(const char *name, const char *short_name, const char *filter_name); /** Mark protocol as private @param proto_id the handle of the protocol */ -extern void +WS_DLL_PUBLIC +void proto_mark_private(const int proto_id); /** Return if protocol is private @param proto_id the handle of the protocol @return TRUE if it is a private protocol, FALSE is not. */ -extern gboolean +WS_DLL_PUBLIC gboolean proto_is_private(const int proto_id); /** This type of function can be registered to get called whenever @@ -1655,34 +1657,34 @@ typedef void (*prefix_initializer_t)(const char* match); /** Register a new prefix for delayed initialization of field arrays @param prefix the prefix for the new protocol @param initializer function that will initialize the field array for the given prefix */ -extern void +WS_DLL_PUBLIC void proto_register_prefix(const char *prefix, prefix_initializer_t initializer); /** Initialize every remaining uninitialized prefix. */ -extern void proto_initialize_all_prefixes(void); +WS_DLL_PUBLIC void proto_initialize_all_prefixes(void); /** Register a header_field array. @param parent the protocol handle from proto_register_protocol() @param hf the hf_register_info array @param num_records the number of records in hf */ -extern void +WS_DLL_PUBLIC void proto_register_field_array(const int parent, hf_register_info *hf, const int num_records); /** Unregister an already registered field. @param parent the protocol handle from proto_register_protocol() @param hf_id the field to unregister */ -extern void +WS_DLL_PUBLIC void proto_unregister_field (const int parent, gint hf_id); /** Register a protocol subtree (ett) array. @param indices array of ett indices @param num_indices the number of records in indices */ -extern void +WS_DLL_PUBLIC void proto_register_subtree_array(gint *const *indices, const int num_indices); /** Returns number of items (protocols or header fields) registered. @return the number of items */ -extern int proto_registrar_n(void); +WS_DLL_PUBLIC int proto_registrar_n(void); /** Get name of registered header_field number n. @param n item # n (0-indexed) @@ -1692,17 +1694,17 @@ extern const char* proto_registrar_get_name(const int n); /** Get abbreviation of registered header_field number n. @param n item # n (0-indexed) @return the abbreviation of this registered item */ -extern const char* proto_registrar_get_abbrev(const int n); +WS_DLL_PUBLIC const char* proto_registrar_get_abbrev(const int n); /** Get the header_field information based upon a field or protocol id. @param hfindex item # n (0-indexed) @return the registered item */ -extern header_field_info* proto_registrar_get_nth(guint hfindex); +WS_DLL_PUBLIC header_field_info* proto_registrar_get_nth(guint hfindex); /** Get the header_field information based upon a field name. @param field_name the field name to search for @return the registered item */ -extern header_field_info* proto_registrar_get_byname(const char *field_name); +WS_DLL_PUBLIC header_field_info* proto_registrar_get_byname(const char *field_name); /** Get the header_field id based upon a field name. @param field_name the field name to search for @@ -1712,17 +1714,17 @@ extern int proto_registrar_get_id_byname(const char *field_name); /** Get enum ftenum FT_ of registered header_field number n. @param n item # n (0-indexed) @return the registered item */ -extern enum ftenum proto_registrar_get_ftype(const int n); +WS_DLL_PUBLIC enum ftenum proto_registrar_get_ftype(const int n); /** Get parent protocol of registered header_field number n. @param n item # n (0-indexed) @return -1 if item _is_ a protocol */ -extern int proto_registrar_get_parent(const int n); +WS_DLL_PUBLIC int proto_registrar_get_parent(const int n); /** Is item # n a protocol? @param n item # n (0-indexed) @return TRUE if it's a protocol, FALSE if it's not */ -extern gboolean proto_registrar_is_protocol(const int n); +WS_DLL_PUBLIC gboolean proto_registrar_is_protocol(const int n); /** Get length of registered field according to field type. @param n item # n (0-indexed) @@ -1733,64 +1735,64 @@ extern gint proto_registrar_get_length(const int n); /** Routines to use to iterate over the protocols and their fields; * they return the item number of the protocol in question or the * appropriate hfinfo pointer, and keep state in "*cookie". */ -extern int proto_get_first_protocol(void **cookie); -extern int proto_get_data_protocol(void *cookie); -extern int proto_get_next_protocol(void **cookie); -extern header_field_info *proto_get_first_protocol_field(const int proto_id, void **cookle); -extern header_field_info *proto_get_next_protocol_field(void **cookle); +WS_DLL_PUBLIC int proto_get_first_protocol(void **cookie); +WS_DLL_PUBLIC int proto_get_data_protocol(void *cookie); +WS_DLL_PUBLIC int proto_get_next_protocol(void **cookie); +WS_DLL_PUBLIC header_field_info *proto_get_first_protocol_field(const int proto_id, void **cookle); +WS_DLL_PUBLIC header_field_info *proto_get_next_protocol_field(void **cookle); /** Given a protocol's filter_name. @param filter_name the filter name to search for @return proto_id */ -extern int proto_get_id_by_filter_name(const gchar* filter_name); +WS_DLL_PUBLIC int proto_get_id_by_filter_name(const gchar* filter_name); /** Can item # n decoding be disabled? @param proto_id protocol id (0-indexed) @return TRUE if it's a protocol, FALSE if it's not */ -extern gboolean proto_can_toggle_protocol(const int proto_id); +WS_DLL_PUBLIC gboolean proto_can_toggle_protocol(const int proto_id); /** Get the "protocol_t" structure for the given protocol's item number. @param proto_id protocol id (0-indexed) */ -extern protocol_t *find_protocol_by_id(const int proto_id); +WS_DLL_PUBLIC protocol_t *find_protocol_by_id(const int proto_id); /** Get the protocol's name for the given protocol's item number. @param proto_id protocol id (0-indexed) @return its name */ -extern const char *proto_get_protocol_name(const int proto_id); +WS_DLL_PUBLIC const char *proto_get_protocol_name(const int proto_id); /** Get the protocol's item number, for the given protocol's "protocol_t". @return its proto_id */ -extern int proto_get_id(const protocol_t *protocol); +WS_DLL_PUBLIC int proto_get_id(const protocol_t *protocol); /** Get the protocol's short name, for the given protocol's "protocol_t". @return its short name. */ -extern const char *proto_get_protocol_short_name(const protocol_t *protocol); +WS_DLL_PUBLIC const char *proto_get_protocol_short_name(const protocol_t *protocol); /** Get the protocol's long name, for the given protocol's "protocol_t". @return its long name. */ -extern const char *proto_get_protocol_long_name(const protocol_t *protocol); +WS_DLL_PUBLIC const char *proto_get_protocol_long_name(const protocol_t *protocol); /** Is protocol's decoding enabled ? @param protocol @return TRUE if decoding is enabled, FALSE if not */ -extern gboolean proto_is_protocol_enabled(const protocol_t *protocol); +WS_DLL_PUBLIC gboolean proto_is_protocol_enabled(const protocol_t *protocol); /** Get a protocol's filter name by its item number. @param proto_id protocol id (0-indexed) @return its filter name. */ -extern const char *proto_get_protocol_filter_name(const int proto_id); +WS_DLL_PUBLIC const char *proto_get_protocol_filter_name(const int proto_id); /** Enable / Disable protocol of the given item number. @param proto_id protocol id (0-indexed) @param enabled enable / disable the protocol */ -extern void proto_set_decoding(const int proto_id, const gboolean enabled); +WS_DLL_PUBLIC void proto_set_decoding(const int proto_id, const gboolean enabled); /** Enable all protocols */ -extern void proto_enable_all(void); +WS_DLL_PUBLIC void proto_enable_all(void); /** Disable disabling/enabling of protocol of the given item number. @param proto_id protocol id (0-indexed) */ -extern void proto_set_cant_toggle(const int proto_id); +WS_DLL_PUBLIC void proto_set_cant_toggle(const int proto_id); /** Checks for existence any protocol or field within a tree. @param tree "Protocols" are assumed to be a child of the [empty] root node. @@ -1804,41 +1806,42 @@ extern gboolean proto_check_for_protocol_or_field(const proto_tree* tree, const @param tree tree of interest @param hfindex primed hfindex @return GPtrArry pointer */ -extern GPtrArray* proto_get_finfo_ptr_array(const proto_tree *tree, const int hfindex); +WS_DLL_PUBLIC GPtrArray* proto_get_finfo_ptr_array(const proto_tree *tree, const int hfindex); /** Return whether we're tracking any interesting fields. Only works with primed trees, and is fast. @param tree tree of interest @return TRUE if we're tracking interesting fields */ -extern gboolean proto_tracking_interesting_fields(const proto_tree *tree); +WS_DLL_PUBLIC gboolean proto_tracking_interesting_fields(const proto_tree *tree); /** Return GPtrArray* of field_info pointers for all hfindex that appear in tree. Works with any tree, primed or unprimed, and is slower than +WS_DLL_PUBLIC proto_get_finfo_ptr_array because it has to search through the tree. @param tree tree of interest @param hfindex index of field info of interest @return GPtrArry pointer */ -extern GPtrArray* proto_find_finfo(proto_tree *tree, const int hfindex); +WS_DLL_PUBLIC GPtrArray* proto_find_finfo(proto_tree *tree, const int hfindex); /** Return GPtrArray* of field_info pointers containg all hfindexes that appear in tree. @param tree tree of interest @return GPtrArry pointer */ -extern GPtrArray* proto_all_finfos(proto_tree *tree); +WS_DLL_PUBLIC GPtrArray* proto_all_finfos(proto_tree *tree); /** Dumps a glossary of the protocol registrations to STDOUT */ -extern void proto_registrar_dump_protocols(void); +WS_DLL_PUBLIC void proto_registrar_dump_protocols(void); /** Dumps a glossary of the field value strings or true/false strings to STDOUT */ -extern void proto_registrar_dump_values(void); +WS_DLL_PUBLIC void proto_registrar_dump_values(void); /** Dumps a glossary of the protocol and field registrations to STDOUT. * Format 1 is the original format. Format 2 includes the base (for integers) * and the blurb. */ -extern void proto_registrar_dump_fields(const int format); +WS_DLL_PUBLIC void proto_registrar_dump_fields(const int format); /** Dumps a glossary field types and descriptive names to STDOUT */ -extern void proto_registrar_dump_ftypes(void); +WS_DLL_PUBLIC void proto_registrar_dump_ftypes(void); @@ -1846,11 +1849,11 @@ extern void proto_registrar_dump_ftypes(void); a subtree item type. That array element is TRUE if subtrees of an item of that type are to be expanded. With MSVC and a libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT gboolean *tree_is_expanded; +WS_DLL_PUBLIC gboolean *tree_is_expanded; /** Number of elements in the tree_is_expanded array. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT int num_tree_types; +WS_DLL_PUBLIC int num_tree_types; /** glib doesn't have g_ptr_array_len of all things!*/ #ifndef g_ptr_array_len @@ -1872,14 +1875,14 @@ hfinfo_bitwidth(const header_field_info *hfinfo); @param finfo field_info @param edt epan dissecting @return TRUE if we can do a "match selected" on the field, FALSE otherwise. */ -extern gboolean +WS_DLL_PUBLIC gboolean proto_can_match_selected(field_info *finfo, epan_dissect_t *edt); /** Construct a "match selected" display filter string. @param finfo field_info @param edt epan dissecting @return the display filter string */ -extern char* +WS_DLL_PUBLIC char* proto_construct_match_selected_string(field_info *finfo, epan_dissect_t *edt); /** Find field from offset in tvb. @@ -1887,7 +1890,7 @@ proto_construct_match_selected_string(field_info *finfo, epan_dissect_t *edt); @param offset offset in the tvb @param tvb the tv buffer @return the corresponding field_info */ -extern field_info* +WS_DLL_PUBLIC field_info* proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb); /** This function will dissect a sequence of bytes that describe a bitmask. @@ -1908,7 +1911,7 @@ proto_find_field_from_offset(proto_tree *tree, guint offset, tvbuff_t *tvb); matched string displayed on the expansion line. @param encoding big or little endian byte representation (ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN) @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, const guint offset, const int hf_hdr, const gint ett, const int **fields, const guint encoding); @@ -1924,7 +1927,7 @@ proto_tree_add_bitmask(proto_tree *tree, tvbuff_t *tvb, const guint offset, @param encoding big or little endian byte representation (ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN) @param flags @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset, const guint len, const char *name, const char *fallback, const gint ett, const int **fields, const guint encoding, const int flags); @@ -1943,7 +1946,7 @@ proto_tree_add_bitmask_text(proto_tree *tree, tvbuff_t *tvb, const guint offset, @param no_of_bits length of data in tvb expressed in bits @param encoding data encoding @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bits_item(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding); /** Add bits to a proto_tree, using the text label registered to that item. @@ -1994,7 +1997,7 @@ proto_tree_add_split_bits_crumb(proto_tree *tree, const int hf_index, tvbuff_t * @param return_value if a pointer is passed here the value is returned. @param encoding data encoding @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint64 *return_value, const guint encoding); /** Add bits for a FT_UINT8, FT_UINT16, FT_UINT24 or FT_UINT32 @@ -2008,7 +2011,7 @@ proto_tree_add_bits_ret_val(proto_tree *tree, const int hf_index, tvbuff_t *tvb, @param value data to display @param format printf like format string @return the newly created item */ -extern proto_item * +WS_DLL_PUBLIC proto_item * proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -2024,7 +2027,7 @@ proto_tree_add_uint_bits_format_value(proto_tree *tree, const int hf_index, tvbu @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +proto_item * proto_tree_add_boolean_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, guint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -2040,7 +2043,7 @@ proto_tree_add_boolean_bits_format_value(proto_tree *tree, const int hf_index, t @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +proto_item * proto_tree_add_int_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, gint32 value, const char *format, ...) G_GNUC_PRINTF(7,8); @@ -2056,14 +2059,14 @@ proto_tree_add_int_bits_format_value(proto_tree *tree, const int hf_index, tvbuf @param format printf like format string @param ... printf like parameters @return the newly created item */ -extern proto_item * +proto_item * proto_tree_add_float_bits_format_value(proto_tree *tree, const int hf_index, tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, float value, const char *format, ...) G_GNUC_PRINTF(7,8); /** Check if given string is a valid field name @param field_name the field name to check @return 0 if valid, else first illegal character */ -extern guchar +WS_DLL_PUBLIC guchar proto_check_field_name(const gchar *field_name); diff --git a/epan/ptvcursor.h b/epan/ptvcursor.h index a1f2aaeccf..430c449101 100644 --- a/epan/ptvcursor.h +++ b/epan/ptvcursor.h @@ -29,6 +29,7 @@ #include #include +#include "ws_symbol_export.h" #define SUBTREE_UNDEFINED_LENGTH -1 @@ -36,50 +37,61 @@ typedef struct ptvcursor ptvcursor_t; /* Allocates an initializes a ptvcursor_t with 3 variables: * proto_tree, tvbuff, and offset. */ +WS_DLL_PUBLIC ptvcursor_t* ptvcursor_new(proto_tree* tree, tvbuff_t* tvb, gint offset); /* Gets data from tvbuff, adds it to proto_tree, increments offset, * and returns proto_item* */ +WS_DLL_PUBLIC proto_item* ptvcursor_add(ptvcursor_t* ptvc, int hf, gint length, const guint encoding); /* Gets data from tvbuff, adds it to proto_tree, *DOES NOT* increment * offset, and returns proto_item* */ +WS_DLL_PUBLIC proto_item* ptvcursor_add_no_advance(ptvcursor_t* ptvc, int hf, gint length, const guint encoding); /* Advance the ptvcursor's offset within its tvbuff without * adding anything to the proto_tree. */ +WS_DLL_PUBLIC void ptvcursor_advance(ptvcursor_t* ptvc, gint length); /* Frees memory for ptvcursor_t, but nothing deeper than that. */ +WS_DLL_PUBLIC void ptvcursor_free(ptvcursor_t* ptvc); /* Returns tvbuff. */ +WS_DLL_PUBLIC tvbuff_t* ptvcursor_tvbuff(ptvcursor_t* ptvc); /* Returns current offset. */ +WS_DLL_PUBLIC gint ptvcursor_current_offset(ptvcursor_t* ptvc); /* Returns the proto_tree* */ +WS_DLL_PUBLIC proto_tree* ptvcursor_tree(ptvcursor_t* ptvc); /* Sets a new proto_tree* for the ptvcursor_t */ +WS_DLL_PUBLIC void ptvcursor_set_tree(ptvcursor_t* ptvc, proto_tree* tree); /* push a subtree in the tree stack of the cursor */ +WS_DLL_PUBLIC proto_tree* ptvcursor_push_subtree(ptvcursor_t* ptvc, proto_item* it, gint ett_subtree); /* pop a subtree in the tree stack of the cursor */ +WS_DLL_PUBLIC void ptvcursor_pop_subtree(ptvcursor_t* ptvc); @@ -88,6 +100,7 @@ ptvcursor_pop_subtree(ptvcursor_t* ptvc); * In this case, when the subtree will be closed, the parent item length will * be equal to the advancement of the cursor since the creation of the subtree. */ +WS_DLL_PUBLIC proto_tree* ptvcursor_add_with_subtree(ptvcursor_t* ptvc, int hfindex, gint length, const guint encoding, gint ett_subtree); @@ -97,12 +110,14 @@ ptvcursor_add_with_subtree(ptvcursor_t* ptvc, int hfindex, gint length, * In this case, when the subtree will be closed, the item length will be equal * to the advancement of the cursor since the creation of the subtree. */ +WS_DLL_PUBLIC proto_tree* ptvcursor_add_text_with_subtree(ptvcursor_t* ptvc, gint length, gint ett_subtree, const char* format, ...); /* Creates a subtree and adds it to the cursor as the working tree but does not * save the old working tree */ +WS_DLL_PUBLIC proto_tree* ptvcursor_set_subtree(ptvcursor_t* ptvc, proto_item* it, gint ett_subtree); diff --git a/epan/range.h b/epan/range.h index 430a13b23c..e01030f252 100644 --- a/epan/range.h +++ b/epan/range.h @@ -29,6 +29,7 @@ #define __RANGE_H__ #include +#include "ws_symbol_export.h" /** @file * Range strings a variant of value_strings @@ -60,7 +61,7 @@ typedef enum { CVT_NUMBER_TOO_BIG } convert_ret_t; -extern range_t *range_empty(void); +WS_DLL_PUBLIC range_t *range_empty(void); /*** Converts a range string to a fast comparable array of ranges. @@ -85,10 +86,10 @@ extern range_t *range_empty(void); * @param max_value' specifies the maximum value in a range. * @return */ -extern convert_ret_t range_convert_str(range_t **range, const gchar *es, +WS_DLL_PUBLIC convert_ret_t range_convert_str(range_t **range, const gchar *es, guint32 max_value); -extern convert_ret_t range_convert_str_work(range_t **range, const gchar *es, +convert_ret_t range_convert_str_work(range_t **range, const gchar *es, guint32 max_value, gboolean err_on_max); /** This function returns TRUE if a given value is within one of the ranges @@ -97,32 +98,32 @@ extern convert_ret_t range_convert_str_work(range_t **range, const gchar *es, * @param val the value to check * @return TRUE if the value is in range */ -extern gboolean value_is_in_range(range_t *range, guint32 val); +WS_DLL_PUBLIC gboolean value_is_in_range(range_t *range, guint32 val); /** This function returns TRUE if the two given range_t's are equal. * @param a first range * @param b second range * @return TRUE if the value is in range */ -extern gboolean ranges_are_equal(range_t *a, range_t *b); +WS_DLL_PUBLIC gboolean ranges_are_equal(range_t *a, range_t *b); /** This function calls the provided callback function for each value in * in the range. * @param range the range * @param callback the callback function */ -extern void range_foreach(range_t *range, void (*callback)(guint32 val)); +WS_DLL_PUBLIC void range_foreach(range_t *range, void (*callback)(guint32 val)); /** * This function converts a range_t to a (ep_alloc()-allocated) string. */ -extern char *range_convert_range(range_t *range); +WS_DLL_PUBLIC char *range_convert_range(range_t *range); /** * Create a copy of a range. * @param src the range to copy * @return ep allocated copy of the range */ -extern range_t *range_copy(range_t *src); +WS_DLL_PUBLIC range_t *range_copy(range_t *src); #endif /* __RANGE_H__ */ diff --git a/epan/reassemble.h b/epan/reassemble.h index f35beb7009..4acd6619d9 100644 --- a/epan/reassemble.h +++ b/epan/reassemble.h @@ -29,6 +29,8 @@ #ifndef REASSEMBLE_H #define REASSEMBLE_H +#include "ws_symbol_export.h" + /* only in fd_head: packet is defragmented */ #define FD_DEFRAGMENTED 0x0001 @@ -109,14 +111,14 @@ typedef void *(*fragment_key_copier)(const void *key); * else: just remove any entries; * destroy: remove entries and destroy table; */ -extern void fragment_table_init(GHashTable **fragment_table); +WS_DLL_PUBLIC void fragment_table_init(GHashTable **fragment_table); extern void fragment_table_destroy(GHashTable **fragment_table); -extern void dcerpc_fragment_table_init(GHashTable **fragment_table); +WS_DLL_PUBLIC void dcerpc_fragment_table_init(GHashTable **fragment_table); /* * Initialize a reassembled-packet table. */ -extern void reassembled_table_init(GHashTable **reassembled_table); +WS_DLL_PUBLIC void reassembled_table_init(GHashTable **reassembled_table); /* * This function adds a new fragment to the fragment hash table. @@ -129,10 +131,10 @@ extern void reassembled_table_init(GHashTable **reassembled_table); * Returns a pointer to the head of the fragment data list if we have all the * fragments, NULL otherwise. */ -extern fragment_data *fragment_add(tvbuff_t *tvb, const int offset, const packet_info *pinfo, +WS_DLL_PUBLIC fragment_data *fragment_add(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, const guint32 frag_offset, guint32 const frag_data_len, const gboolean more_frags); -extern fragment_data *fragment_add_multiple_ok(tvbuff_t *tvb, const int offset, +WS_DLL_PUBLIC fragment_data *fragment_add_multiple_ok(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, const guint32 frag_offset, const guint32 frag_data_len, const gboolean more_frags); @@ -144,7 +146,7 @@ extern fragment_data *fragment_add_multiple_ok(tvbuff_t *tvb, const int offset, * to the table of reassembled fragments, and return a pointer to the * head of the fragment list. */ -extern fragment_data *fragment_add_check(tvbuff_t *tvb, const int offset, +WS_DLL_PUBLIC fragment_data *fragment_add_check(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, GHashTable *reassembled_table, const guint32 frag_offset, const guint32 frag_data_len, const gboolean more_frags); @@ -182,7 +184,7 @@ extern fragment_data *fragment_add_check(tvbuff_t *tvb, const int offset, * "key_copier" is called to copy the key to a more appropriate store before * inserting a new entry to the hash. */ -extern fragment_data * +fragment_data * fragment_add_seq_key(tvbuff_t *tvb, const int offset, const packet_info *pinfo, void *key, fragment_key_copier key_copier, GHashTable *fragment_table, guint32 frag_number, @@ -190,13 +192,13 @@ fragment_add_seq_key(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 flags); /* a wrapper for fragment_add_seq_key - uses a key of source, dest and id */ -extern fragment_data *fragment_add_seq(tvbuff_t *tvb, const int offset, const packet_info *pinfo, +WS_DLL_PUBLIC fragment_data *fragment_add_seq(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, const guint32 frag_number, const guint32 frag_data_len, const gboolean more_frags); /* another wrapper for fragment_add_seq_key - uses a key of source, dest, id * and act_id */ -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_add_dcerpc_dg(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, void *act_id, GHashTable *fragment_table, const guint32 frag_number, @@ -210,14 +212,14 @@ fragment_add_dcerpc_dg(tvbuff_t *tvb, const int offset, const packet_info *pinfo * to the table of reassembled fragments, and return a pointer to the * head of the fragment list. */ -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_add_seq_check(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, GHashTable *reassembled_table, const guint32 frag_number, const guint32 frag_data_len, const gboolean more_frags); -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_add_seq_802_11(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, @@ -225,7 +227,7 @@ fragment_add_seq_802_11(tvbuff_t *tvb, const int offset, const guint32 frag_number, const guint32 frag_data_len, const gboolean more_frags); -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_add_seq_next(tvbuff_t *tvb, const int offset, const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, GHashTable *reassembled_table, @@ -235,7 +237,7 @@ extern void fragment_start_seq_check(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, const guint32 tot_len); -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_end_seq_next(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, GHashTable *reassembled_table); /* to specify how much to reassemble, for fragmentation where last fragment can not be @@ -245,12 +247,12 @@ fragment_end_seq_next(const packet_info *pinfo, const guint32 id, GHashTable *fr * actually means we want to defragment 3 blocks, block 0, 1 and 2. * */ -extern void +WS_DLL_PUBLIC void fragment_set_tot_len(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table, const guint32 tot_len); /* to resad whatever totlen previously set */ -extern guint32 +WS_DLL_PUBLIC guint32 fragment_get_tot_len(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table); /* @@ -261,21 +263,21 @@ fragment_get_tot_len(const packet_info *pinfo, const guint32 id, GHashTable *fra * a fh will be extended (increase the already stored data). After calling this function, * and if FD_DEFRAGMENTED is set, the reassembly process will be continued. */ -extern void +WS_DLL_PUBLIC void fragment_set_partial_reassembly(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table); /* This function is used to check if there is partial or completed reassembly state * matching this packet. I.e. Are there reassembly going on or not for this packet? */ -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_get(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table); /* The same for the reassemble table */ /* id *must* be the frame number for this to work! */ -extern fragment_data * +fragment_data * fragment_get_reassembled(const guint32 id, GHashTable *reassembled_table); -extern fragment_data * +WS_DLL_PUBLIC fragment_data * fragment_get_reassembled_id(const packet_info *pinfo, const guint32 id, GHashTable *reassembled_table); /* This will free up all resources and delete reassembly state for this PDU. @@ -286,7 +288,7 @@ fragment_get_reassembled_id(const packet_info *pinfo, const guint32 id, GHashTab * So, if you call fragment_delete and it returns non-NULL, YOU are responsible to * g_free() that buffer. */ -extern unsigned char * +WS_DLL_PUBLIC unsigned char * fragment_delete(const packet_info *pinfo, const guint32 id, GHashTable *fragment_table); /* This struct holds references to all the tree and field handles used when @@ -314,16 +316,16 @@ typedef struct _fragment_items { const char *tag; } fragment_items; -extern tvbuff_t * +WS_DLL_PUBLIC tvbuff_t * process_reassembled_data(tvbuff_t *tvb, const int offset, packet_info *pinfo, const char *name, fragment_data *fd_head, const fragment_items *fit, gboolean *update_col_infop, proto_tree *tree); -extern gboolean +WS_DLL_PUBLIC gboolean show_fragment_tree(fragment_data *ipfd_head, const fragment_items *fit, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, proto_item **fi); -extern gboolean +WS_DLL_PUBLIC gboolean show_fragment_seq_tree(fragment_data *ipfd_head, const fragment_items *fit, proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, proto_item **fi); diff --git a/epan/report_err.h b/epan/report_err.h index 4dbd5d661e..130ae25a96 100644 --- a/epan/report_err.h +++ b/epan/report_err.h @@ -33,6 +33,8 @@ #ifndef __REPORT_ERR_H__ #define __REPORT_ERR_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -49,7 +51,7 @@ extern void init_report_err( /* * Report a general error. */ -extern void report_failure(const char *msg_format, ...); +WS_DLL_PUBLIC void report_failure(const char *msg_format, ...); /* * Report an error when trying to open a file. @@ -57,20 +59,20 @@ extern void report_failure(const char *msg_format, ...); * UNIX-style errnos, so this can be used for open failures not from * Wiretap as long as the failure code is just an errno. */ -extern void report_open_failure(const char *filename, int err, +WS_DLL_PUBLIC void report_open_failure(const char *filename, int err, gboolean for_writing); /* * Report an error when trying to read a file. * "err" is assumed to be a UNIX-style errno. */ -extern void report_read_failure(const char *filename, int err); +WS_DLL_PUBLIC void report_read_failure(const char *filename, int err); /* * Report an error when trying to write a file. * "err" is assumed to be a UNIX-style errno. */ -extern void report_write_failure(const char *filename, int err); +WS_DLL_PUBLIC void report_write_failure(const char *filename, int err); #ifdef __cplusplus } diff --git a/epan/req_resp_hdrs.h b/epan/req_resp_hdrs.h index ce7131fb30..4a06fcde5d 100644 --- a/epan/req_resp_hdrs.h +++ b/epan/req_resp_hdrs.h @@ -26,6 +26,8 @@ #ifndef __REQ_RESP_HDRS_H__ #define __REQ_RESP_HDRS_H__ +#include "ws_symbol_export.h" + /** * Optionally do reassembly of the request/response line, headers, and body. * @@ -36,7 +38,7 @@ * @param desegment_body Do desegmenation on body. * @return TRUE if desegmentation is complete otherwise FALSE */ -extern gboolean +WS_DLL_PUBLIC gboolean req_resp_hdrs_do_reassembly(tvbuff_t *tvb, const int offset, packet_info *pinfo, const gboolean desegment_headers, const gboolean desegment_body); diff --git a/epan/rtp_pt.h b/epan/rtp_pt.h index 970a7f6ded..5b934ecc7b 100644 --- a/epan/rtp_pt.h +++ b/epan/rtp_pt.h @@ -26,6 +26,7 @@ #define __RTP_PT_H__ #include +#include "ws_symbol_export.h" /* * RTP Payload types @@ -98,7 +99,7 @@ #define PT_UNDF_126 126 #define PT_UNDF_127 127 -WS_VAR_IMPORT value_string_ext rtp_payload_type_vals_ext; -WS_VAR_IMPORT value_string_ext rtp_payload_type_short_vals_ext; +WS_DLL_PUBLIC value_string_ext rtp_payload_type_vals_ext; +WS_DLL_PUBLIC value_string_ext rtp_payload_type_short_vals_ext; #endif diff --git a/epan/show_exception.h b/epan/show_exception.h index 977387235d..3448bbbec6 100644 --- a/epan/show_exception.h +++ b/epan/show_exception.h @@ -37,6 +37,7 @@ void register_show_exception(void); /* * Routine used to add an indication of an arbitrary exception to the tree. */ +WS_DLL_PUBLIC void show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned long exception, const char *exception_message); diff --git a/epan/sminmpec.h b/epan/sminmpec.h index e234914f56..0eb6726720 100644 --- a/epan/sminmpec.h +++ b/epan/sminmpec.h @@ -25,6 +25,8 @@ #ifndef __SMINMPEC_H__ #define __SMINMPEC_H__ +#include "ws_symbol_export.h" + /* * These are SMI Network Management Private Enterprise Codes for * organizations; see @@ -84,6 +86,6 @@ /* Greater than 32,767 need to be tagged unsigned. */ #define VENDOR_NTOP 35632u -WS_VAR_IMPORT value_string_ext sminmpec_values_ext; +WS_DLL_PUBLIC value_string_ext sminmpec_values_ext; #endif /* __SMINMPEC_H__ */ diff --git a/epan/stat_cmd_args.h b/epan/stat_cmd_args.h index 52dc3cf871..e1be886953 100644 --- a/epan/stat_cmd_args.h +++ b/epan/stat_cmd_args.h @@ -26,10 +26,12 @@ #ifndef __STAT_CMD_ARGS_H__ #define __STAT_CMD_ARGS_H__ -extern void register_stat_cmd_arg(const char *cmd, +#include "ws_symbol_export.h" + +WS_DLL_PUBLIC void register_stat_cmd_arg(const char *cmd, void (*func)(const char *arg,void* userdata), void* userdata); -extern gboolean process_stat_cmd_arg(char *optstr); -extern void list_stat_cmd_args(void); -extern void start_requested_stats(void); +WS_DLL_PUBLIC gboolean process_stat_cmd_arg(char *optstr); +WS_DLL_PUBLIC void list_stat_cmd_args(void); +WS_DLL_PUBLIC void start_requested_stats(void); #endif diff --git a/epan/stats_tree.h b/epan/stats_tree.h index aae84f2905..d692321c3c 100644 --- a/epan/stats_tree.h +++ b/epan/stats_tree.h @@ -32,6 +32,7 @@ #include #include "../stat_menu.h" #include "../register.h" +#include "ws_symbol_export.h" #define STAT_TREE_ROOT "root" @@ -58,7 +59,7 @@ typedef void (*stat_tree_cleanup_cb)(stats_tree*); * init: tree initialization callback * cleanup: cleanup callback */ -extern void stats_tree_register(const gchar *tapname, +WS_DLL_PUBLIC void stats_tree_register(const gchar *tapname, const gchar *abbr, const gchar *name, guint flags, @@ -74,7 +75,7 @@ extern void stats_tree_register(const gchar *tapname, * init: tree initialization callback * cleanup: cleanup callback */ -extern void stats_tree_register_plugin(const gchar *tapname, +WS_DLL_PUBLIC void stats_tree_register_plugin(const gchar *tapname, const gchar *abbr, const gchar *name, guint flags, @@ -91,7 +92,7 @@ extern void stats_tree_register_plugin(const gchar *tapname, * cleanup: cleanup callback * stat_group: the group this stat belongs to */ -extern void stats_tree_register_with_group(const gchar *tapname, +WS_DLL_PUBLIC void stats_tree_register_with_group(const gchar *tapname, const gchar *abbr, const gchar *name, guint flags, @@ -100,7 +101,7 @@ extern void stats_tree_register_with_group(const gchar *tapname, stat_tree_cleanup_cb cleanup, register_stat_group_t stat_group); -extern int stats_tree_parent_id_by_name(stats_tree *st, const gchar *parent_name); +WS_DLL_PUBLIC int stats_tree_parent_id_by_name(stats_tree *st, const gchar *parent_name); /* Creates a node in the tree (to be used in the in init_cb) * st: the stats_tree in which to create it @@ -108,13 +109,13 @@ extern int stats_tree_parent_id_by_name(stats_tree *st, const gchar *parent_name * parent_name: the name of the parent_node (NULL for root) * with_children: TRUE if this node will have "dynamically created" children */ -extern int stats_tree_create_node(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_node(stats_tree *st, const gchar *name, int parent_id, gboolean with_children); /* creates a node using its parent's tree name */ -extern int stats_tree_create_node_by_pname(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_node_by_pname(stats_tree *st, const gchar *name, const gchar *parent_name, gboolean with_children); @@ -124,24 +125,24 @@ extern int stats_tree_create_node_by_pname(stats_tree *st, stats_tree_create_range_node(st,name,parent, "-99","100-199","200-299","300-399","400-", NULL); */ -extern int stats_tree_create_range_node(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_range_node(stats_tree *st, const gchar *name, int parent_id, ...); -extern int stats_tree_create_range_node_string(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_range_node_string(stats_tree *st, const gchar *name, int parent_id, int num_str_ranges, gchar** str_ranges); -extern int stats_tree_range_node_with_pname(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_range_node_with_pname(stats_tree *st, const gchar *name, const gchar *parent_name, ...); /* increases by one the ranged node and the sub node to whose range the value belongs */ -extern int stats_tree_tick_range(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_tick_range(stats_tree *st, const gchar *name, int parent_id, int value_in_range); @@ -150,15 +151,15 @@ extern int stats_tree_tick_range(stats_tree *st, stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)) /* */ -extern int stats_tree_create_pivot(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_pivot(stats_tree *st, const gchar *name, int parent_id); -extern int stats_tree_create_pivot_by_pname(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_create_pivot_by_pname(stats_tree *st, const gchar *name, const gchar *parent_name); -extern int stats_tree_tick_pivot(stats_tree *st, +WS_DLL_PUBLIC int stats_tree_tick_pivot(stats_tree *st, int pivot_id, const gchar *pivot_value); @@ -169,7 +170,7 @@ extern int stats_tree_tick_pivot(stats_tree *st, * with_children=TRUE to indicate that the created node will be a parent */ typedef enum _manip_node_mode { MN_INCREASE, MN_SET } manip_node_mode; -extern int stats_tree_manip_node(manip_node_mode mode, +WS_DLL_PUBLIC int stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const gchar *name, int parent_id, diff --git a/epan/stats_tree_priv.h b/epan/stats_tree_priv.h index 6c90bf0cfe..2a2fadf139 100644 --- a/epan/stats_tree_priv.h +++ b/epan/stats_tree_priv.h @@ -27,6 +27,7 @@ #define __STATS_TREE_PRIV_H #include "stats_tree.h" +#include "ws_symbol_export.h" #define INDENT_MAX 32 #define NUM_BUF_SIZE 32 @@ -150,7 +151,7 @@ struct _stats_tree_cfg { }; /* guess what, this is it! */ -extern void stats_tree_presentation(void (*registry_iterator)(gpointer,gpointer,gpointer), +WS_DLL_PUBLIC void stats_tree_presentation(void (*registry_iterator)(gpointer,gpointer,gpointer), void (*setup_node_pr)(stat_node*), void (*free_node_pr)(stat_node*), void (*draw_node)(stat_node*), @@ -161,51 +162,51 @@ extern void stats_tree_presentation(void (*registry_iterator)(gpointer,gpointer, void (*reset_tree)(stats_tree*), void *data); -extern stats_tree *stats_tree_new(stats_tree_cfg *cfg, tree_pres *pr, const char *filter); +WS_DLL_PUBLIC stats_tree *stats_tree_new(stats_tree_cfg *cfg, tree_pres *pr, const char *filter); /** callback for taps */ -extern int stats_tree_packet(void*, packet_info*, epan_dissect_t*, const void *); +WS_DLL_PUBLIC int stats_tree_packet(void*, packet_info*, epan_dissect_t*, const void *); /** callback for reset */ -extern void stats_tree_reset(void *p_st); +WS_DLL_PUBLIC void stats_tree_reset(void *p_st); /** callback for clear */ -extern void stats_tree_reinit(void *p_st); +WS_DLL_PUBLIC void stats_tree_reinit(void *p_st); /* callback for destoy */ -extern void stats_tree_free(stats_tree *st); +WS_DLL_PUBLIC void stats_tree_free(stats_tree *st); /** given an optarg splits the abbr part and returns a newly allocated buffer containing it */ -extern gchar *stats_tree_get_abbr(const gchar *optarg); +WS_DLL_PUBLIC gchar *stats_tree_get_abbr(const gchar *optarg); /** obtains a stats tree from the registry given its abbr */ -extern stats_tree_cfg *stats_tree_get_cfg_by_abbr(gchar *abbr); +WS_DLL_PUBLIC stats_tree_cfg *stats_tree_get_cfg_by_abbr(gchar *abbr); /** obtains a stats tree list from the registry caller should free returned list with g_list_free() */ -extern GList *stats_tree_get_cfg_list(void); +WS_DLL_PUBLIC GList *stats_tree_get_cfg_list(void); /** extracts node data as strings from a stat_node into the buffers given by value, rate and precent if NULL they are ignored */ -extern void stats_tree_get_strs_from_node(const stat_node *node, +WS_DLL_PUBLIC void stats_tree_get_strs_from_node(const stat_node *node, gchar *value, gchar *rate, gchar *percent); /** populates the given GString with a tree representation of a branch given by node, using indent spaces as indentation */ -extern void stats_tree_branch_to_str(const stat_node *node, +WS_DLL_PUBLIC void stats_tree_branch_to_str(const stat_node *node, GString *s, guint indent); /** used to calcuate the size of the indentation and the longest string */ -extern guint stats_tree_branch_max_namelen(const stat_node *node, guint indent); +WS_DLL_PUBLIC guint stats_tree_branch_max_namelen(const stat_node *node, guint indent); /** a text representation of a node, if buffer is NULL returns a newly allocated string */ -extern gchar *stats_tree_node_to_str(const stat_node *node, +WS_DLL_PUBLIC gchar *stats_tree_node_to_str(const stat_node *node, gchar *buffer, guint len); #endif /* __STATS_TREE_PRIV_H */ diff --git a/epan/stream.h b/epan/stream.h index 1db62b5a00..6d3e187d84 100644 --- a/epan/stream.h +++ b/epan/stream.h @@ -29,6 +29,7 @@ #define STREAM_H #include +#include "ws_symbol_export.h" struct _fragment_items; @@ -67,14 +68,14 @@ struct conversation; /* initialise a new stream. Call this when you first identify a distinct * stream. The circit pointer is just used as a key to look up the stream. */ -extern stream_t *stream_new_circ ( const struct circuit *circuit, int p2p_dir ); +WS_DLL_PUBLIC stream_t *stream_new_circ ( const struct circuit *circuit, int p2p_dir ); extern stream_t *stream_new_conv ( const struct conversation *conv, int p2p_dir ); /* retrieve a previously-created stream. * * Returns null if no matching stream was found. */ -extern stream_t *find_stream_circ ( const struct circuit *circuit, int p2p_dir ); +WS_DLL_PUBLIC stream_t *find_stream_circ ( const struct circuit *circuit, int p2p_dir ); extern stream_t *find_stream_conv ( const struct conversation *conv, int p2p_dir ); @@ -85,7 +86,7 @@ extern stream_t *find_stream_conv ( const struct conversation *conv, int p2p_dir to this frame, but the idea is that you use the number of the frame being disassembled, and the byte-offset within that frame. */ -extern stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framenum, guint32 offset ); +WS_DLL_PUBLIC stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framenum, guint32 offset ); /* add a new fragment to the fragment tables for the stream. The framenum and * offset are keys allowing future access with stream_find_frag(), tvb is the @@ -100,7 +101,7 @@ extern stream_pdu_fragment_t *stream_find_frag( stream_t *stream, guint32 framen * This essentially means that you can only add fragments on the first pass * through the stream. */ -extern stream_pdu_fragment_t *stream_add_frag( stream_t *stream, guint32 framenum, guint32 offset, +WS_DLL_PUBLIC stream_pdu_fragment_t *stream_add_frag( stream_t *stream, guint32 framenum, guint32 offset, tvbuff_t *tvb, packet_info *pinfo, gboolean more_frags ); /* Get the length of a fragment previously found by stream_find_frag(). @@ -121,7 +122,7 @@ extern struct _fragment_data *stream_get_frag_data( const stream_pdu_fragment_t * reassembled data, otherwise just put a "reassembled in" item into the * protocol tree. */ -extern tvbuff_t *stream_process_reassembled( +WS_DLL_PUBLIC tvbuff_t *stream_process_reassembled( tvbuff_t *tvb, int offset, packet_info *pinfo, const char *name, const stream_pdu_fragment_t *frag, const struct _fragment_items *fit, diff --git a/epan/strutil.h b/epan/strutil.h index 833b4b9b37..a3f54a7054 100644 --- a/epan/strutil.h +++ b/epan/strutil.h @@ -25,6 +25,8 @@ #ifndef __STRUTIL_H__ #define __STRUTIL_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -66,6 +68,7 @@ int get_token_len(const guchar *linep, const guchar *lineend, * * @see tvb_format_text() */ +WS_DLL_PUBLIC gchar* format_text(const guchar *line, size_t len); /** @@ -89,6 +92,7 @@ gchar* format_text_wsp(const guchar *line, size_t len); * * @see bytes_to_str_punct() */ +WS_DLL_PUBLIC gchar* bytes_to_str(const guint8 *bd, int bd_len); /** Turn an array of bytes into a string showing the bytes in hex, @@ -101,6 +105,7 @@ gchar* bytes_to_str(const guint8 *bd, int bd_len); * * @see bytes_to_str() */ +WS_DLL_PUBLIC gchar* bytes_to_str_punct(const guint8 *bd, int bd_len, gchar punct); /** Turn a string of hex digits with optional separators (defined by @@ -113,6 +118,7 @@ gchar* bytes_to_str_punct(const guint8 *bd, int bd_len, gchar punct); * bytes. * @return True if the string was converted successfully */ +WS_DLL_PUBLIC gboolean hex_str_to_bytes(const char *hex_str, GByteArray *bytes, gboolean force_separators); @@ -124,6 +130,7 @@ gboolean hex_str_to_bytes(const char *hex_str, GByteArray *bytes, * @return True if the string was converted successfully * @see format_uri() */ +WS_DLL_PUBLIC gboolean uri_str_to_bytes(const char *uri_str, GByteArray *bytes); /** Turn a byte array into an RFC 3986 percent-encoded string. @@ -139,6 +146,7 @@ gboolean uri_str_to_bytes(const char *uri_str, GByteArray *bytes); * with the % character itself are always reserved. * @see uri_str_to_bytes(), format_text(), isprint() */ +WS_DLL_PUBLIC const gchar* format_uri(const GByteArray *bytes, const gchar *reserved_chars); /** Turn a OID string representation (dot notation) into a byte array. @@ -158,6 +166,7 @@ gboolean oid_str_to_bytes(const char *oid_str, GByteArray *bytes); * * @todo - Should this be in strutil.c? */ +WS_DLL_PUBLIC GByteArray *byte_array_dup(GByteArray *ba); /** @@ -171,6 +180,7 @@ GByteArray *byte_array_dup(GByteArray *ba); * * @todo - Should this be in strutil.c? */ +WS_DLL_PUBLIC gboolean byte_array_equal(GByteArray *ba1, GByteArray *ba2); @@ -180,6 +190,7 @@ gboolean byte_array_equal(GByteArray *ba1, GByteArray *ba2); * @param unescaped The unescaped string * @return An XML-escaped representation of the input string */ +WS_DLL_PUBLIC gchar* xml_escape(const gchar *unescaped); /** @@ -208,6 +219,7 @@ const guint8 * epan_memmem(const guint8 *haystack, guint haystack_len, * @return A pointer to a buffer containing the converted raw bytes. This * buffer must be g_free()d by the caller. */ +WS_DLL_PUBLIC guint8 * convert_string_to_hex(const char *string, size_t *nbytes); /** Prep a string for case-sensitive vs case-insensitive searching. @@ -218,6 +230,7 @@ guint8 * convert_string_to_hex(const char *string, size_t *nbytes); * an uppercased version if not. In either case the string must be g_free()d * by the caller. */ +WS_DLL_PUBLIC char * convert_string_case(const char *string, gboolean case_insensitive); /** Finds the first occurrence of string 'needle' in string 'haystack'. @@ -228,6 +241,7 @@ char * convert_string_case(const char *string, gboolean case_insensitive); * @return A pointer into 'haystack' where 'needle' is first found. * Otherwise it returns NULL. */ +WS_DLL_PUBLIC char * epan_strcasestr(const char *haystack, const char *needle); /** Guarantee a non-null string. @@ -235,9 +249,12 @@ char * epan_strcasestr(const char *haystack, const char *needle); * @param string The string to check * @return A pointer 'string' if it's non-null, otherwise "[NULL]". */ +WS_DLL_PUBLIC const char * string_or_null(const char *string); +WS_DLL_PUBLIC int escape_string_len(const char *string); +WS_DLL_PUBLIC char * escape_string(char *dst, const char *string); @@ -250,6 +267,7 @@ void IA5_7BIT_decode(unsigned char * dest, const unsigned char* src, int len); * @return A copy of the string with every original 'chr' being * transformed into double 'chr'. */ +WS_DLL_PUBLIC gchar* ws_strdup_escape_char (const gchar *str, const gchar chr); /** Copy a string, unescaping the 'chr' characters in it @@ -259,6 +277,7 @@ gchar* ws_strdup_escape_char (const gchar *str, const gchar chr); * @return A copy of the string with every occurrence of double 'chr' in * the original string being copied as a single 'chr'. */ +WS_DLL_PUBLIC gchar* ws_strdup_unescape_char (const gchar *str, const gchar chr); /** Replace values in a string @@ -270,6 +289,7 @@ gchar* ws_strdup_unescape_char (const gchar *str, const gchar chr); * @return A newly-allocated version of str with replacement values or * NULL on failure. */ +WS_DLL_PUBLIC gchar *string_replace(const gchar* str, const gchar *old_val, const gchar *new_val); /** diff --git a/epan/tap.h b/epan/tap.h index 6c1b95ea11..184ad52242 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -26,6 +26,7 @@ #define __TAP_H__ #include +#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { @@ -46,24 +47,24 @@ typedef void (*tap_draw_cb)(void *tapdata); ** but does not, itself, require dissection */ extern void tap_init(void); -extern int register_tap(const char *name); -extern int find_tap_id(const char *name); -extern void tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data); -extern void tap_build_interesting(epan_dissect_t *edt); +WS_DLL_PUBLIC int register_tap(const char *name); +WS_DLL_PUBLIC int find_tap_id(const char *name); +WS_DLL_PUBLIC void tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data); +WS_DLL_PUBLIC void tap_build_interesting(epan_dissect_t *edt); extern void tap_queue_init(epan_dissect_t *edt); extern void tap_push_tapped_queue(epan_dissect_t *edt); -extern void reset_tap_listeners(void); -extern void draw_tap_listeners(gboolean draw_all); -extern GString *register_tap_listener(const char *tapname, void *tapdata, +WS_DLL_PUBLIC void reset_tap_listeners(void); +WS_DLL_PUBLIC void draw_tap_listeners(gboolean draw_all); +WS_DLL_PUBLIC GString *register_tap_listener(const char *tapname, void *tapdata, const char *fstring, guint flags, tap_reset_cb tap_reset, tap_packet_cb tap_packet, tap_draw_cb tap_draw); -extern GString *set_tap_dfilter(void *tapdata, const char *fstring); -extern void remove_tap_listener(void *tapdata); -extern gboolean tap_listeners_require_dissection(void); +WS_DLL_PUBLIC GString *set_tap_dfilter(void *tapdata, const char *fstring); +WS_DLL_PUBLIC void remove_tap_listener(void *tapdata); +WS_DLL_PUBLIC gboolean tap_listeners_require_dissection(void); extern gboolean have_tap_listener(int tap_id); -extern gboolean have_filtering_tap_listeners(void); -extern guint union_of_tap_listener_flags(void); -extern const void *fetch_tapped_data(int tap_id, int idx); +WS_DLL_PUBLIC gboolean have_filtering_tap_listeners(void); +WS_DLL_PUBLIC guint union_of_tap_listener_flags(void); +WS_DLL_PUBLIC const void *fetch_tapped_data(int tap_id, int idx); #ifdef __cplusplus } diff --git a/epan/tcap-persistentdata.h b/epan/tcap-persistentdata.h index b8f90a2a7b..93e68fb28d 100644 --- a/epan/tcap-persistentdata.h +++ b/epan/tcap-persistentdata.h @@ -31,6 +31,8 @@ #include #include #include +#include "ws_symbol_export.h" + /** @file * lists and hash tables used in wireshark's tcap dissector * for calculation of delays in tcap-calls @@ -170,6 +172,6 @@ struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb, proto_tree *tree, struct tcapsrt_info_t * p_tcap_info); -WS_VAR_IMPORT gboolean gtcap_StatSRT; +WS_DLL_PUBLIC gboolean gtcap_StatSRT; #endif /* __tcapsrt_HASH__*/ diff --git a/epan/tfs.h b/epan/tfs.h index ea93a88d57..31f5820ec7 100644 --- a/epan/tfs.h +++ b/epan/tfs.h @@ -26,6 +26,8 @@ #ifndef __TFS_H__ #define __TFS_H__ +#include "ws_symbol_export.h" + /** @file * true_false strings */ @@ -40,43 +42,43 @@ typedef struct true_false_string { * A default set of true/false strings that dissectors can use for * FT_BOOLEAN header fields. */ -WS_VAR_IMPORT const true_false_string tfs_true_false; -WS_VAR_IMPORT const true_false_string tfs_yes_no; -WS_VAR_IMPORT const true_false_string tfs_no_yes; -WS_VAR_IMPORT const true_false_string tfs_set_notset; -WS_VAR_IMPORT const true_false_string tfs_enabled_disabled; -WS_VAR_IMPORT const true_false_string tfs_disabled_enabled; -WS_VAR_IMPORT const true_false_string tfs_ok_error; -WS_VAR_IMPORT const true_false_string tfs_error_ok; -WS_VAR_IMPORT const true_false_string tfs_success_fail; -WS_VAR_IMPORT const true_false_string tfs_fail_success; -WS_VAR_IMPORT const true_false_string tfs_on_off; -WS_VAR_IMPORT const true_false_string tfs_ack_nack; -WS_VAR_IMPORT const true_false_string tfs_odd_even; -WS_VAR_IMPORT const true_false_string tfs_allow_block; -WS_VAR_IMPORT const true_false_string tfs_restricted_allowed; -WS_VAR_IMPORT const true_false_string tfs_accept_reject; -WS_VAR_IMPORT const true_false_string tfs_more_nomore; -WS_VAR_IMPORT const true_false_string tfs_present_absent; -WS_VAR_IMPORT const true_false_string tfs_present_not_present; -WS_VAR_IMPORT const true_false_string tfs_active_inactive; -WS_VAR_IMPORT const true_false_string tfs_found_not_found; -WS_VAR_IMPORT const true_false_string tfs_command_response; -WS_VAR_IMPORT const true_false_string tfs_capable_not_capable; -WS_VAR_IMPORT const true_false_string tfs_supported_not_supported; -WS_VAR_IMPORT const true_false_string tfs_used_notused; -WS_VAR_IMPORT const true_false_string tfs_high_low; -WS_VAR_IMPORT const true_false_string tfs_pressed_not_pressed; -WS_VAR_IMPORT const true_false_string tfs_implemented_not_implemented; -WS_VAR_IMPORT const true_false_string tfs_requested_not_requested; -WS_VAR_IMPORT const true_false_string tfs_reliable_not_reliable; -WS_VAR_IMPORT const true_false_string tfs_allowed_not_allowed; -WS_VAR_IMPORT const true_false_string tfs_not_allowed_allowed; -WS_VAR_IMPORT const true_false_string tfs_accepted_not_accepted; -WS_VAR_IMPORT const true_false_string tfs_detected_not_detected; -WS_VAR_IMPORT const true_false_string tfs_available_not_available; -WS_VAR_IMPORT const true_false_string tfs_shared_independent; -WS_VAR_IMPORT const true_false_string tfs_valid_invalid; -WS_VAR_IMPORT const true_false_string tfs_group_unique_name; -WS_VAR_IMPORT const true_false_string tfs_inuse_not_inuse; +WS_DLL_PUBLIC const true_false_string tfs_true_false; +WS_DLL_PUBLIC const true_false_string tfs_yes_no; +WS_DLL_PUBLIC const true_false_string tfs_no_yes; +WS_DLL_PUBLIC const true_false_string tfs_set_notset; +WS_DLL_PUBLIC const true_false_string tfs_enabled_disabled; +WS_DLL_PUBLIC const true_false_string tfs_disabled_enabled; +WS_DLL_PUBLIC const true_false_string tfs_ok_error; +WS_DLL_PUBLIC const true_false_string tfs_error_ok; +WS_DLL_PUBLIC const true_false_string tfs_success_fail; +WS_DLL_PUBLIC const true_false_string tfs_fail_success; +WS_DLL_PUBLIC const true_false_string tfs_on_off; +WS_DLL_PUBLIC const true_false_string tfs_ack_nack; +WS_DLL_PUBLIC const true_false_string tfs_odd_even; +WS_DLL_PUBLIC const true_false_string tfs_allow_block; +WS_DLL_PUBLIC const true_false_string tfs_restricted_allowed; +WS_DLL_PUBLIC const true_false_string tfs_accept_reject; +WS_DLL_PUBLIC const true_false_string tfs_more_nomore; +WS_DLL_PUBLIC const true_false_string tfs_present_absent; +WS_DLL_PUBLIC const true_false_string tfs_present_not_present; +WS_DLL_PUBLIC const true_false_string tfs_active_inactive; +WS_DLL_PUBLIC const true_false_string tfs_found_not_found; +WS_DLL_PUBLIC const true_false_string tfs_command_response; +WS_DLL_PUBLIC const true_false_string tfs_capable_not_capable; +WS_DLL_PUBLIC const true_false_string tfs_supported_not_supported; +WS_DLL_PUBLIC const true_false_string tfs_used_notused; +WS_DLL_PUBLIC const true_false_string tfs_high_low; +WS_DLL_PUBLIC const true_false_string tfs_pressed_not_pressed; +WS_DLL_PUBLIC const true_false_string tfs_implemented_not_implemented; +WS_DLL_PUBLIC const true_false_string tfs_requested_not_requested; +WS_DLL_PUBLIC const true_false_string tfs_reliable_not_reliable; +WS_DLL_PUBLIC const true_false_string tfs_allowed_not_allowed; +WS_DLL_PUBLIC const true_false_string tfs_not_allowed_allowed; +WS_DLL_PUBLIC const true_false_string tfs_accepted_not_accepted; +WS_DLL_PUBLIC const true_false_string tfs_detected_not_detected; +WS_DLL_PUBLIC const true_false_string tfs_available_not_available; +WS_DLL_PUBLIC const true_false_string tfs_shared_independent; +WS_DLL_PUBLIC const true_false_string tfs_valid_invalid; +WS_DLL_PUBLIC const true_false_string tfs_group_unique_name; +WS_DLL_PUBLIC const true_false_string tfs_inuse_not_inuse; #endif diff --git a/epan/timestamp.h b/epan/timestamp.h index 27badd5e2c..0992b3eaa0 100644 --- a/epan/timestamp.h +++ b/epan/timestamp.h @@ -25,6 +25,8 @@ #ifndef __TIMESTAMP_H__ #define __TIMESTAMP_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -76,14 +78,14 @@ typedef enum { TS_SECONDS_NOT_SET } ts_seconds_type; -extern ts_type timestamp_get_type(void); -extern void timestamp_set_type(ts_type); +WS_DLL_PUBLIC ts_type timestamp_get_type(void); +WS_DLL_PUBLIC void timestamp_set_type(ts_type); -extern int timestamp_get_precision(void); -extern void timestamp_set_precision(int tsp); +WS_DLL_PUBLIC int timestamp_get_precision(void); +WS_DLL_PUBLIC void timestamp_set_precision(int tsp); -extern ts_seconds_type timestamp_get_seconds_type(void); -extern void timestamp_set_seconds_type(ts_seconds_type); +WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void); +WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type); #ifdef __cplusplus } diff --git a/epan/to_str.c b/epan/to_str.c index 601b898548..09f87d422a 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -32,6 +32,7 @@ #include "emem.h" #include "proto.h" #include "to_str.h" +#include "strutil.h" /* * If a user _does_ pass in a too-small buffer, this is probably diff --git a/epan/to_str.h b/epan/to_str.h index c86e0b17b0..cc0f106474 100644 --- a/epan/to_str.h +++ b/epan/to_str.h @@ -30,6 +30,7 @@ #include "nstime.h" #include "time_fmt.h" #include +#include "ws_symbol_export.h" #define GUID_STR_LEN 37 #define MAX_IP_STR_LEN 16 @@ -47,57 +48,57 @@ struct e_in6_addr; /* !!Deprecated!! - use ep_address_to_str() */ #define address_to_str ep_address_to_str -extern gchar* ep_address_to_str(const address *); +WS_DLL_PUBLIC gchar* ep_address_to_str(const address *); extern gchar* se_address_to_str(const address *); -extern void address_to_str_buf(const address *addr, gchar *buf, int buf_len); -extern const gchar* bytestring_to_str(const guint8 *, const guint32, const char); -extern const gchar* ether_to_str(const guint8 *); -extern const gchar* tvb_ether_to_str(tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC void address_to_str_buf(const address *addr, gchar *buf, int buf_len); +WS_DLL_PUBLIC const gchar* bytestring_to_str(const guint8 *, const guint32, const char); +WS_DLL_PUBLIC const gchar* ether_to_str(const guint8 *); +WS_DLL_PUBLIC const gchar* tvb_ether_to_str(tvbuff_t *tvb, const gint offset); extern const gchar* ax25_to_str(const guint8 *); extern gchar* get_ax25_name(const guint8 *); -extern const gchar* ip_to_str(const guint8 *); -extern const gchar* tvb_ip_to_str(tvbuff_t *tvb, const gint offset); -extern void ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len); +WS_DLL_PUBLIC const gchar* ip_to_str(const guint8 *); +WS_DLL_PUBLIC const gchar* tvb_ip_to_str(tvbuff_t *tvb, const gint offset); +void ip_to_str_buf(const guint8 *ad, gchar *buf, const int buf_len); extern const gchar* fc_to_str(const guint8 *); extern gchar* fcwwn_to_str (const guint8 *); -extern const gchar* tvb_fc_to_str(tvbuff_t *tvb, const gint offset); -extern gchar* tvb_fcwwn_to_str (tvbuff_t *tvb, const gint offset); -extern gchar* ip6_to_str(const struct e_in6_addr *); -extern gchar* tvb_ip6_to_str(tvbuff_t *tvb, const gint offset); -extern void ip6_to_str_buf(const struct e_in6_addr *, gchar *); +WS_DLL_PUBLIC const gchar* tvb_fc_to_str(tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC gchar* tvb_fcwwn_to_str (tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC gchar* ip6_to_str(const struct e_in6_addr *); +WS_DLL_PUBLIC gchar* tvb_ip6_to_str(tvbuff_t *tvb, const gint offset); +void ip6_to_str_buf(const struct e_in6_addr *, gchar *); extern gchar* ipx_addr_to_str(const guint32, const guint8 *); extern gchar* ipxnet_to_string(const guint8 *ad); extern gchar* ipxnet_to_str_punct(const guint32 ad, const char punct); extern gchar* tvb_vines_addr_to_str(tvbuff_t *tvb, const gint offset); -extern gchar* eui64_to_str(const guint64 ad); -extern gchar* tvb_eui64_to_str(tvbuff_t *tvb, const gint offset, const guint encoding); -extern gchar* time_secs_to_str(const gint32 time_val); -extern gchar* time_secs_to_str_unsigned(const guint32); -extern gchar* time_msecs_to_str(gint32 time_val); -extern gchar* abs_time_to_str(const nstime_t*, const absolute_time_display_e fmt, +WS_DLL_PUBLIC gchar* eui64_to_str(const guint64 ad); +WS_DLL_PUBLIC gchar* tvb_eui64_to_str(tvbuff_t *tvb, const gint offset, const guint encoding); +WS_DLL_PUBLIC gchar* time_secs_to_str(const gint32 time_val); +gchar* time_secs_to_str_unsigned(const guint32); +WS_DLL_PUBLIC gchar* time_msecs_to_str(gint32 time_val); +WS_DLL_PUBLIC gchar* abs_time_to_str(const nstime_t*, const absolute_time_display_e fmt, gboolean show_zone); -extern gchar* abs_time_secs_to_str(const time_t, const absolute_time_display_e fmt, +WS_DLL_PUBLIC gchar* abs_time_secs_to_str(const time_t, const absolute_time_display_e fmt, gboolean show_zone); -extern void display_signed_time(gchar *, int, const gint32, gint32, const to_str_time_res_t); -extern void display_epoch_time(gchar *, int, const time_t, gint32, const to_str_time_res_t); +WS_DLL_PUBLIC void display_signed_time(gchar *, int, const gint32, gint32, const to_str_time_res_t); +WS_DLL_PUBLIC void display_epoch_time(gchar *, int, const time_t, gint32, const to_str_time_res_t); extern gchar* guint32_to_str(const guint32 u); extern void guint32_to_str_buf(guint32 u, gchar *buf, int buf_len); -extern gchar* rel_time_to_str(const nstime_t*); -extern gchar* rel_time_to_secs_str(const nstime_t*); -extern gchar* guid_to_str(const e_guid_t*); -extern gchar* guid_to_str_buf(const e_guid_t*, gchar*, int); +WS_DLL_PUBLIC gchar* rel_time_to_str(const nstime_t*); +WS_DLL_PUBLIC gchar* rel_time_to_secs_str(const nstime_t*); +WS_DLL_PUBLIC gchar* guid_to_str(const e_guid_t*); +gchar* guid_to_str_buf(const e_guid_t*, gchar*, int); -extern char *decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint64 value); +WS_DLL_PUBLIC char *decode_bits_in_field(const guint bit_offset, const gint no_of_bits, const guint64 value); -extern char *other_decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, +WS_DLL_PUBLIC char *other_decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, const int width); -extern char *decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, +WS_DLL_PUBLIC char *decode_bitfield_value(char *buf, const guint32 val, const guint32 mask, const int width); -extern const char *decode_boolean_bitfield(const guint32 val, const guint32 mask, const int width, +WS_DLL_PUBLIC const char *decode_boolean_bitfield(const guint32 val, const guint32 mask, const int width, const char *truedesc, const char *falsedesc); -extern const char *decode_numeric_bitfield(const guint32 val, const guint32 mask, const int width, +WS_DLL_PUBLIC const char *decode_numeric_bitfield(const guint32 val, const guint32 mask, const int width, const char *fmt); #endif /* __TO_STR_H__ */ diff --git a/epan/tpg.h b/epan/tpg.h index 5ebc208ce4..4bd5efc64e 100644 --- a/epan/tpg.h +++ b/epan/tpg.h @@ -33,7 +33,7 @@ #include #include #include - +#include "ws_symbol_export.h" typedef struct _tpg_parser_data_t { ep_stack_t stack; @@ -62,10 +62,10 @@ extern tpg_parser_data_t* tpg_start(proto_tree* root_tree, #define TPG_UINT_HEX(i) strtoul(tvb_get_ephemeral_string((i)->tvb,(i)->offset,(i)->len),NULL,16) #define TPG_TVB(i) tvb_new_subset((i)->tvb,(i)->offset,(i)->len,(i)->len) -extern guint32 tpg_ipv4(tvbparse_elem_t*); +WS_DLL_PUBLIC guint32 tpg_ipv4(tvbparse_elem_t*); #define TPG_IPV4(i) tpg_ipv4((i)) -extern guint8* tpg_ipv6(tvbparse_elem_t*); +WS_DLL_PUBLIC guint8* tpg_ipv6(tvbparse_elem_t*); #define TPG_IPV6(i) tpg_ipv6((i)) #define TPG_PUSH(tpg,pi,ett) ep_stack_push(((tpg_parser_data_t*)(tpg))->stack,proto_item_add_subtree((pi),(ett))) diff --git a/epan/tvbparse.h b/epan/tvbparse.h index 50cc11a2e3..a7d24893b6 100644 --- a/epan/tvbparse.h +++ b/epan/tvbparse.h @@ -67,6 +67,7 @@ #include #include +#include "ws_symbol_export.h" typedef struct _tvbparse_elem_t tvbparse_elem_t; typedef struct _tvbparse_wanted_t tvbparse_wanted_t; @@ -190,6 +191,7 @@ struct _tvbparse_elem_t { * When looked for it returns a simple element one character long if the char * at the current offset matches one of the the needles. */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_char(const int id, const gchar* needles, const void* private_data, @@ -202,6 +204,7 @@ tvbparse_wanted_t* tvbparse_char(const int id, * When looked for it returns a simple element one character long if the char * at the current offset does not match one of the the needles. */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_not_char(const int id, const gchar* needle, const void* private_data, @@ -216,6 +219,7 @@ tvbparse_wanted_t* tvbparse_not_char(const int id, * An element will be returned if at least min_len chars are given (1 if it's 0) * It will get at most max_len chars or as much as it can if max_len is 0. */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_chars(const int id, const guint min_len, const guint max_len, @@ -233,6 +237,7 @@ tvbparse_wanted_t* tvbparse_chars(const int id, * An element will be returned if at least min_len chars are given (1 if it's 0) * It will get at most max_len chars or as much as it can if max_len is 0. */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_not_chars(const int id, const guint min_len, const guint max_len, @@ -247,6 +252,7 @@ tvbparse_wanted_t* tvbparse_not_chars(const int id, * When looked for it returns a simple element if we have the given string at * the current offset */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_string(const int id, const gchar* string, const void* private_data, @@ -259,6 +265,7 @@ tvbparse_wanted_t* tvbparse_string(const int id, * When looked for it returns a simple element if we have a matching string at * the current offset */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_casestring(const int id, const gchar* str, const void* data, @@ -281,6 +288,7 @@ tvbparse_wanted_t* tvbparse_casestring(const int id, * op_mode values determine how the terminating element and the current offset * of the parser are handled */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_until(const int id, const void* private_data, tvbparse_action_t before_cb, @@ -297,6 +305,7 @@ tvbparse_wanted_t* tvbparse_until(const int id, * The list of candidates is terminated with a NULL * */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_set_oneof(const int id, const void* private_data, tvbparse_action_t before_cb, @@ -306,6 +315,7 @@ tvbparse_wanted_t* tvbparse_set_oneof(const int id, /* * hashed */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_hashed(const int id, const void* data, tvbparse_action_t before_cb, @@ -314,6 +324,7 @@ tvbparse_wanted_t* tvbparse_hashed(const int id, tvbparse_wanted_t* other, ...); +WS_DLL_PUBLIC void tvbparse_hashed_add(tvbparse_wanted_t* w, ...); /* @@ -326,6 +337,7 @@ void tvbparse_hashed_add(tvbparse_wanted_t* w, ...); * The list of candidates is terminated with a NULL. * */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_set_seq(const int id, const void* private_data, tvbparse_action_t before_cb, @@ -340,6 +352,7 @@ tvbparse_wanted_t* tvbparse_set_seq(const int id, * a composed element is returned. * */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_some(const int id, const guint min, const guint max, @@ -358,6 +371,7 @@ tvbparse_wanted_t* tvbparse_some(const int id, * this is a pointer to a pointer to a wanted element (that might have not * been initialized yet) so that recursive structures */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_handle(tvbparse_wanted_t** handle); #if 0 @@ -401,6 +415,7 @@ tvbparse_wanted_t* tvbparse_ft_numcmp(int id, * * C strings are matched with tvbparse_quoted(-1,NULL,NULL,NULL,"\"","\\") */ +WS_DLL_PUBLIC tvbparse_wanted_t* tvbparse_quoted(const int id, const void* data, tvbparse_action_t before_cb, @@ -412,6 +427,7 @@ tvbparse_wanted_t* tvbparse_quoted(const int id, * a helper callback for quoted strings that will shrink the token to contain * only the string andnot the quotes */ +WS_DLL_PUBLIC void tvbparse_shrink_token_cb(void* tvbparse_data, const void* wanted_data, tvbparse_elem_t* tok); @@ -426,6 +442,7 @@ void tvbparse_shrink_token_cb(void* tvbparse_data, * private_data: will be passed to the action callbacks * ignore: a wanted token type to be ignored (the associated cb WILL be called when it matches) */ +WS_DLL_PUBLIC tvbparse_t* tvbparse_init(tvbuff_t* tvb, const int offset, int len, @@ -433,8 +450,10 @@ tvbparse_t* tvbparse_init(tvbuff_t* tvb, const tvbparse_wanted_t* ignore); /* reset the parser */ +WS_DLL_PUBLIC gboolean tvbparse_reset(tvbparse_t* tt, const int offset, int len); +WS_DLL_PUBLIC guint tvbparse_curr_offset(tvbparse_t* tt); guint tvbparse_len_left(tvbparse_t* tt); @@ -446,6 +465,7 @@ guint tvbparse_len_left(tvbparse_t* tt); * is a match. * The parser will be left in its original state and no callbacks will be called. */ +WS_DLL_PUBLIC gboolean tvbparse_peek(tvbparse_t* tt, const tvbparse_wanted_t* wanted); @@ -455,6 +475,7 @@ gboolean tvbparse_peek(tvbparse_t* tt, * if there is a match it will set the offset of the current parser after * the end of the token */ +WS_DLL_PUBLIC tvbparse_elem_t* tvbparse_get(tvbparse_t* tt, const tvbparse_wanted_t* wanted); @@ -463,10 +484,12 @@ tvbparse_elem_t* tvbparse_get(tvbparse_t* tt, * current offset. * This function is slow. */ +WS_DLL_PUBLIC tvbparse_elem_t* tvbparse_find(tvbparse_t* tt, const tvbparse_wanted_t* wanted); +WS_DLL_PUBLIC void tvbparse_tree_add_elem(proto_tree* tree, tvbparse_elem_t* curr); #endif diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 86ecf1c027..7a165dc8f9 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -120,27 +120,27 @@ typedef void (*tvbuff_free_cb_t)(void*); * Returns a pointer to a newly initialized ep_alloc'd REAL_DATA * tvbuff with the bits octet aligned. */ -extern tvbuff_t* tvb_new_octet_aligned(tvbuff_t *tvb, guint32 bit_offset, gint32 no_of_bits); +WS_DLL_PUBLIC tvbuff_t* tvb_new_octet_aligned(tvbuff_t *tvb, guint32 bit_offset, gint32 no_of_bits); /** Free a tvbuff_t and all tvbuffs chained from it * The tvbuff must be 'the 'head' (initial) tvb of a chain or * must not be in a chain. * If specified, a callback to free the tvbuff data will be invoked * for each tvbuff free'd */ -extern void tvb_free(tvbuff_t*); +WS_DLL_PUBLIC void tvb_free(tvbuff_t*); /** Free the tvbuff_t and all tvbuffs chained from it. * The tvbuff must be 'the 'head' (initial) tvb of a chain or * must not be in a chain. * If specified, a callback to free the tvbuff data will be invoked * for each tvbuff free'd */ -extern void tvb_free_chain(tvbuff_t*); +void tvb_free_chain(tvbuff_t*); /** Set a callback function to call when a tvbuff is actually freed * One argument is passed to that callback --- a void* that points * to the real data. Obviously, this only applies to a * TVBUFF_REAL_DATA tvbuff. */ -extern void tvb_set_free_cb(tvbuff_t*, const tvbuff_free_cb_t); +WS_DLL_PUBLIC void tvb_set_free_cb(tvbuff_t*, const tvbuff_free_cb_t); /** Attach a TVBUFF_REAL_DATA tvbuff to a parent tvbuff. This connection * is used during a tvb_free_chain()... the "child" TVBUFF_REAL_DATA acts @@ -151,16 +151,16 @@ extern void tvb_set_free_cb(tvbuff_t*, const tvbuff_free_cb_t); * is that the new tvbuff *is* part of the "chain of creation", but in a way * that these tvbuff routines are ignorant of. Use this function to make * the tvbuff routines knowledgable of this fact. */ -extern void tvb_set_child_real_data_tvbuff(tvbuff_t* parent, tvbuff_t* child); +WS_DLL_PUBLIC void tvb_set_child_real_data_tvbuff(tvbuff_t* parent, tvbuff_t* child); -extern tvbuff_t* tvb_new_child_real_data(tvbuff_t* parent, const guint8* data, const guint length, +WS_DLL_PUBLIC tvbuff_t* tvb_new_child_real_data(tvbuff_t* parent, const guint8* data, const guint length, const gint reported_length); /** Create a tvbuff backed by existing data. Can throw ReportedBoundsError. * Normally, a callback to free the data should be registered using tvb_set_free_cb(); * when this tvbuff is freed, then your callback will be called, and at that time * you can free your original data. */ -extern tvbuff_t* tvb_new_real_data(const guint8* data, const guint length, +WS_DLL_PUBLIC tvbuff_t* tvb_new_real_data(const guint8* data, const guint length, const gint reported_length); /** Create a tvbuff that's a subset of another tvbuff. @@ -178,68 +178,70 @@ extern tvbuff_t* tvb_new_real_data(const guint8* data, const guint length, * Will throw BoundsError if 'backing_offset'/'length' * is beyond the bounds of the backing tvbuff. * Can throw ReportedBoundsError. */ -extern tvbuff_t* tvb_new_subset(tvbuff_t* backing, +WS_DLL_PUBLIC tvbuff_t* tvb_new_subset(tvbuff_t* backing, const gint backing_offset, const gint backing_length, const gint reported_length); -/** Similar to tvb_new_subset() but with captured length calculated +/* +* Similar to tvb_new_subset() but with captured length calculated * to fit within min(reported length, backing_length). * Can throw ReportedBoundsError. */ -extern tvbuff_t* tvb_new_subset_length(tvbuff_t *backing, +WS_DLL_PUBLIC tvbuff_t* tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint backing_length); /** Similar to tvb_new_subset() but with backing_length and reported_length set to -1. * Can throw ReportedBoundsError. */ -extern tvbuff_t* tvb_new_subset_remaining(tvbuff_t* backing, +WS_DLL_PUBLIC tvbuff_t* tvb_new_subset_remaining(tvbuff_t* backing, const gint backing_offset); -/** Both tvb_composite_append and tvb_composite_prepend can throw +/* +* Both tvb_composite_append and tvb_composite_prepend can throw * BoundsError if member_offset/member_length goes beyond bounds of * the 'member' tvbuff. */ /** Append to the list of tvbuffs that make up this composite tvbuff */ -extern void tvb_composite_append(tvbuff_t* tvb, tvbuff_t* member); +WS_DLL_PUBLIC void tvb_composite_append(tvbuff_t* tvb, tvbuff_t* member); /** Prepend to the list of tvbuffs that make up this composite tvbuff */ extern void tvb_composite_prepend(tvbuff_t* tvb, tvbuff_t* member); /** Create an empty composite tvbuff. */ -extern tvbuff_t* tvb_new_composite(void); +WS_DLL_PUBLIC tvbuff_t* tvb_new_composite(void); /** Mark a composite tvbuff as initialized. No further appends or prepends * occur, data access can finally happen after this finalization. */ -extern void tvb_composite_finalize(tvbuff_t* tvb); +WS_DLL_PUBLIC void tvb_composite_finalize(tvbuff_t* tvb); /* Get total length of buffer */ -extern guint tvb_length(const tvbuff_t*); +WS_DLL_PUBLIC guint tvb_length(const tvbuff_t*); /** Computes bytes to end of buffer, from offset (which can be negative, * to indicate bytes from end of buffer). Function returns -1 to * indicate that offset is out of bounds. No exception is thrown. */ -extern gint tvb_length_remaining(const tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gint tvb_length_remaining(const tvbuff_t*, const gint offset); /** Same as above, but throws an exception if the offset is out of bounds. */ -extern guint tvb_ensure_length_remaining(const tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint tvb_ensure_length_remaining(const tvbuff_t*, const gint offset); /* Checks (w/o throwing exception) that the bytes referred to by * 'offset'/'length' actually exist in the buffer */ -extern gboolean tvb_bytes_exist(const tvbuff_t*, const gint offset, const gint length); +WS_DLL_PUBLIC gboolean tvb_bytes_exist(const tvbuff_t*, const gint offset, const gint length); /** Checks that the bytes referred to by 'offset'/'length' actually exist * in the buffer, and throws an exception if they aren't. */ -extern void tvb_ensure_bytes_exist(const tvbuff_t *tvb, const gint offset, const gint length); +WS_DLL_PUBLIC void tvb_ensure_bytes_exist(const tvbuff_t *tvb, const gint offset, const gint length); /* Checks (w/o throwing exception) that offset exists in buffer */ -extern gboolean tvb_offset_exists(const tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gboolean tvb_offset_exists(const tvbuff_t*, const gint offset); /* Get reported length of buffer */ -extern guint tvb_reported_length(const tvbuff_t*); +WS_DLL_PUBLIC guint tvb_reported_length(const tvbuff_t*); /** Computes bytes of reported packet data to end of buffer, from offset * (which can be negative, to indicate bytes from end of buffer). Function * returns -1 to indicate that offset is out of bounds. No exception is * thrown. */ -extern gint tvb_reported_length_remaining(const tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC gint tvb_reported_length_remaining(const tvbuff_t *tvb, const gint offset); /** Set the reported length of a tvbuff to a given value; used for protocols whose headers contain an explicit length and where the calling @@ -247,72 +249,74 @@ extern gint tvb_reported_length_remaining(const tvbuff_t *tvb, const gint offset this protocol. Also adjusts the data length. */ -extern void tvb_set_reported_length(tvbuff_t*, const guint); +WS_DLL_PUBLIC void tvb_set_reported_length(tvbuff_t*, const guint); -extern guint tvb_offset_from_real_beginning(const tvbuff_t *tvb); +WS_DLL_PUBLIC guint tvb_offset_from_real_beginning(const tvbuff_t *tvb); /* Returns the offset from the first byte of real data. */ -extern gint tvb_raw_offset(tvbuff_t *tvb); +WS_DLL_PUBLIC gint tvb_raw_offset(tvbuff_t *tvb); /************** START OF ACCESSORS ****************/ /* All accessors will throw an exception if appropriate */ -extern guint8 tvb_get_guint8(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint8 tvb_get_guint8(tvbuff_t*, const gint offset); -extern guint16 tvb_get_ntohs(tvbuff_t*, const gint offset); -extern guint32 tvb_get_ntoh24(tvbuff_t*, const gint offset); -extern guint32 tvb_get_ntohl(tvbuff_t*, const gint offset); -extern guint64 tvb_get_ntoh40(tvbuff_t*, const gint offset); -extern guint64 tvb_get_ntoh48(tvbuff_t*, const gint offset); -extern guint64 tvb_get_ntoh56(tvbuff_t*, const gint offset); -extern guint64 tvb_get_ntoh64(tvbuff_t*, const gint offset); -extern gfloat tvb_get_ntohieee_float(tvbuff_t*, const gint offset); -extern gdouble tvb_get_ntohieee_double(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint16 tvb_get_ntohs(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint32 tvb_get_ntoh24(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint32 tvb_get_ntohl(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_ntoh40(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_ntoh48(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_ntoh56(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_ntoh64(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gfloat tvb_get_ntohieee_float(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gdouble tvb_get_ntohieee_double(tvbuff_t*, const gint offset); -extern guint16 tvb_get_letohs(tvbuff_t*, const gint offset); -extern guint32 tvb_get_letoh24(tvbuff_t*, const gint offset); -extern guint32 tvb_get_letohl(tvbuff_t*, const gint offset); -extern guint64 tvb_get_letoh40(tvbuff_t*, const gint offset); -extern guint64 tvb_get_letoh48(tvbuff_t*, const gint offset); -extern guint64 tvb_get_letoh56(tvbuff_t*, const gint offset); -extern guint64 tvb_get_letoh64(tvbuff_t*, const gint offset); -extern gfloat tvb_get_letohieee_float(tvbuff_t*, const gint offset); -extern gdouble tvb_get_letohieee_double(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint16 tvb_get_letohs(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint32 tvb_get_letoh24(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint32 tvb_get_letohl(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_letoh40(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_letoh48(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_letoh56(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint64 tvb_get_letoh64(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gfloat tvb_get_letohieee_float(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC gdouble tvb_get_letohieee_double(tvbuff_t*, const gint offset); /** * Fetch an IPv4 address, in network byte order. * We do *not* convert it to host byte order; we leave it in * network byte order, as that's what its callers expect. */ -extern guint32 tvb_get_ipv4(tvbuff_t*, const gint offset); +WS_DLL_PUBLIC guint32 tvb_get_ipv4(tvbuff_t*, const gint offset); /* Fetch an IPv6 address. */ -extern void tvb_get_ipv6(tvbuff_t*, const gint offset, struct e_in6_addr *addr); +WS_DLL_PUBLIC void tvb_get_ipv6(tvbuff_t*, const gint offset, struct e_in6_addr *addr); /* Fetch a GUID. */ -extern void tvb_get_ntohguid(tvbuff_t *tvb, const gint offset, e_guid_t *guid); -extern void tvb_get_letohguid(tvbuff_t *tvb, const gint offset, e_guid_t *guid); -extern void tvb_get_guid(tvbuff_t *tvb, const gint offset, e_guid_t *guid, const guint representation); +WS_DLL_PUBLIC void tvb_get_ntohguid(tvbuff_t *tvb, const gint offset, e_guid_t *guid); +WS_DLL_PUBLIC void tvb_get_letohguid(tvbuff_t *tvb, const gint offset, e_guid_t *guid); +WS_DLL_PUBLIC void tvb_get_guid(tvbuff_t *tvb, const gint offset, e_guid_t *guid, const guint representation); /* Fetch a specified number of bits from bit offset in a tvb. All of these functions are equivalent, except for the type of the retun value. Note that the parameter encoding (where supplied) is meaningless and ignored */ /* get 1 - 8 bits returned in a guint8 */ -extern guint8 tvb_get_bits8(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits); +WS_DLL_PUBLIC guint8 tvb_get_bits8(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits); /* get 1 - 16 bits returned in a guint16 */ -extern guint16 tvb_get_bits16(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); +WS_DLL_PUBLIC guint16 tvb_get_bits16(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); /* get 1 - 32 bits returned in a guint32 */ -extern guint32 tvb_get_bits32(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); +WS_DLL_PUBLIC guint32 tvb_get_bits32(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); /* get 1 - 64 bits returned in a guint64 */ -extern guint64 tvb_get_bits64(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); +WS_DLL_PUBLIC guint64 tvb_get_bits64(tvbuff_t *tvb, guint bit_offset, const gint no_of_bits, const guint encoding); /** * This function has EXACTLY the same behaviour as * tvb_get_bits32() */ -extern guint32 tvb_get_bits(tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding); +WS_DLL_PUBLIC guint32 tvb_get_bits(tvbuff_t *tvb, const guint bit_offset, const gint no_of_bits, const guint encoding); +WS_DLL_PUBLIC void tvb_get_bits_buf(tvbuff_t *tvb, guint bit_offset, gint no_of_bits, guint8 *buf, gboolean lsb0); +WS_DLL_PUBLIC guint8 *ep_tvb_get_bits(tvbuff_t *tvb, guint bit_offset, gint no_of_bits, gboolean lsb0); /** Returns target for convenience. Does not suffer from possible @@ -321,17 +325,17 @@ guint8 *ep_tvb_get_bits(tvbuff_t *tvb, guint bit_offset, gint no_of_bits, gboole * different TVBUFF_REAL_DATA tvbuffs. This function assumes that the * target memory is already allocated; it does not allocate or free the * target memory. */ -extern void* tvb_memcpy(tvbuff_t*, void* target, const gint offset, size_t length); +WS_DLL_PUBLIC void* tvb_memcpy(tvbuff_t*, void* target, const gint offset, size_t length); /** It is the user's responsibility to g_free() the memory allocated by * tvb_memdup(). Calls tvb_memcpy() */ -extern void* tvb_memdup(tvbuff_t*, const gint offset, size_t length); +WS_DLL_PUBLIC void* tvb_memdup(tvbuff_t*, const gint offset, size_t length); /* Same as above but the buffer returned from this function does not have to * be freed. It will be automatically freed after the packet is dissected. * Buffers allocated by this function are NOT persistent. */ -extern void* ep_tvb_memdup(tvbuff_t *tvb, const gint offset, size_t length); +WS_DLL_PUBLIC void* ep_tvb_memdup(tvbuff_t *tvb, const gint offset, size_t length); /** WARNING! This function is possibly expensive, temporarily allocating * another copy of the packet data. Furthermore, it's dangerous because once @@ -358,7 +362,7 @@ extern void* ep_tvb_memdup(tvbuff_t *tvb, const gint offset, size_t length); * and the pointer to the newly-contiguous data is returned. This dynamically- * allocated memory will be freed when the tvbuff is freed, after the * tvbuff_free_cb_t() is called, if any. */ -extern const guint8* tvb_get_ptr(tvbuff_t*, const gint offset, const gint length); +WS_DLL_PUBLIC const guint8* tvb_get_ptr(tvbuff_t*, const gint offset, const gint length); /** Find first occurrence of needle in tvbuff, starting at offset. Searches * at most maxlength number of bytes; if maxlength is -1, searches to @@ -367,7 +371,7 @@ extern const guint8* tvb_get_ptr(tvbuff_t*, const gint offset, const gint length * Will not throw an exception, even if maxlength exceeds boundary of tvbuff; * in that case, -1 will be returned if the boundary is reached before * finding needle. */ -extern gint tvb_find_guint8(tvbuff_t*, const gint offset, const gint maxlength, +WS_DLL_PUBLIC gint tvb_find_guint8(tvbuff_t*, const gint offset, const gint maxlength, const guint8 needle); /** Find first occurrence of any of the needles in tvbuff, starting at offset. @@ -376,7 +380,7 @@ extern gint tvb_find_guint8(tvbuff_t*, const gint offset, const gint maxlength, * Will not throw an exception, even if * maxlength exceeds boundary of tvbuff; in that case, -1 will be returned if * the boundary is reached before finding needle. */ -extern gint tvb_pbrk_guint8(tvbuff_t *, const gint offset, const gint maxlength, +WS_DLL_PUBLIC gint tvb_pbrk_guint8(tvbuff_t *, const gint offset, const gint maxlength, const guint8 *needles, guchar *found_needle); /** Find size of stringz (NUL-terminated string) by looking for terminating @@ -384,7 +388,7 @@ extern gint tvb_pbrk_guint8(tvbuff_t *, const gint offset, const gint maxlength, * * If the NUL isn't found, it throws the appropriate exception. */ -extern guint tvb_strsize(tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC guint tvb_strsize(tvbuff_t *tvb, const gint offset); /** Find size of UCS-2 or UTF-16 stringz (NUL-terminated string) by * looking for terminating 16-bit NUL. The size of the string includes @@ -392,13 +396,13 @@ extern guint tvb_strsize(tvbuff_t *tvb, const gint offset); * * If the NUL isn't found, it throws the appropriate exception. */ -extern guint tvb_unicode_strsize(tvbuff_t *tvb, const gint offset); +WS_DLL_PUBLIC guint tvb_unicode_strsize(tvbuff_t *tvb, const gint offset); /** Find length of string by looking for end of zero terminated string, up to * 'maxlength' characters'; if 'maxlength' is -1, searches to end * of tvbuff. * Returns -1 if 'maxlength' reached before finding EOS. */ -extern gint tvb_strnlen(tvbuff_t*, const gint offset, const guint maxlength); +WS_DLL_PUBLIC gint tvb_strnlen(tvbuff_t*, const gint offset, const guint maxlength); /** Convert a string from Unicode to ASCII. At the moment we fake it by * assuming all characters are ASCII )-: The len parameter is the number @@ -414,21 +418,21 @@ extern gint tvb_strnlen(tvbuff_t*, const gint offset, const guint maxlength); * automatically freed when wireshark starts dissecting * the next packet. */ -extern char *tvb_fake_unicode(tvbuff_t *tvb, int offset, const int len, +WS_DLL_PUBLIC char *tvb_fake_unicode(tvbuff_t *tvb, int offset, const int len, const gboolean little_endian); -extern char *tvb_get_ephemeral_faked_unicode(tvbuff_t *tvb, int offset, const int len, +WS_DLL_PUBLIC char *tvb_get_ephemeral_faked_unicode(tvbuff_t *tvb, int offset, const int len, const gboolean little_endian); /** * Format the data in the tvb from offset for size ... */ -extern gchar * tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size); +WS_DLL_PUBLIC gchar * tvb_format_text(tvbuff_t *tvb, const gint offset, const gint size); /** * Like "tvb_format_text()", but for 'wsp'; don't show * the characters as C-style escapes. */ -extern gchar * tvb_format_text_wsp(tvbuff_t *tvb, const gint offset, const gint size); +WS_DLL_PUBLIC gchar * tvb_format_text_wsp(tvbuff_t *tvb, const gint offset, const gint size); /** * Like "tvb_format_text()", but for null-padded strings; don't show @@ -471,10 +475,10 @@ extern gchar *tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const * instead it will automatically be freed when a new capture * or file is opened. */ -extern guint8 *tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length); -extern gchar *tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); -extern guint8 *tvb_get_ephemeral_string(tvbuff_t *tvb, const gint offset, const gint length); -extern guint8 *tvb_get_ephemeral_string_enc(tvbuff_t *tvb, const gint offset, +WS_DLL_PUBLIC guint8 *tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length); +WS_DLL_PUBLIC gchar *tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); +WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_string(tvbuff_t *tvb, const gint offset, const gint length); +WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_string_enc(tvbuff_t *tvb, const gint offset, const gint length, const guint encoding); extern gchar *tvb_get_ephemeral_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); extern guint8 *tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const gint length); @@ -515,11 +519,11 @@ extern guint8 *tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const g * instead it will automatically be freed when a new capture * or file is opened. */ -extern guint8 *tvb_get_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); -extern guint8 *tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); -extern const guint8 *tvb_get_const_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); -extern guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); -extern guint8 *tvb_get_ephemeral_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); +WS_DLL_PUBLIC guint8 *tvb_get_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); +WS_DLL_PUBLIC guint8 *tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); +WS_DLL_PUBLIC const guint8 *tvb_get_const_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); +WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); +WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); extern gchar *tvb_get_ephemeral_unicode_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); extern guint8 *tvb_get_seasonal_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); @@ -536,7 +540,7 @@ extern guint8 *tvb_get_seasonal_stringz(tvbuff_t *tvb, const gint offset, gint * * is truncated with a NUL, albeit not at buffer[bufsize - 1], but * at the correct spot, terminating the string. */ -extern gint tvb_get_nstringz(tvbuff_t *tvb, const gint offset, const guint bufsize, +WS_DLL_PUBLIC gint tvb_get_nstringz(tvbuff_t *tvb, const gint offset, const guint bufsize, guint8* buffer); /** Like tvb_get_nstringz(), but never returns -1. The string is guaranteed to @@ -545,7 +549,7 @@ extern gint tvb_get_nstringz(tvbuff_t *tvb, const gint offset, const guint bufsi * * bufsize MUST be greater than 0. */ -extern gint tvb_get_nstringz0(tvbuff_t *tvb, const gint offset, const guint bufsize, +WS_DLL_PUBLIC gint tvb_get_nstringz0(tvbuff_t *tvb, const gint offset, const guint bufsize, guint8* buffer); /** @@ -567,7 +571,7 @@ extern gint tvb_get_nstringz0(tvbuff_t *tvb, const gint offset, const guint bufs * terminator, or past the end of the buffer if we don't find a line * terminator. (It's not set if we return -1.) */ -extern gint tvb_find_line_end(tvbuff_t *tvb, const gint offset, int len, +WS_DLL_PUBLIC gint tvb_find_line_end(tvbuff_t *tvb, const gint offset, int len, gint *next_offset, const gboolean desegment); /** @@ -588,7 +592,7 @@ extern gint tvb_find_line_end(tvbuff_t *tvb, const gint offset, int len, * terminator, or past the end of the buffer if we don't find a line * terminator. */ -extern gint tvb_find_line_end_unquoted(tvbuff_t *tvb, const gint offset, int len, +WS_DLL_PUBLIC gint tvb_find_line_end_unquoted(tvbuff_t *tvb, const gint offset, int len, gint *next_offset); /** @@ -608,29 +612,29 @@ extern gint tvb_find_line_end_unquoted(tvbuff_t *tvb, const gint offset, int len * is smaller. */ -extern gint tvb_skip_wsp(tvbuff_t* tvb, const gint offset, const gint maxlength); +WS_DLL_PUBLIC gint tvb_skip_wsp(tvbuff_t* tvb, const gint offset, const gint maxlength); -extern gint tvb_skip_wsp_return(tvbuff_t* tvb, const gint offset); +WS_DLL_PUBLIC gint tvb_skip_wsp_return(tvbuff_t* tvb, const gint offset); /** * Call strncmp after checking if enough chars left, returning 0 if * it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1. */ -extern gint tvb_strneql(tvbuff_t *tvb, const gint offset, const gchar *str, +WS_DLL_PUBLIC gint tvb_strneql(tvbuff_t *tvb, const gint offset, const gchar *str, const size_t size); /** * Call g_ascii_strncasecmp after checking if enough chars left, returning * 0 if it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1. */ -extern gint tvb_strncaseeql(tvbuff_t *tvb, const gint offset, const gchar *str, +WS_DLL_PUBLIC gint tvb_strncaseeql(tvbuff_t *tvb, const gint offset, const gchar *str, const size_t size); /** * Call memcmp after checking if enough chars left, returning 0 if * it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1. */ -extern gint tvb_memeql(tvbuff_t *tvb, const gint offset, const guint8 *str, +WS_DLL_PUBLIC gint tvb_memeql(tvbuff_t *tvb, const gint offset, const guint8 *str, size_t size); /** @@ -638,14 +642,14 @@ extern gint tvb_memeql(tvbuff_t *tvb, const gint offset, const guint8 *str, * to the string with the formatted data, with "punct" as a byte * separator. */ -extern gchar *tvb_bytes_to_str_punct(tvbuff_t *tvb, const gint offset, const gint len, +WS_DLL_PUBLIC gchar *tvb_bytes_to_str_punct(tvbuff_t *tvb, const gint offset, const gint len, const gchar punct); /** * Format a bunch of data from a tvbuff as bytes, returning a pointer * to the string with the formatted data. */ -extern gchar *tvb_bytes_to_str(tvbuff_t *tvb, const gint offset, const gint len); +WS_DLL_PUBLIC gchar *tvb_bytes_to_str(tvbuff_t *tvb, const gint offset, const gint len); /** * Given a tvbuff, an offset into the tvbuff, and a length that starts @@ -662,15 +666,15 @@ typedef struct dgt_set_t } dgt_set_t; -extern const gchar *tvb_bcd_dig_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first); - +WS_DLL_PUBLIC const gchar *tvb_bcd_dig_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first); +WS_DLL_PUBLIC struct tvbuff *tvb_get_ds_tvb(tvbuff_t *tvb); /** Locate a sub-tvbuff within another tvbuff, starting at position * 'haystack_offset'. Returns the index of the beginning of 'needle' within * 'haystack', or -1 if 'needle' is not found. The index is relative * to the start of 'haystack', not 'haystack_offset'. */ -extern gint tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, +WS_DLL_PUBLIC gint tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, const gint haystack_offset); /** @@ -678,7 +682,7 @@ extern gint tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb, * length comprlen. Returns an uncompressed tvbuffer if uncompression * succeeded or NULL if uncompression failed. */ -extern tvbuff_t* tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen); +WS_DLL_PUBLIC tvbuff_t* tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen); /** * Uncompresses a zlib compressed packet inside a tvbuff at offset with diff --git a/epan/uat-int.h b/epan/uat-int.h index fb1ceab431..acb342f918 100644 --- a/epan/uat-int.h +++ b/epan/uat-int.h @@ -32,6 +32,7 @@ #define _UAT_INT_H_ #include "uat.h" +#include "ws_symbol_export.h" typedef struct _uat_fld_rep_t uat_fld_rep_t; typedef struct _uat_rep_t uat_rep_t; @@ -75,16 +76,21 @@ void uat_init(void); void uat_reset(void); +WS_DLL_PUBLIC void* uat_add_record(uat_t*, const void* orig_rec_ptr); +WS_DLL_PUBLIC void uat_swap(uat_t*, guint idx_a, guint idx_b); +WS_DLL_PUBLIC void uat_remove_record_idx(uat_t*, guint rec_idx); void uat_destroy(uat_t*); +WS_DLL_PUBLIC void uat_clear(uat_t*); +WS_DLL_PUBLIC gboolean uat_save(uat_t* , char** ); void uat_load_all(void); diff --git a/epan/uat.h b/epan/uat.h index 29f3782f00..9e4e2b6bb7 100644 --- a/epan/uat.h +++ b/epan/uat.h @@ -30,6 +30,8 @@ #ifndef _UAT_H_ #define _UAT_H_ +#include "ws_symbol_export.h" + /* * uat mantains a dynamically allocated table accessible to the user * via a file and/or gui tables. @@ -247,6 +249,7 @@ typedef struct _uat_field_t { * * @return A freshly-allocated and populated uat_t struct. */ +WS_DLL_PUBLIC uat_t* uat_new(const char* name, size_t size, const char* filename, @@ -268,6 +271,7 @@ uat_t* uat_new(const char* name, * * @return TRUE on success, FALSE on failure. */ +WS_DLL_PUBLIC gboolean uat_load(uat_t* uat_in, const char** err); /** Create or update a single uat entry using a string. @@ -298,23 +302,31 @@ uat_t *uat_find(gchar *name); */ void* uat_dup(uat_t*, guint* len_p); /* to be freed */ void* uat_se_dup(uat_t*, guint* len_p); +WS_DLL_PUBLIC uat_t* uat_get_table_by_name(const char* name); /* * Some common uat_fld_chk_cbs */ +WS_DLL_PUBLIC gboolean uat_fld_chk_str(void*, const char*, unsigned, const void*, const void*, const char** err); gboolean uat_fld_chk_oid(void*, const char*, unsigned, const void*, const void*, const char** err); +WS_DLL_PUBLIC gboolean uat_fld_chk_proto(void*, const char*, unsigned, const void*, const void*, const char** err); +WS_DLL_PUBLIC gboolean uat_fld_chk_num_dec(void*, const char*, unsigned, const void*, const void*, const char** err); +WS_DLL_PUBLIC gboolean uat_fld_chk_num_hex(void*, const char*, unsigned, const void*, const void*, const char** err); +WS_DLL_PUBLIC gboolean uat_fld_chk_enum(void*, const char*, unsigned, const void*, const void*, const char**); +WS_DLL_PUBLIC gboolean uat_fld_chk_range(void*, const char*, unsigned, const void*, const void*, const char**); #define CHK_STR_IS_DECL(what) \ gboolean uat_fld_chk_str_ ## what (void*, const char*, unsigned, const void*, const void*, const char**) typedef void (*uat_cb_t)(void* uat,void* user_data); +WS_DLL_PUBLIC void uat_foreach_table(uat_cb_t cb,void* user_data); void uat_unload_all(void); @@ -324,10 +336,15 @@ char* uat_unesc(const char* si, guint in_len, guint* len_p); char* uat_esc(const char* buf, guint len); /* Some strings entirely made of ... already declared */ +WS_DLL_PUBLIC CHK_STR_IS_DECL(isprint); +WS_DLL_PUBLIC CHK_STR_IS_DECL(isalpha); +WS_DLL_PUBLIC CHK_STR_IS_DECL(isalnum); +WS_DLL_PUBLIC CHK_STR_IS_DECL(isdigit); +WS_DLL_PUBLIC CHK_STR_IS_DECL(isxdigit); #define CHK_STR_IS_DEF(what) \ diff --git a/epan/value_string.h b/epan/value_string.h index 82d398f3df..bfdb33bb05 100644 --- a/epan/value_string.h +++ b/epan/value_string.h @@ -26,6 +26,7 @@ #define __VALUE_STRING_H__ #include +#include "ws_symbol_export.h" /* Struct for the val_to_str, match_strval_idx, and match_strval functions */ @@ -55,21 +56,21 @@ typedef struct _range_string { Returns the associated string ptr, and sets "*idx" to the index in that table, on a match, and returns NULL, and sets "*idx" to -1, on failure. */ -extern const gchar* match_strval_idx(const guint32 val, const value_string *vs, gint *idx); +WS_DLL_PUBLIC const gchar* match_strval_idx(const guint32 val, const value_string *vs, gint *idx); /* Like match_strval_idx(), but doesn't return the index. */ -extern const gchar* match_strval(const guint32 val, const value_string *vs); +WS_DLL_PUBLIC const gchar* match_strval(const guint32 val, const value_string *vs); /* Tries to match val against each element in the value_string array vs. Returns the associated string ptr on a match. Formats val with fmt, and returns the resulting string, on failure. */ -extern const gchar* val_to_str(const guint32 val, const value_string *vs, const char *fmt); +WS_DLL_PUBLIC const gchar* val_to_str(const guint32 val, const value_string *vs, const char *fmt); /* Tries to match val against each element in the value_string array vs. Returns the associated string ptr on a match. Returns 'unknown_str', on failure. */ -extern const gchar* val_to_str_const(const guint32 val, const value_string *vs, const char *unknown_str); +WS_DLL_PUBLIC const gchar* val_to_str_const(const guint32 val, const value_string *vs, const char *unknown_str); /* Tries to match val against each element in the string_string array vs. Returns the associated string ptr, and sets "*idx" to the index in @@ -83,7 +84,7 @@ extern const gchar* match_strstr(const gchar *val, const string_string *vs); /* Tries to match val against each element in the string_string array vs. Returns the associated string ptr on a match. Formats val with fmt, and returns the resulting string, on failure. */ -extern const gchar* str_to_str(const gchar *val, const string_string *vs, const char *fmt); +WS_DLL_PUBLIC const gchar* str_to_str(const gchar *val, const string_string *vs, const char *fmt); /* --------------------------------------------------------------------*/ /* value_string_ext functions @@ -136,7 +137,7 @@ gboolean value_string_ext_validate(const value_string_ext *vse); const gchar *value_string_ext_match_type_str(const value_string_ext *vse); /* --- --- */ -extern const value_string *_match_strval_ext_init(const guint32 val, const value_string_ext *vse); +WS_DLL_PUBLIC const value_string *_match_strval_ext_init(const guint32 val, const value_string_ext *vse); #define VALUE_STRING_EXT_INIT(x) { _match_strval_ext_init, 0, array_length(x)-1, x, #x } /* Create a value_string_ext given a ptr to a value_string array and the total number of entries. */ @@ -148,35 +149,37 @@ extern value_string_ext *value_string_ext_new(value_string *vs, guint vs_tot_num * or linear) determined at rutime during the initial access); (see _match_strval_ext_init) * Returns the associated string ptr on a match or NULL on failure. */ -extern const gchar* match_strval_ext(const guint32 val, const value_string_ext *vse); +WS_DLL_PUBLIC const gchar* match_strval_ext(const guint32 val, const value_string_ext *vse); /* Tries to match val against each element in the value_string array vs. * Returns the associated string ptr, and sets "*idx" to the index in * that table, on a match, and returns NULL, and sets "*idx" to -1, * on failure. */ -extern const gchar* match_strval_idx_ext(const guint32 val, value_string_ext *vse, gint *idx); +const gchar* match_strval_idx_ext(const guint32 val, value_string_ext *vse, gint *idx); -/* Similar to match_strval_ext except that on failure +/* + Similar to match_strval_ext except that on failure * Formats val with fmt, and returns the resulting string */ -extern const gchar* val_to_str_ext(const guint32 val, const value_string_ext *vs, const char *fmt); +WS_DLL_PUBLIC const gchar* val_to_str_ext(const guint32 val, const value_string_ext *vs, const char *fmt); -/* Similar to match_strval_ext except that on failure +/* + Similar to match_strval_ext except that on failure * Returns 'unknown_str' */ -extern const gchar* val_to_str_ext_const(const guint32 val, const value_string_ext *vs, const char *unknown_str); +WS_DLL_PUBLIC const gchar* val_to_str_ext_const(const guint32 val, const value_string_ext *vs, const char *unknown_str); /* ---- ---- */ /* Generate a string describing an enumerated bitfield (an N-bit field with various specific values having particular names). */ -extern const char *decode_enumerated_bitfield(const guint32 val, const guint32 mask, +WS_DLL_PUBLIC const char *decode_enumerated_bitfield(const guint32 val, const guint32 mask, const int width, const value_string *tab, const char *fmt); /* Generate a string describing an enumerated bitfield (an N-bit field with various specific values having particular names). */ -extern const char *decode_enumerated_bitfield_shifted(const guint32 val, const guint32 mask, +WS_DLL_PUBLIC const char *decode_enumerated_bitfield_shifted(const guint32 val, const guint32 mask, const int width, const value_string *tab, const char *fmt); @@ -185,15 +188,15 @@ extern const char *decode_enumerated_bitfield_shifted(const guint32 val, const g /* Tries to match val against each range in the range_string array rs. Returns the associated string ptr on a match. Formats val with fmt, and returns the resulting string, on failure. */ -extern const gchar* rval_to_str(const guint32 val, const range_string *rs, const char *fmt); +WS_DLL_PUBLIC const gchar* rval_to_str(const guint32 val, const range_string *rs, const char *fmt); /* Tries to match val against each range in the range_string array rs. Returns the associated string ptr, and sets "*idx" to the index in that table, on a match, and returns NULL, and sets "*idx" to -1, on failure. */ -extern const gchar *match_strrval_idx(const guint32 val, const range_string *rs, gint *idx); +WS_DLL_PUBLIC const gchar *match_strrval_idx(const guint32 val, const range_string *rs, gint *idx); /* Like match_strrval_idx(), but doesn't return the index. */ -extern const gchar *match_strrval(const guint32 val, const range_string *rs); +WS_DLL_PUBLIC const gchar *match_strrval(const guint32 val, const range_string *rs); #endif /* __VALUE_STRING_H__ */ diff --git a/epan/wmem/Makefile.nmake b/epan/wmem/Makefile.nmake index 0c512ebfe7..c265084b82 100644 --- a/epan/wmem/Makefile.nmake +++ b/epan/wmem/Makefile.nmake @@ -9,7 +9,7 @@ include Makefile.common ############### no need to modify below this line ######### CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ - /I../.. $(GLIB_CFLAGS) + /I../.. $(GLIB_CFLAGS) -DWS_BUILD_DLL .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/epan/wslua/Makefile.nmake b/epan/wslua/Makefile.nmake index c5c13be985..1164061822 100644 --- a/epan/wslua/Makefile.nmake +++ b/epan/wslua/Makefile.nmake @@ -8,7 +8,7 @@ include ..\..\config.nmake CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I. /I.. /I../.. $(GLIB_CFLAGS) \ - $(LUA_CFLAGS) \ + $(LUA_CFLAGS) -DWS_BUILD_DLL\ /I$(PCAP_DIR)\include .c.obj:: diff --git a/epan/wspython/Makefile.nmake b/epan/wspython/Makefile.nmake index 0f837a759c..6772f0fa51 100644 --- a/epan/wspython/Makefile.nmake +++ b/epan/wspython/Makefile.nmake @@ -9,7 +9,7 @@ include Makefile.common CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ /I. /I.. /I../.. $(GLIB_CFLAGS) \ - $(PYTHON_CFLAGS) + $(PYTHON_CFLAGS) -DWS_BUILD_DLL .c.obj:: $(CC) $(CFLAGS) -Fd.\ -c $< diff --git a/epan/xdlc.h b/epan/xdlc.h index 709d51c6a5..99cf7fd3e7 100644 --- a/epan/xdlc.h +++ b/epan/xdlc.h @@ -26,6 +26,8 @@ #ifndef __XDLC_H__ #define __XDLC_H__ +#include "ws_symbol_export.h" + /** @file * Define *DLC frame types, and routine to dissect the control field of * a *DLC frame. @@ -137,12 +139,12 @@ extern int get_xdlc_control(const guchar *pd, int offset, gboolean is_extended); /** * Check whether the control field of the packet looks valid. */ -extern gboolean check_xdlc_control(tvbuff_t *tvb, int offset, +WS_DLL_PUBLIC gboolean check_xdlc_control(tvbuff_t *tvb, int offset, const value_string *u_modifier_short_vals_cmd, const value_string *u_modifier_short_vals_resp, gboolean is_response, gboolean is_extended _U_); -extern int dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo, +WS_DLL_PUBLIC int dissect_xdlc_control(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *xdlc_tree, int hf_xdlc_control, gint ett_xdlc_control, const xdlc_cf_items *cf_items_nonext, const xdlc_cf_items *cf_items_ext, const value_string *u_modifier_short_vals_cmd, diff --git a/file.h b/file.h index 382b2a18f4..403449aeea 100644 --- a/file.h +++ b/file.h @@ -660,6 +660,7 @@ void cf_update_packet_comment(capture_file *cf, frame_data *fdata, gchar *commen gboolean cf_has_comments(capture_file *cf); #if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) +WS_DLL_PUBLIC void read_keytab_file(const char *); #endif diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 32096ac397..9058bac931 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -22,6 +22,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -include Custom.make + SUBDIRS = $(_CUSTOM_SUBDIRS_) \ asn1 \ docsis \ diff --git a/plugins/asn1/Makefile.nmake b/plugins/asn1/Makefile.nmake index 3ee98803f4..b3a64f884c 100644 --- a/plugins/asn1/Makefile.nmake +++ b/plugins/asn1/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/docsis/Makefile.nmake b/plugins/docsis/Makefile.nmake index 6b6670acc4..96ce4145a9 100644 --- a/plugins/docsis/Makefile.nmake +++ b/plugins/docsis/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/easy_codec/Makefile.nmake b/plugins/easy_codec/Makefile.nmake index bb938259df..ccbbcb4955 100644 --- a/plugins/easy_codec/Makefile.nmake +++ b/plugins/easy_codec/Makefile.nmake @@ -24,7 +24,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/easy_codec/easy_codec_plugin.c b/plugins/easy_codec/easy_codec_plugin.c index 75100e238a..e2a883b87d 100644 --- a/plugins/easy_codec/easy_codec_plugin.c +++ b/plugins/easy_codec/easy_codec_plugin.c @@ -33,9 +33,9 @@ #include "codec-g729a.h" #include "codec-g722.h" -G_MODULE_EXPORT const gchar version[] = "0.0.1"; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0.1"; -G_MODULE_EXPORT void register_codec_module(void) +WS_DLL_PUBLIC_NOEXTERN void register_codec_module(void) { register_codec("g723", codec_g7231_init, codec_g7231_release, codec_g7231_decode); register_codec("g729", codec_g729a_init, codec_g729a_release, codec_g729a_decode); diff --git a/plugins/ethercat/Makefile.nmake b/plugins/ethercat/Makefile.nmake index 4bea542dbe..a84e4737c9 100644 --- a/plugins/ethercat/Makefile.nmake +++ b/plugins/ethercat/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/gryphon/Makefile.nmake b/plugins/gryphon/Makefile.nmake index 7befcfb3fa..f64b114e33 100644 --- a/plugins/gryphon/Makefile.nmake +++ b/plugins/gryphon/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/irda/Makefile.nmake b/plugins/irda/Makefile.nmake index 33e87419de..114152a3cd 100644 --- a/plugins/irda/Makefile.nmake +++ b/plugins/irda/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/m2m/Makefile.nmake b/plugins/m2m/Makefile.nmake index e676388e24..a56803ef10 100644 --- a/plugins/m2m/Makefile.nmake +++ b/plugins/m2m/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake index bc57282bbe..3d291f782f 100644 --- a/plugins/mate/Makefile.nmake +++ b/plugins/mate/Makefile.nmake @@ -28,7 +28,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/opcua/Makefile.nmake b/plugins/opcua/Makefile.nmake index 679be76032..3750e30713 100644 --- a/plugins/opcua/Makefile.nmake +++ b/plugins/opcua/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/profinet/Makefile.nmake b/plugins/profinet/Makefile.nmake index f99053c952..4b74f48262 100644 --- a/plugins/profinet/Makefile.nmake +++ b/plugins/profinet/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/stats_tree/Makefile.nmake b/plugins/stats_tree/Makefile.nmake index 22141611e1..e2a048c2fb 100644 --- a/plugins/stats_tree/Makefile.nmake +++ b/plugins/stats_tree/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) diff --git a/plugins/stats_tree/stats_tree_plugin.c b/plugins/stats_tree/stats_tree_plugin.c index 3f0614b89f..ff17819356 100644 --- a/plugins/stats_tree/stats_tree_plugin.c +++ b/plugins/stats_tree/stats_tree_plugin.c @@ -28,13 +28,17 @@ #include +/* plugins are DLLs */ +#define WS_BUILD_DLL +#include "ws_symbol_export.h" + #include #include "pinfo_stats_tree.h" -G_MODULE_EXPORT const gchar version[] = "0.0.1"; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0.1"; -G_MODULE_EXPORT void plugin_register_tap_listener(void) +WS_DLL_PUBLIC_NOEXTERN void plugin_register_tap_listener(void) { register_pinfo_stat_trees(); } diff --git a/plugins/tpg/Makefile.nmake b/plugins/tpg/Makefile.nmake index 22c9334564..ae64ff59ad 100644 --- a/plugins/tpg/Makefile.nmake +++ b/plugins/tpg/Makefile.nmake @@ -20,7 +20,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS=packet-mate.obj\ mate_setup.obj\ diff --git a/plugins/tpg/packet-http.c b/plugins/tpg/packet-http.c index 13d01930b7..841d453761 100644 --- a/plugins/tpg/packet-http.c +++ b/plugins/tpg/packet-http.c @@ -122,9 +122,9 @@ static void proto_reg_handoff_http(void) { #ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = "0.0.0"; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0.0"; -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_register(void) { /* register the new protocol, protocol fields, and subtrees */ @@ -133,7 +133,7 @@ plugin_register(void) } } -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_reg_handoff(void){ proto_reg_handoff_http(); } diff --git a/plugins/unistim/Makefile.nmake b/plugins/unistim/Makefile.nmake index 52994732ff..5a84c74ad6 100644 --- a/plugins/unistim/Makefile.nmake +++ b/plugins/unistim/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/wimax/Makefile.nmake b/plugins/wimax/Makefile.nmake index 12b3ecf8b6..09a9d37e77 100644 --- a/plugins/wimax/Makefile.nmake +++ b/plugins/wimax/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake index e1b3b67b32..1f3008c3cf 100644 --- a/plugins/wimaxasncp/Makefile.nmake +++ b/plugins/wimaxasncp/Makefile.nmake @@ -26,7 +26,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib ..\..\wsutil\libwsutil.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/plugins/wimaxmacphy/Makefile.nmake b/plugins/wimaxmacphy/Makefile.nmake index 9b830a1cc2..02c2cc3ee3 100644 --- a/plugins/wimaxmacphy/Makefile.nmake +++ b/plugins/wimaxmacphy/Makefile.nmake @@ -22,7 +22,7 @@ LDFLAGS = $(PLUGIN_LDFLAGS) !IFDEF ENABLE_LIBWIRESHARK LINK_PLUGIN_WITH=..\..\epan\libwireshark.lib -CFLAGS=/D_NEED_VAR_IMPORT_ $(CFLAGS) +CFLAGS=$(CFLAGS) OBJECTS = $(C_FILES:.c=.obj) $(CPP_FILES:.cpp=.obj) plugin.obj diff --git a/register.h b/register.h index a19e14b842..969d0037a5 100644 --- a/register.h +++ b/register.h @@ -25,6 +25,8 @@ #ifndef __REGISTER_H__ #define __REGISTER_H__ +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -48,10 +50,10 @@ typedef enum { typedef void (*register_cb)(register_action_e action, const char *message, gpointer client_data); -extern void register_all_protocols(register_cb cb, gpointer client_data); -extern void register_all_protocol_handoffs(register_cb cb, gpointer client_data); +WS_DLL_PUBLIC void register_all_protocols(register_cb cb, gpointer client_data); +WS_DLL_PUBLIC void register_all_protocol_handoffs(register_cb cb, gpointer client_data); extern void register_all_tap_listeners(void); -extern gulong register_count(void); +WS_DLL_PUBLIC gulong register_count(void); #ifdef __cplusplus } diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 3a743ddcd2..1c1d67fb11 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -504,7 +504,7 @@ class Ctx: EF_TYPE = 0x0001 EF_VALS = 0x0002 EF_ENUM = 0x0004 -EF_WS_VAR = 0x0010 +EF_WS_DLL = 0x0010 # exported from shared library EF_EXTERN = 0x0020 EF_NO_PROT = 0x0040 EF_NO_TYPE = 0x0080 @@ -1625,8 +1625,8 @@ class EthCtx: fx.write(self.eth_type[t]['val'].eth_type_enum(t, self)) if (self.eth_type[t]['export'] & EF_VALS) and self.eth_type[t]['val'].eth_has_vals(): if not self.eth_type[t]['export'] & EF_TABLE: - if self.eth_type[t]['export'] & EF_WS_VAR: - fx.write("WS_VAR_IMPORT ") + if self.eth_type[t]['export'] & EF_WS_DLL: + fx.write("WS_DLL_PUBLIC ") else: fx.write("extern ") fx.write("const value_string %s[];\n" % (self.eth_vals_nm(t))) @@ -1635,7 +1635,10 @@ class EthCtx: for t in self.eth_export_ord: # functions if (self.eth_type[t]['export'] & EF_TYPE): if self.eth_type[t]['export'] & EF_EXTERN: - fx.write("extern ") + if self.eth_type[t]['export'] & EF_WS_DLL: + fx.write("WS_DLL_PUBLIC ") + else: + fx.write("extern ") fx.write(self.eth_type_fn_h(t)) for f in self.eth_hfpdu_ord: # PDUs if (self.eth_hf[f]['pdu'] and self.eth_hf[f]['pdu']['export']): @@ -2390,7 +2393,7 @@ class EthCnf: if (par[i] == 'ONLY_ENUM'): default_flags &= ~(EF_TYPE|EF_VALS); default_flags |= EF_ENUM elif (par[i] == 'WITH_ENUM'): default_flags |= EF_ENUM elif (par[i] == 'VALS_WITH_TABLE'): default_flags |= EF_TABLE - elif (par[i] == 'WS_VAR'): default_flags |= EF_WS_VAR + elif (par[i] == 'WS_DLL'): default_flags |= EF_WS_DLL elif (par[i] == 'EXTERN'): default_flags |= EF_EXTERN elif (par[i] == 'NO_PROT_PREFIX'): default_flags |= EF_NO_PROT else: warnings.warn_explicit("Unknown parameter value '%s'" % (par[i]), UserWarning, fn, lineno) @@ -2526,7 +2529,7 @@ class EthCnf: if (par[i] == 'ONLY_ENUM'): flags &= ~(EF_TYPE|EF_VALS); flags |= EF_ENUM elif (par[i] == 'WITH_ENUM'): flags |= EF_ENUM elif (par[i] == 'VALS_WITH_TABLE'): flags |= EF_TABLE - elif (par[i] == 'WS_VAR'): flags |= EF_WS_VAR + elif (par[i] == 'WS_DLL'): flags |= EF_WS_DLL elif (par[i] == 'EXTERN'): flags |= EF_EXTERN elif (par[i] == 'NO_PROT_PREFIX'): flags |= EF_NO_PROT else: warnings.warn_explicit("Unknown parameter value '%s'" % (par[i]), UserWarning, fn, lineno) diff --git a/tools/make-dissector-reg b/tools/make-dissector-reg index 62bee69432..a4552884cf 100755 --- a/tools/make-dissector-reg +++ b/tools/make-dissector-reg @@ -42,13 +42,16 @@ then #include #include "moduleinfo.h" +/* plugins are DLLs */ +#define WS_BUILD_DLL +#include "ws_symbol_export.h" #ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = VERSION; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION; /* Start the functions we need for the plugin stuff */ -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_register (void) { EOF @@ -116,7 +119,7 @@ echo '}' >>${outfile}-tmp if [ "$registertype" = plugin ] then cat <<"EOF" >>${outfile}-tmp -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_reg_handoff(void) { EOF diff --git a/tools/make-dissector-reg.py b/tools/make-dissector-reg.py index fe0e9a02d9..30351f203a 100755 --- a/tools/make-dissector-reg.py +++ b/tools/make-dissector-reg.py @@ -189,12 +189,16 @@ if registertype == "plugin" or registertype == "plugin_wtap": #include "moduleinfo.h" +/* plugins are DLLs */ +#define WS_BUILD_DLL +#include "ws_symbol_export.h" + #ifndef ENABLE_STATIC -G_MODULE_EXPORT const gchar version[] = VERSION; +WS_DLL_PUBLIC_NOEXTERN const gchar version[] = VERSION; /* Start the functions we need for the plugin stuff */ -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_register (void) { """ @@ -218,7 +222,7 @@ reg_code += "}\n" # Make the routine to register all protocol handoffs if registertype == "plugin" or registertype == "plugin_wtap": reg_code += """ -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_reg_handoff(void) { """ @@ -241,7 +245,7 @@ if registertype == "plugin": reg_code += "#endif\n" elif registertype == "plugin_wtap": reg_code += """ -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void register_wtap_module(void) { """ diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py index 87b85d424f..7172843b36 100755 --- a/tools/wireshark_gen.py +++ b/tools/wireshark_gen.py @@ -1960,7 +1960,7 @@ static guint32 boundary = GIOP_HEADER_SIZE; /* initial value */""" template_plugin_register = """ #if 0 -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_register(void) { if (proto_@dissector_name@ == -1) { @@ -1968,7 +1968,7 @@ plugin_register(void) } } -G_MODULE_EXPORT void +WS_DLL_PUBLIC_NOEXTERN void plugin_reg_handoff(void){ proto_register_handoff_giop_@dissector_name@(); } @@ -2357,6 +2357,10 @@ for (i_@aname@=0; i_@aname@ < @aval@; i_@aname@++) { #include #include +/* plugins are DLLs */ +#define WS_BUILD_DLL +#include "ws_symbol_export.h" + #ifdef _MSC_VER /* disable warning: "unreference local variable" */ #pragma warning(disable:4101) diff --git a/ui/Makefile.nmake b/ui/Makefile.nmake index 98736423e8..7613b81b84 100644 --- a/ui/Makefile.nmake +++ b/ui/Makefile.nmake @@ -11,7 +11,7 @@ include ..\Makefile.nmake.inc # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output GENERATED_CFLAGS=\ $(STANDARD_CFLAGS) \ - -D_NEED_VAR_IMPORT_ /Zm800 \ + /Zm800 \ /I.. /I../wiretap $(GLIB_CFLAGS) $(GNUTLS_CFLAGS) \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ diff --git a/ui/cli/Makefile.nmake b/ui/cli/Makefile.nmake index e32645b12f..09f9eb8d48 100644 --- a/ui/cli/Makefile.nmake +++ b/ui/cli/Makefile.nmake @@ -11,7 +11,7 @@ include ..\..\Makefile.nmake.inc # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output GENERATED_CFLAGS=\ $(STANDARD_CFLAGS) \ - -D_NEED_VAR_IMPORT_ /Zm800 \ + /Zm800 \ /I../.. /I../../wiretap $(GLIB_CFLAGS) $(GNUTLS_CFLAGS) \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 516b6bcd6c..db6fad8ba1 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -28,6 +28,7 @@ */ #include "config.h" +#include "ws_symbol_export.h" #ifdef HAVE_UNISTD_H #include @@ -53,7 +54,7 @@ #include #endif -WS_VAR_IMPORT FILE *data_out_file; +WS_DLL_PUBLIC FILE *data_out_file; typedef enum { diff --git a/ui/gtk/Makefile.nmake b/ui/gtk/Makefile.nmake index 39fce460e6..571a8fc467 100644 --- a/ui/gtk/Makefile.nmake +++ b/ui/gtk/Makefile.nmake @@ -11,7 +11,7 @@ include ..\..\Makefile.nmake.inc # We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output GENERATED_CFLAGS=\ $(STANDARD_CFLAGS) \ - -D_NEED_VAR_IMPORT_ /Zm800 \ + /Zm800 \ /I../.. /I../../wiretap $(GTK_CFLAGS) $(ZLIB_CFLAGS) $(GNUTLS_CFLAGS) \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ diff --git a/ui/gtk/follow_tcp.c b/ui/gtk/follow_tcp.c index 28cc3b476c..3262f7d3a0 100644 --- a/ui/gtk/follow_tcp.c +++ b/ui/gtk/follow_tcp.c @@ -65,13 +65,14 @@ #include "ui/gtk/font_utils.h" #include "ui/gtk/help_dlg.h" #include "ui/gtk/follow_stream.h" +#include "ws_symbol_export.h" #ifdef HAVE_LIBZ #include #endif /* With MSVC and a libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT FILE *data_out_file; +WS_DLL_PUBLIC FILE *data_out_file; static void follow_redraw(gpointer data, gpointer user_data _U_) diff --git a/ui/qt/capture_preferences_frame.cpp b/ui/qt/capture_preferences_frame.cpp index d7d0a40505..3763b7a0c0 100644 --- a/ui/qt/capture_preferences_frame.cpp +++ b/ui/qt/capture_preferences_frame.cpp @@ -32,6 +32,7 @@ #include "capture_ui_utils.h" +#include #include CapturePreferencesFrame::CapturePreferencesFrame(QWidget *parent) : diff --git a/ui/win32/Makefile.nmake b/ui/win32/Makefile.nmake index aa55a5206e..ec60facd3d 100644 --- a/ui/win32/Makefile.nmake +++ b/ui/win32/Makefile.nmake @@ -9,7 +9,7 @@ include ..\..\Makefile.nmake.inc ############### no need to modify below this line ######### CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ - -D_NEED_VAR_IMPORT_ /Zm800 \ + /Zm800 \ /I../.. /I../../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \ /I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \ /I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \ diff --git a/wiretap/5views.h b/wiretap/5views.h index 98382013cc..74f7c8cb4c 100644 --- a/wiretap/5views.h +++ b/wiretap/5views.h @@ -25,11 +25,8 @@ #include #include -WS_DLL_LOCAL int _5views_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean _5views_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int _5views_dump_can_write_encap(int encap); #endif diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt index bc9c57197d..7fda5b568b 100644 --- a/wiretap/CMakeLists.txt +++ b/wiretap/CMakeLists.txt @@ -110,9 +110,6 @@ add_library(wiretap ${LINK_MODE_LIB} set(FULL_SO_VERSION "0.0.0") set_target_properties(wiretap PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL") -if(DEFINED COMPILE_HIDE_SYMBOLS) - set_target_properties(wiretap PROPERTIES COMPILE_FLAGS ${COMPILE_HIDE_SYMBOLS}) -endif() set_target_properties(wiretap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}") set_target_properties(wiretap PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0) diff --git a/wiretap/Makefile.am b/wiretap/Makefile.am index e1a8178b4e..9289b97c65 100644 --- a/wiretap/Makefile.am +++ b/wiretap/Makefile.am @@ -32,7 +32,7 @@ lib_LTLIBRARIES = libwiretap.la # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html libwiretap_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@ -AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL @COMPILE_HIDE_SYMBOLS@ +AM_NON_GENERATED_CFLAGS =-DWS_BUILD_DLL if HAVE_WARNINGS_AS_ERRORS AM_NON_GENERATED_CFLAGS += -Werror diff --git a/wiretap/aethra.h b/wiretap/aethra.h index 96590cc83c..1fdd19d54f 100644 --- a/wiretap/aethra.h +++ b/wiretap/aethra.h @@ -26,7 +26,6 @@ #include #include -WS_DLL_LOCAL int aethra_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/ascend-int.h b/wiretap/ascend-int.h index 1c33877e87..faa7f03259 100644 --- a/wiretap/ascend-int.h +++ b/wiretap/ascend-int.h @@ -51,19 +51,15 @@ extern const gchar *ascend_parse_error; extern struct ascend_phdr *pseudo_header; /* Here we provide interfaces to make our scanner act and look like lex */ -WS_DLL_LOCAL int ascendlex(void); -WS_DLL_LOCAL void init_parse_ascend(void); -WS_DLL_LOCAL void ascend_init_lexer(FILE_T fh); typedef enum { PARSED_RECORD, PARSED_NONRECORD, PARSE_FAILED } parse_t; -WS_DLL_LOCAL parse_t parse_ascend(FILE_T fh, guint8 *pd, struct ascend_phdr *phdr, ascend_pkthdr *hdr, gint64 *start_of_data); diff --git a/wiretap/ascendtext.h b/wiretap/ascendtext.h index e54a86ffb5..1e75a230be 100644 --- a/wiretap/ascendtext.h +++ b/wiretap/ascendtext.h @@ -29,7 +29,6 @@ #define ASCEND_MAX_DATA_COLS 16 #define ASCEND_MAX_PKT_LEN (ASCEND_MAX_DATA_ROWS * ASCEND_MAX_DATA_COLS) -WS_DLL_LOCAL int ascend_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/atm.h b/wiretap/atm.h index 9afc109b5e..fe7b5130a1 100644 --- a/wiretap/atm.h +++ b/wiretap/atm.h @@ -31,12 +31,10 @@ * that information). */ -WS_DLL_LOCAL extern void atm_guess_traffic_type(const guint8 *pd, guint32 len, union wtap_pseudo_header *pseudo_header); -WS_DLL_LOCAL extern void atm_guess_lane_type(const guint8 *pd, guint32 len, union wtap_pseudo_header *pseudo_header); diff --git a/wiretap/ber.h b/wiretap/ber.h index c920317da1..a4a16eb14e 100644 --- a/wiretap/ber.h +++ b/wiretap/ber.h @@ -25,7 +25,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int ber_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/btsnoop.h b/wiretap/btsnoop.h index a3d032d436..38e84b4204 100644 --- a/wiretap/btsnoop.h +++ b/wiretap/btsnoop.h @@ -25,13 +25,9 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int btsnoop_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean btsnoop_dump_open_h1(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL gboolean btsnoop_dump_open_h4(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int btsnoop_dump_can_write_encap(int encap); #endif diff --git a/wiretap/catapult_dct2000.h b/wiretap/catapult_dct2000.h index 9de081f0ca..7e03066d90 100644 --- a/wiretap/catapult_dct2000.h +++ b/wiretap/catapult_dct2000.h @@ -26,11 +26,8 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int catapult_dct2000_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean catapult_dct2000_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int catapult_dct2000_dump_can_write_encap(int encap); #define DCT2000_ENCAP_UNHANDLED 0 diff --git a/wiretap/commview.h b/wiretap/commview.h index 3385f32569..64e02cdd8b 100644 --- a/wiretap/commview.h +++ b/wiretap/commview.h @@ -27,11 +27,8 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int commview_open(wtap *wth, int *err, gchar **err_info _U_); -WS_DLL_LOCAL int commview_dump_can_write_encap(int encap); -WS_DLL_LOCAL gboolean commview_dump_open(wtap_dumper *wdh, int *err); #endif /* __COMMVIEW_H__ */ diff --git a/wiretap/cosine.h b/wiretap/cosine.h index 54b886bd6f..f6ff1d13b7 100644 --- a/wiretap/cosine.h +++ b/wiretap/cosine.h @@ -30,7 +30,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int cosine_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/csids.h b/wiretap/csids.h index cbb0b17a98..cff2b68a07 100644 --- a/wiretap/csids.h +++ b/wiretap/csids.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int csids_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/daintree-sna.h b/wiretap/daintree-sna.h index f10d53def7..0b10d30a74 100644 --- a/wiretap/daintree-sna.h +++ b/wiretap/daintree-sna.h @@ -29,7 +29,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int daintree_sna_open(wtap *wth, int *err, gchar **err_info _U_); #endif /* __DAINTREE_SNA_H__ */ diff --git a/wiretap/dbs-etherwatch.h b/wiretap/dbs-etherwatch.h index 3fc60fa0f9..4e14c0a0ab 100644 --- a/wiretap/dbs-etherwatch.h +++ b/wiretap/dbs-etherwatch.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int dbs_etherwatch_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/dct3trace.h b/wiretap/dct3trace.h index 2c23c96cac..283d31772d 100644 --- a/wiretap/dct3trace.h +++ b/wiretap/dct3trace.h @@ -26,7 +26,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int dct3trace_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/erf.h b/wiretap/erf.h index a666796e2b..4953e5b221 100644 --- a/wiretap/erf.h +++ b/wiretap/erf.h @@ -105,14 +105,10 @@ union erf_subhdr { #define RECORDS_FOR_ERF_CHECK 20 #define FCS_BITS 32 -WS_DLL_LOCAL int erf_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL int erf_dump_can_write_encap(int encap); -WS_DLL_LOCAL int erf_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int erf_populate_interfaces(wtap *wth); #endif /* __W_ERF_H__ */ diff --git a/wiretap/eyesdn.h b/wiretap/eyesdn.h index 46cee9e53c..185de4bad7 100644 --- a/wiretap/eyesdn.h +++ b/wiretap/eyesdn.h @@ -28,7 +28,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int eyesdn_open(wtap *wth, int *err, gchar **err_info); enum EyeSDN_TYPES { @@ -43,9 +42,7 @@ enum EyeSDN_TYPES { EYESDN_ENCAP_V5_EF }; -WS_DLL_LOCAL gboolean eyesdn_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int eyesdn_dump_can_write_encap(int encap); #endif diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h index ca02fbbab5..3de26aaefa 100644 --- a/wiretap/file_wrappers.h +++ b/wiretap/file_wrappers.h @@ -28,57 +28,33 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL extern FILE_T file_open(const char *path); -WS_DLL_LOCAL extern FILE_T file_fdopen(int fildes); -WS_DLL_LOCAL extern void file_set_random_access(FILE_T stream, gboolean random_flag, GPtrArray *seek); -WS_DLL_PUBLIC -extern gint64 file_seek(FILE_T stream, gint64 offset, int whence, int *err); -WS_DLL_LOCAL +WS_DLL_PUBLIC gint64 file_seek(FILE_T stream, gint64 offset, int whence, int *err); extern gint64 file_skip(FILE_T file, gint64 delta, int *err); -WS_DLL_PUBLIC -extern gint64 file_tell(FILE_T stream); -WS_DLL_LOCAL +WS_DLL_PUBLIC gint64 file_tell(FILE_T stream); extern gint64 file_tell_raw(FILE_T stream); -WS_DLL_LOCAL extern int file_fstat(FILE_T stream, ws_statb64 *statb, int *err); -WS_DLL_LOCAL extern gboolean file_iscompressed(FILE_T stream); -WS_DLL_PUBLIC -extern int file_read(void *buf, unsigned int count, FILE_T file); -WS_DLL_PUBLIC -extern int file_getc(FILE_T stream); -WS_DLL_PUBLIC -extern char *file_gets(char *buf, int len, FILE_T stream); -WS_DLL_PUBLIC -extern int file_eof(FILE_T stream); -WS_DLL_PUBLIC -extern int file_error(FILE_T fh, gchar **err_info); -WS_DLL_LOCAL +WS_DLL_PUBLIC int file_read(void *buf, unsigned int count, FILE_T file); +WS_DLL_PUBLIC int file_getc(FILE_T stream); +WS_DLL_PUBLIC char *file_gets(char *buf, int len, FILE_T stream); +WS_DLL_PUBLIC int file_eof(FILE_T stream); +WS_DLL_PUBLIC int file_error(FILE_T fh, gchar **err_info); extern void file_clearerr(FILE_T stream); -WS_DLL_LOCAL extern void file_fdclose(FILE_T file); -WS_DLL_LOCAL extern int file_fdreopen(FILE_T file, const char *path); -WS_DLL_LOCAL extern void file_close(FILE_T file); #ifdef HAVE_LIBZ typedef struct wtap_writer *GZWFILE_T; -WS_DLL_LOCAL extern GZWFILE_T gzwfile_open(const char *path); -WS_DLL_LOCAL extern GZWFILE_T gzwfile_fdopen(int fd); -WS_DLL_LOCAL extern guint gzwfile_write(GZWFILE_T state, const void *buf, guint len); -WS_DLL_LOCAL extern int gzwfile_flush(GZWFILE_T state); -WS_DLL_LOCAL extern int gzwfile_close(GZWFILE_T state); -WS_DLL_LOCAL extern int gzwfile_geterr(GZWFILE_T state); #endif /* HAVE_LIBZ */ diff --git a/wiretap/hcidump.h b/wiretap/hcidump.h index 2d66995999..b0e15df477 100644 --- a/wiretap/hcidump.h +++ b/wiretap/hcidump.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int hcidump_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/i4btrace.h b/wiretap/i4btrace.h index 1a8ccf4ae5..8c1d61b05a 100644 --- a/wiretap/i4btrace.h +++ b/wiretap/i4btrace.h @@ -28,7 +28,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int i4btrace_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/ipfix.h b/wiretap/ipfix.h index 04969599a1..5cdeb877e2 100644 --- a/wiretap/ipfix.h +++ b/wiretap/ipfix.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int ipfix_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/iptrace.h b/wiretap/iptrace.h index aa729e3d2b..edd376ad96 100644 --- a/wiretap/iptrace.h +++ b/wiretap/iptrace.h @@ -27,7 +27,6 @@ #include #include -WS_DLL_LOCAL int iptrace_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/iseries.h b/wiretap/iseries.h index dc4388bc72..35b4880a50 100644 --- a/wiretap/iseries.h +++ b/wiretap/iseries.h @@ -26,7 +26,6 @@ #include #include -WS_DLL_LOCAL int iseries_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/k12.h b/wiretap/k12.h index 0c214b9532..01f2c552b2 100644 --- a/wiretap/k12.h +++ b/wiretap/k12.h @@ -26,17 +26,11 @@ #include #include -WS_DLL_LOCAL int k12_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL int k12_dump_can_write_encap(int encap); -WS_DLL_LOCAL gboolean k12_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int k12text_open(wtap *wth, int *err, gchar **err_info _U_); -WS_DLL_LOCAL int k12text_dump_can_write_encap(int encap); -WS_DLL_LOCAL gboolean k12text_dump_open(wtap_dumper *wdh, int *err); #endif diff --git a/wiretap/lanalyzer.h b/wiretap/lanalyzer.h index 532e0b4d23..f225170c9f 100644 --- a/wiretap/lanalyzer.h +++ b/wiretap/lanalyzer.h @@ -26,11 +26,8 @@ #include #include -WS_DLL_LOCAL int lanalyzer_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean lanalyzer_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int lanalyzer_dump_can_write_encap(int encap); #endif diff --git a/wiretap/libpcap.h b/wiretap/libpcap.h index dee0122376..c029829acc 100644 --- a/wiretap/libpcap.h +++ b/wiretap/libpcap.h @@ -102,11 +102,8 @@ struct pcaprec_nokia_hdr { guint8 stuff[4]; /* mysterious stuff */ }; -WS_DLL_LOCAL int libpcap_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean libpcap_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int libpcap_dump_can_write_encap(int encap); #endif diff --git a/wiretap/mime_file.h b/wiretap/mime_file.h index 2f03d80e24..35b9e3a65f 100644 --- a/wiretap/mime_file.h +++ b/wiretap/mime_file.h @@ -26,7 +26,6 @@ #include #include -WS_DLL_LOCAL int mime_file_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/mp2t.h b/wiretap/mp2t.h index f7f765d069..0bc8dd63a6 100644 --- a/wiretap/mp2t.h +++ b/wiretap/mp2t.h @@ -28,7 +28,6 @@ #include #include -WS_DLL_LOCAL int mp2t_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/mpeg.h b/wiretap/mpeg.h index ac86c53461..5cce7cee0a 100644 --- a/wiretap/mpeg.h +++ b/wiretap/mpeg.h @@ -28,7 +28,6 @@ #include #include -WS_DLL_LOCAL int mpeg_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/netmon.h b/wiretap/netmon.h index d70085a30e..cca5be3557 100644 --- a/wiretap/netmon.h +++ b/wiretap/netmon.h @@ -26,13 +26,9 @@ #include #include -WS_DLL_LOCAL int netmon_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean netmon_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int netmon_dump_can_write_encap_1_x(int encap); -WS_DLL_LOCAL int netmon_dump_can_write_encap_2_x(int encap); #endif diff --git a/wiretap/netscaler.h b/wiretap/netscaler.h index 3beee57c96..04eddb3397 100644 --- a/wiretap/netscaler.h +++ b/wiretap/netscaler.h @@ -95,14 +95,10 @@ #define NSPR_HEADER_VERSION203 0x23 #define NSPR_HEADER_VERSION204 0x24 #define NSPR_HEADER_VERSION205 0x25 -WS_DLL_LOCAL int nstrace_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL int nstrace_10_dump_can_write_encap(int encap); -WS_DLL_LOCAL int nstrace_20_dump_can_write_encap(int encap); -WS_DLL_LOCAL gboolean nstrace_dump_open(wtap_dumper *wdh, int *err); diff --git a/wiretap/netscreen.h b/wiretap/netscreen.h index f048520c29..9d6e9fe0e4 100644 --- a/wiretap/netscreen.h +++ b/wiretap/netscreen.h @@ -51,7 +51,6 @@ #define NETSCREEN_MAX_PACKET_LEN 65536 -WS_DLL_LOCAL int netscreen_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/nettl.h b/wiretap/nettl.h index d03765b97a..3e5227a91d 100644 --- a/wiretap/nettl.h +++ b/wiretap/nettl.h @@ -128,11 +128,8 @@ #define NETTL_HDR_PDU_MASK 0x30000000 -WS_DLL_LOCAL int nettl_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean nettl_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int nettl_dump_can_write_encap(int encap); #endif diff --git a/wiretap/network_instruments.h b/wiretap/network_instruments.h index 4ca16400b3..a89e2a63ba 100644 --- a/wiretap/network_instruments.h +++ b/wiretap/network_instruments.h @@ -25,11 +25,8 @@ #include #include -WS_DLL_LOCAL int network_instruments_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL int network_instruments_dump_can_write_encap(int encap); -WS_DLL_LOCAL gboolean network_instruments_dump_open(wtap_dumper *wdh, int *err); /* diff --git a/wiretap/netxray.h b/wiretap/netxray.h index 36e275732c..9225537207 100644 --- a/wiretap/netxray.h +++ b/wiretap/netxray.h @@ -26,15 +26,10 @@ #include #include -WS_DLL_LOCAL int netxray_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL int netxray_dump_can_write_encap_1_1(int encap); -WS_DLL_LOCAL gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int netxray_dump_can_write_encap_2_0(int encap); -WS_DLL_LOCAL gboolean netxray_dump_open_2_0(wtap_dumper *wdh, int *err); #endif diff --git a/wiretap/ngsniffer.h b/wiretap/ngsniffer.h index 7176270faa..5c4cd5afe9 100644 --- a/wiretap/ngsniffer.h +++ b/wiretap/ngsniffer.h @@ -26,11 +26,8 @@ #include #include -WS_DLL_LOCAL int ngsniffer_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean ngsniffer_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int ngsniffer_dump_can_write_encap(int encap); #endif diff --git a/wiretap/packetlogger.h b/wiretap/packetlogger.h index a82256dd4a..a150c9ecf6 100644 --- a/wiretap/packetlogger.h +++ b/wiretap/packetlogger.h @@ -29,7 +29,6 @@ #include #include -WS_DLL_LOCAL int packetlogger_open(wtap *wth, int *err, gchar **err_info _U_); #endif /* __PACKETLOGGER_H__ */ diff --git a/wiretap/pcap-common.h b/wiretap/pcap-common.h index 1753b792ca..4f7fb25cf2 100644 --- a/wiretap/pcap-common.h +++ b/wiretap/pcap-common.h @@ -31,21 +31,17 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL extern int pcap_process_pseudo_header(FILE_T fh, int file_type, int wtap_encap, guint packet_size, gboolean check_packet_size, struct wtap_pkthdr *phdr, union wtap_pseudo_header *pseudo_header, int *err, gchar **err_info); -WS_DLL_LOCAL extern void pcap_read_post_process(int file_type, int wtap_encap, union wtap_pseudo_header *pseudo_header, guint8 *pd, guint packet_size, gboolean bytes_swapped, int fcs_len); -WS_DLL_LOCAL extern int pcap_get_phdr_size(int encap, const union wtap_pseudo_header *pseudo_header); -WS_DLL_LOCAL extern gboolean pcap_write_phdr(wtap_dumper *wdh, int wtap_encap, const union wtap_pseudo_header *pseudo_header, int *err); diff --git a/wiretap/pcap-encap.h b/wiretap/pcap-encap.h index c86cbfcb56..f75ba67325 100644 --- a/wiretap/pcap-encap.h +++ b/wiretap/pcap-encap.h @@ -34,12 +34,9 @@ extern "C" { #endif /* __cplusplus */ -WS_DLL_PUBLIC -extern int wtap_pcap_encap_to_wtap_encap(int encap); -WS_DLL_PUBLIC -extern int wtap_wtap_encap_to_pcap_encap(int encap); -WS_DLL_PUBLIC -extern gboolean wtap_encap_requires_phdr(int encap); +WS_DLL_PUBLIC int wtap_pcap_encap_to_wtap_encap(int encap); +WS_DLL_PUBLIC int wtap_wtap_encap_to_pcap_encap(int encap); +WS_DLL_PUBLIC gboolean wtap_encap_requires_phdr(int encap); #ifdef __cplusplus } diff --git a/wiretap/pcapng.h b/wiretap/pcapng.h index 41c46129ec..337c01f2e2 100644 --- a/wiretap/pcapng.h +++ b/wiretap/pcapng.h @@ -27,11 +27,8 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int pcapng_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean pcapng_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int pcapng_dump_can_write_encap(int encap); #endif diff --git a/wiretap/peekclassic.h b/wiretap/peekclassic.h index 14121d82c5..825066c2a3 100644 --- a/wiretap/peekclassic.h +++ b/wiretap/peekclassic.h @@ -28,7 +28,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int peekclassic_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/peektagged.h b/wiretap/peektagged.h index ad6626434a..60558e085b 100644 --- a/wiretap/peektagged.h +++ b/wiretap/peektagged.h @@ -25,7 +25,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int peektagged_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/pppdump.h b/wiretap/pppdump.h index d89084d0cc..eef257ac77 100644 --- a/wiretap/pppdump.h +++ b/wiretap/pppdump.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int pppdump_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/radcom.h b/wiretap/radcom.h index 8d9af6460b..808d4fbf66 100644 --- a/wiretap/radcom.h +++ b/wiretap/radcom.h @@ -28,7 +28,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int radcom_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/snoop.h b/wiretap/snoop.h index 8010899661..fb2e28fa10 100644 --- a/wiretap/snoop.h +++ b/wiretap/snoop.h @@ -27,11 +27,8 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int snoop_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean snoop_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int snoop_dump_can_write_encap(int encap); #endif diff --git a/wiretap/tnef.h b/wiretap/tnef.h index cbe5d8b18a..0bd60d245f 100644 --- a/wiretap/tnef.h +++ b/wiretap/tnef.h @@ -29,7 +29,6 @@ #define TNEF_SIGNATURE 0x223E9F78 -WS_DLL_LOCAL int tnef_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/toshiba.h b/wiretap/toshiba.h index 26d1432afd..df29366250 100644 --- a/wiretap/toshiba.h +++ b/wiretap/toshiba.h @@ -27,7 +27,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int toshiba_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/visual.h b/wiretap/visual.h index e15bd256ff..23638bea14 100644 --- a/wiretap/visual.h +++ b/wiretap/visual.h @@ -32,11 +32,8 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int visual_open(wtap *wth, int *err, gchar **err_info); -WS_DLL_LOCAL gboolean visual_dump_open(wtap_dumper *wdh, int *err); -WS_DLL_LOCAL int visual_dump_can_write_encap(int encap); #endif diff --git a/wiretap/vms.h b/wiretap/vms.h index b4122083de..0e7abbc3ce 100644 --- a/wiretap/vms.h +++ b/wiretap/vms.h @@ -28,7 +28,6 @@ #include #include "ws_symbol_export.h" -WS_DLL_LOCAL int vms_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/vwr.h b/wiretap/vwr.h index 7cacc54c8c..8092088f41 100644 --- a/wiretap/vwr.h +++ b/wiretap/vwr.h @@ -26,7 +26,6 @@ #include "ws_symbol_export.h" -WS_DLL_LOCAL int vwr_open(wtap *wth, int *err, gchar **err_info); #endif diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 1e62df935e..4e46f4a614 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -113,14 +113,12 @@ struct wtap_dumper { GArray *interface_data; /**< An array holding the interface data from pcapng IDB:s or equivalent(?) NULL if not present.*/ }; -WS_DLL_LOCAL gboolean wtap_dump_file_write(wtap_dumper *wdh, const void *buf, size_t bufsize, int *err); extern gint64 wtap_dump_file_seek(wtap_dumper *wdh, gint64 offset, int whence, int *err); extern gint64 wtap_dump_file_tell(wtap_dumper *wdh); -WS_DLL_LOCAL extern gint wtap_num_file_types; /* Macros to byte-swap 64-bit, 32-bit and 16-bit quantities. */ @@ -366,7 +364,6 @@ extern gint wtap_num_file_types; #endif /*** get GSList of all compressed file extensions ***/ -WS_DLL_LOCAL GSList *wtap_get_compressed_file_extensions(void); #endif /* __WTAP_INT_H__ */ diff --git a/wiretap/wtap.h b/wiretap/wtap.h index fc28b740dc..f82cac5ed9 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1156,7 +1156,6 @@ gboolean wtap_dump_can_write_encaps(int ft, const GArray *file_encaps); WS_DLL_PUBLIC gboolean wtap_dump_can_compress(int filetype); -WS_DLL_LOCAL gboolean wtap_dump_has_name_resolution(int filetype); WS_DLL_PUBLIC diff --git a/ws_symbol_export.h b/ws_symbol_export.h index fc257ce8e3..ac9b973053 100644 --- a/ws_symbol_export.h +++ b/ws_symbol_export.h @@ -40,14 +40,17 @@ #define WS_DLL_PUBLIC #endif /* __GNUC__ */ #endif /* WS_BUILD_DLL */ + #define WS_DLL_PUBLIC_NOEXTERN WS_DLL_PUBLIC #define WS_DLL_LOCAL #else #if __GNUC__ >= 4 -#define WS_DLL_PUBLIC __attribute__ ((visibility ("default"))) +#define WS_DLL_PUBLIC __attribute__ ((visibility ("default"))) extern +#define WS_DLL_PUBLIC_NOEXTERN __attribute__ ((visibility ("default"))) #define WS_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #else /* ! __GNUC__ >= 4 */ #define WS_DLL_PUBLIC - #define WS_DLL_LOCAL + #define WS_DLL_PUBLIC_NOEXTERN + #define WS_DLL_LOCAL extern #endif /* __GNUC__ >= 4 */ #endif diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index e90b487f56..df689bff48 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -64,9 +64,6 @@ add_library(wsutil ${LINK_MODE_LIB} set(FULL_SO_VERSION "0.0.0") set_target_properties(wsutil PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL") -if(DEFINED COMPILE_HIDE_SYMBOLS) - set_target_properties(wsutil PROPERTIES COMPILE_FLAGS ${COMPILE_HIDE_SYMBOLS}) -endif() set_target_properties(wsutil PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}") set_target_properties(wsutil PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0) diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am index 1cdfd076d8..7a3774faaa 100644 --- a/wsutil/Makefile.am +++ b/wsutil/Makefile.am @@ -54,7 +54,7 @@ include ../Makefile.am.inc include Makefile.common -AM_CFLAGS =-DWS_BUILD_DLL @COMPILE_HIDE_SYMBOLS@ +AM_CFLAGS =-DWS_BUILD_DLL if HAVE_WARNINGS_AS_ERRORS AM_CFLAGS += -Werror diff --git a/wsutil/crash_info.h b/wsutil/crash_info.h index d19ce6bcc5..9643fe8c34 100644 --- a/wsutil/crash_info.h +++ b/wsutil/crash_info.h @@ -31,8 +31,7 @@ extern "C" { #endif -WS_DLL_PUBLIC -extern void ws_add_crash_info(const char *fmt, ...) +WS_DLL_PUBLIC void ws_add_crash_info(const char *fmt, ...) G_GNUC_PRINTF(1,2); #ifdef __cplusplus diff --git a/wsutil/crc10.h b/wsutil/crc10.h index 111763ae83..41ea0feded 100644 --- a/wsutil/crc10.h +++ b/wsutil/crc10.h @@ -29,7 +29,6 @@ #include "ws_symbol_export.h" /* update the data block's CRC-10 remainder one byte at a time */ -WS_DLL_PUBLIC -extern guint16 update_crc10_by_bytes(guint16 crc10, const guint8 *data_blk_ptr, int data_blk_size); +WS_DLL_PUBLIC guint16 update_crc10_by_bytes(guint16 crc10, const guint8 *data_blk_ptr, int data_blk_size); #endif /* __CRC10_H__ */ diff --git a/wsutil/crc16.h b/wsutil/crc16.h index 09dde4b893..3529a1af6c 100644 --- a/wsutil/crc16.h +++ b/wsutil/crc16.h @@ -46,15 +46,13 @@ extern "C" { @param buf The buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC16 CCITT checksum. */ -WS_DLL_PUBLIC -extern guint16 crc16_ccitt(const guint8 *buf, guint len); +WS_DLL_PUBLIC guint16 crc16_ccitt(const guint8 *buf, guint len); /** Compute CRC16 X.25 CCITT checksum of a buffer of data. @param buf The buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC16 X.25 CCITT checksum. */ -WS_DLL_PUBLIC -extern guint16 crc16_x25_ccitt(const guint8 *buf, guint len); +WS_DLL_PUBLIC guint16 crc16_x25_ccitt(const guint8 *buf, guint len); /** Compute CRC16 CCITT checksum of a buffer of data. If computing the * checksum over multiple buffers and you want to feed the partial CRC16 @@ -63,8 +61,7 @@ extern guint16 crc16_x25_ccitt(const guint8 *buf, guint len); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC16 CCITT checksum (using the given seed). */ -WS_DLL_PUBLIC -extern guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed); +WS_DLL_PUBLIC guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed); /** Calculates a CRC16 checksum for the given buffer with the polynom * 0x5935 using a precompiled CRC table @@ -73,8 +70,7 @@ extern guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed); * @param seed The seed to use. * @return the CRC16 checksum for the buffer */ -WS_DLL_PUBLIC -extern guint16 crc16_0x5935(const guint8 *buf, guint32 len, guint16 seed); +WS_DLL_PUBLIC guint16 crc16_0x5935(const guint8 *buf, guint32 len, guint16 seed); #ifdef __cplusplus } diff --git a/wsutil/crc32.h b/wsutil/crc32.h index 72d3b07b59..2a96befb47 100644 --- a/wsutil/crc32.h +++ b/wsutil/crc32.h @@ -46,21 +46,18 @@ extern "C" { /** Lookup the crc value in the crc32_ccitt_table @param pos Position in the table. */ -WS_DLL_PUBLIC -extern guint32 crc32_ccitt_table_lookup (guchar pos); +WS_DLL_PUBLIC guint32 crc32_ccitt_table_lookup (guchar pos); /** Lookup the crc value in the crc32c_table @param pos Position in the table. */ -WS_DLL_PUBLIC -extern guint32 crc32c_table_lookup (guchar pos); +WS_DLL_PUBLIC guint32 crc32c_table_lookup (guchar pos); /** Compute CRC32C checksum of a buffer of data. @param buf The buffer containing the data. @param len The number of bytes to include in the computation. @param crc The preload value for the CRC32C computation. @return The CRC32C checksum. */ -WS_DLL_PUBLIC -extern guint32 crc32c_calculate(const void *buf, int len, guint32 crc); +WS_DLL_PUBLIC guint32 crc32c_calculate(const void *buf, int len, guint32 crc); /** Compute CRC32C checksum of a buffer of data without swapping seed crc or completed checksum @@ -68,15 +65,13 @@ extern guint32 crc32c_calculate(const void *buf, int len, guint32 crc); @param len The number of bytes to include in the computation. @param crc The preload value for the CRC32C computation. @return The CRC32C checksum. */ -WS_DLL_PUBLIC -extern guint32 crc32c_calculate_no_swap(const void *buf, int len, guint32 crc); +WS_DLL_PUBLIC guint32 crc32c_calculate_no_swap(const void *buf, int len, guint32 crc); /** Compute CRC32 CCITT checksum of a buffer of data. @param buf The buffer containing the data. @param len The number of bytes to include in the computation. @return The CRC32 CCITT checksum. */ -WS_DLL_PUBLIC -extern guint32 crc32_ccitt(const guint8 *buf, guint len); +WS_DLL_PUBLIC guint32 crc32_ccitt(const guint8 *buf, guint len); /** Compute CRC32 CCITT checksum of a buffer of data. If computing the * checksum over multiple buffers and you want to feed the partial CRC32 @@ -85,16 +80,14 @@ extern guint32 crc32_ccitt(const guint8 *buf, guint len); @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 CCITT checksum (using the given seed). */ -WS_DLL_PUBLIC -extern guint32 crc32_ccitt_seed(const guint8 *buf, guint len, guint32 seed); +WS_DLL_PUBLIC guint32 crc32_ccitt_seed(const guint8 *buf, guint len, guint32 seed); /** Compute MPEG-2 CRC32 checksum of a buffer of data. @param buf The buffer containing the data. @param len The number of bytes to include in the computation. @param seed The seed to use. @return The CRC32 MPEG-2 checksum (using the given seed). */ -WS_DLL_PUBLIC -extern guint32 crc32_mpeg2_seed(const guint8 *buf, guint len, guint32 seed); +WS_DLL_PUBLIC guint32 crc32_mpeg2_seed(const guint8 *buf, guint len, guint32 seed); WS_DLL_PUBLIC int AirPDcapWepDecrypt( const guchar *seed, diff --git a/wsutil/crc6.h b/wsutil/crc6.h index 9320a9a494..e271dadb47 100644 --- a/wsutil/crc6.h +++ b/wsutil/crc6.h @@ -27,7 +27,6 @@ #include "ws_symbol_export.h" -WS_DLL_PUBLIC -extern guint16 update_crc6_by_bytes(guint16 crc6, guint8 byte1, guint8 byte2); +WS_DLL_PUBLIC guint16 update_crc6_by_bytes(guint16 crc6, guint8 byte1, guint8 byte2); #endif /* __CRC6_H__ */ diff --git a/wsutil/crc7.h b/wsutil/crc7.h index 68259e8146..2afc9fb109 100644 --- a/wsutil/crc7.h +++ b/wsutil/crc7.h @@ -69,8 +69,7 @@ static inline guint8 crc7init(void) * \param data_len Number of bytes in the \a data buffer. * \return The updated crc value. *****************************************************************************/ -WS_DLL_PUBLIC -extern guint8 crc7update(guint8 crc, const unsigned char *data, int data_len); +WS_DLL_PUBLIC guint8 crc7update(guint8 crc, const unsigned char *data, int data_len); /** diff --git a/wsutil/crc8.h b/wsutil/crc8.h index 28c790fd91..ed98c5eac2 100644 --- a/wsutil/crc8.h +++ b/wsutil/crc8.h @@ -41,8 +41,7 @@ extern "C" { * @param seed The seed to use. * @return the CRC8 checksum for the buffer */ -WS_DLL_PUBLIC -extern guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed); +WS_DLL_PUBLIC guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed); #ifdef __cplusplus } diff --git a/wsutil/file_util.h b/wsutil/file_util.h index a39e82461d..e07da108a6 100644 --- a/wsutil/file_util.h +++ b/wsutil/file_util.h @@ -67,23 +67,15 @@ extern "C" { #include -WS_DLL_PUBLIC -extern int ws_stdio_open (const gchar *filename, int flags, int mode); -WS_DLL_PUBLIC -extern int ws_stdio_rename (const gchar *oldfilename, const gchar *newfilename); -WS_DLL_PUBLIC -extern int ws_stdio_mkdir (const gchar *filename, int mode); -WS_DLL_PUBLIC -extern int ws_stdio_stat64 (const gchar *filename, ws_statb64 *buf); -WS_DLL_PUBLIC -extern int ws_stdio_unlink (const gchar *filename); -WS_DLL_PUBLIC -extern int ws_stdio_remove (const gchar *filename); +WS_DLL_PUBLIC int ws_stdio_open (const gchar *filename, int flags, int mode); +WS_DLL_PUBLIC int ws_stdio_rename (const gchar *oldfilename, const gchar *newfilename); +WS_DLL_PUBLIC int ws_stdio_mkdir (const gchar *filename, int mode); +WS_DLL_PUBLIC int ws_stdio_stat64 (const gchar *filename, ws_statb64 *buf); +WS_DLL_PUBLIC int ws_stdio_unlink (const gchar *filename); +WS_DLL_PUBLIC int ws_stdio_remove (const gchar *filename); -WS_DLL_PUBLIC -extern FILE * ws_stdio_fopen (const gchar *filename, const gchar *mode); -WS_DLL_PUBLIC -extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *stream); +WS_DLL_PUBLIC FILE * ws_stdio_fopen (const gchar *filename, const gchar *mode); +WS_DLL_PUBLIC FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *stream); #define ws_open ws_stdio_open #define ws_rename ws_stdio_rename @@ -139,15 +131,13 @@ GModule *ws_module_open(gchar *module_name, GModuleFlags flags); /* * utf8 version of getenv, needed to get win32 filename paths */ -WS_DLL_PUBLIC -extern char *getenv_utf8(const char *varname); +WS_DLL_PUBLIC char *getenv_utf8(const char *varname); /** Create or open a "Wireshark is running" mutex. * Create or open a mutex which signals that Wireshark or its associated * executables is running. Used by the installer to test for a running application. */ -WS_DLL_PUBLIC -extern void create_app_running_mutex(); +WS_DLL_PUBLIC void create_app_running_mutex(); #else /* _WIN32 */ diff --git a/wsutil/inet_aton.h b/wsutil/inet_aton.h index 05ce348556..f4d372d436 100644 --- a/wsutil/inet_aton.h +++ b/wsutil/inet_aton.h @@ -31,7 +31,6 @@ #include "ws_symbol_export.h" struct in_addr; -WS_DLL_PUBLIC -extern int inet_aton(const char* cp_arg, struct in_addr *addr); +WS_DLL_PUBLIC int inet_aton(const char* cp_arg, struct in_addr *addr); #endif diff --git a/wsutil/inet_v6defs.h b/wsutil/inet_v6defs.h index 04abecb872..3f17ae1001 100644 --- a/wsutil/inet_v6defs.h +++ b/wsutil/inet_v6defs.h @@ -41,11 +41,9 @@ #define inet_ntop ws_inet_ntop #endif -WS_DLL_PUBLIC -extern int inet_pton(int af, const char *src, void *dst); +WS_DLL_PUBLIC int inet_pton(int af, const char *src, void *dst); #ifndef HAVE_INET_NTOP_PROTO -WS_DLL_PUBLIC -extern const char *inet_ntop(int af, const void *src, char *dst, +WS_DLL_PUBLIC const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif diff --git a/wsutil/privileges.h b/wsutil/privileges.h index 231f3e34bc..2ce14da109 100644 --- a/wsutil/privileges.h +++ b/wsutil/privileges.h @@ -35,8 +35,7 @@ extern "C" { * Called when the program starts, to enable security features and save * whatever credential information we'll need later. */ -WS_DLL_PUBLIC -extern void init_process_policies(void); +WS_DLL_PUBLIC void init_process_policies(void); /** * Was this program started with special privileges? get_credential_info() @@ -44,8 +43,7 @@ extern void init_process_policies(void); * @return TRUE if the program was started with special privileges, * FALSE otherwise. */ -WS_DLL_PUBLIC -extern gboolean started_with_special_privs(void); +WS_DLL_PUBLIC gboolean started_with_special_privs(void); /** * Is this program running with special privileges? get_credential_info() @@ -53,31 +51,27 @@ extern gboolean started_with_special_privs(void); * @return TRUE if the program is running with special privileges, * FALSE otherwise. */ -WS_DLL_PUBLIC -extern gboolean running_with_special_privs(void); +WS_DLL_PUBLIC gboolean running_with_special_privs(void); /** * Permanently relinquish special privileges. get_credential_info() * MUST be called before calling this. */ -WS_DLL_PUBLIC -extern void relinquish_special_privs_perm(void); +WS_DLL_PUBLIC void relinquish_special_privs_perm(void); /** * Get the current username. String must be g_free()d after use. * @return A freshly g_alloc()ed string containing the username, * or "UNKNOWN" on failure. */ -WS_DLL_PUBLIC -extern gchar *get_cur_username(void); +WS_DLL_PUBLIC gchar *get_cur_username(void); /** * Get the current group. String must be g_free()d after use. * @return A freshly g_alloc()ed string containing the group, * or "UNKNOWN" on failure. */ -WS_DLL_PUBLIC -extern gchar *get_cur_groupname(void); +WS_DLL_PUBLIC gchar *get_cur_groupname(void); #ifdef _WIN32 /** @@ -85,8 +79,7 @@ extern gchar *get_cur_groupname(void); * @return TRUE if npf.sys is running, FALSE if it's not or if there was * an error checking its status. */ -WS_DLL_PUBLIC -extern gboolean npf_sys_is_running(); +WS_DLL_PUBLIC gboolean npf_sys_is_running(); #endif #ifdef __cplusplus diff --git a/wsutil/strptime.h b/wsutil/strptime.h index b11d29e715..56b064a324 100644 --- a/wsutil/strptime.h +++ b/wsutil/strptime.h @@ -29,7 +29,6 @@ /* * Version of "strptime()", for the benefit of OSes that don't have it. */ -WS_DLL_PUBLIC -extern char *strptime(const char *, const char *, struct tm *); +WS_DLL_PUBLIC char *strptime(const char *, const char *, struct tm *); #endif diff --git a/wsutil/wsgetopt.h b/wsutil/wsgetopt.h index eaebe65a96..41054d1cc9 100644 --- a/wsutil/wsgetopt.h +++ b/wsutil/wsgetopt.h @@ -151,8 +151,7 @@ struct option /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -WS_DLL_PUBLIC -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) +WS_DLL_PUBLIC int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # if defined __need_getopt && defined __USE_POSIX2 \ @@ -171,8 +170,7 @@ extern int __posix_getopt (int ___argc, char *const *___argv, # endif # endif #else /* not __GNU_LIBRARY__ */ -WS_DLL_PUBLIC -extern int getopt (int ___argc, char *const *___argv, +WS_DLL_PUBLIC int getopt (int ___argc, char *const *___argv, const char *__shortopts); #endif /* __GNU_LIBRARY__ */