Commit 1ebdb2e5 authored by Balint Reczey's avatar Balint Reczey

Export libwireshark symbols using WS_DLL_PUBLIC define

Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
parent 0b8d70bf
......@@ -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
......
......@@ -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_
<<KEEP
ps.c: tools\rdps.py print.ps
......
......@@ -39,6 +39,7 @@ SUBDIRS = \
crmf \
cms \
dap \
dsp \
dop \
disp \
dsp \
......
......@@ -26,6 +26,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 {
......@@ -39,7 +41,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[];
......
......@@ -34,6 +34,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);
......@@ -41,7 +43,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 */
......@@ -110,7 +110,7 @@ Abandoned
SearchControlOptions
SecurityError
SecurityProblem
SecurityParameters
SecurityParameters EXTERN WS_DLL
ServiceControlOptions
AbandonFailedError
UpdateError
......
......@@ -9,7 +9,7 @@ ServiceAdministration x509if
#.EXPORTS
AccessPoint
AccessPointInformation
AccessPointInformation EXTERN WS_DLL
ContinuationReference
Exclusions
MasterAndShadowAccessPoints
......
......@@ -80,7 +80,7 @@ EraseCC-EntryArg
EraseCC-EntryRes
Ext-BasicServiceCode
Ext-ForwOptions
Ext-GeographicalInformation
Ext-GeographicalInformation EXTERN WS_DLL
Ext-NoRepCondTime
Ext-QoS-Subscribed
Ext2-QoS-Subscribed
......@@ -90,16 +90,16 @@ ExternalSignalInfo
ForwardingOptions
GeographicalInformation
GetPasswordArg
GlobalCellId
GlobalCellId EXTERN WS_DLL
GPRSChargingID
GPRSMSClass
GSMMAPLocalErrorcode
GSN-Address
IMEI
IMSI
IMSI EXTERN WS_DLL
InterrogateSS-Res
ISDN-AddressString
ISDN-AddressString_PDU
ISDN-AddressString EXTERN WS_DLL
ISDN-AddressString_PDU EXTERN WS_DLL
ISDN-SubaddressString
LAIFixedLength
LCSClientExternalID
......
......@@ -26,6 +26,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
......@@ -43,7 +45,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[];
......
......@@ -13,7 +13,7 @@
#.IMPORT ../h245/h245-exp.cnf
#----------------------------------------------------------------------------------------
#.EXPORTS ONLY_VALS WS_VAR NO_PROT_PREFIX
#.EXPORTS ONLY_VALS WS_DLL NO_PROT_PREFIX
H323-UU-PDU/h323-message-body
FacilityReason
GatekeeperRejectReason
......@@ -28,7 +28,7 @@ LocationRejectReason
RegistrationRejectReason
#.MODULE_EXPORTS
RasMessage WS_VAR
RasMessage EXTERN WS_DLL
NonStandardParameter
PublicTypeOfNumber
PrivateTypeOfNumber
......@@ -59,7 +59,7 @@ EndpointType
SupportedProtocols
GatekeeperIdentifier
ServiceControlSession
ReleaseCompleteReason WS_VAR
ReleaseCompleteReason EXTERN WS_DLL
ExtendedAliasAddress_PDU
#.END
......
......@@ -13,7 +13,7 @@ T38FaxProfile
DataProtocolCapability NO_PROT_PREFIX
OpenLogicalChannel
QOSCapability
H223Capability
H223Capability EXTERN WS_DLL
H223LogicalChannelParameters
TransportAddress
UnicastAddress
......
......@@ -25,6 +25,9 @@
#ifndef PACKET_H245_H
#define PACKET_H245_H
#include "ws_symbol_export.h"
typedef enum _h245_msg_type {
H245_TermCapSet,
H245_TermCapSetAck,
......@@ -116,10 +119,10 @@ struct _h223_mux_element {
#include <epan/dissectors/packet-per.h>
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);
......
......@@ -28,6 +28,7 @@
#ifndef PACKET_H248_H
#include <epan/gcp.h>
#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 */
......@@ -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)
{
......
......@@ -27,6 +27,7 @@
#define __PACKET_LDAP_H__
# include <epan/packet.h> /* 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" */
......
......@@ -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
......
......@@ -10,7 +10,7 @@ GROUP_BY_PROT
-o qsig
#.END
#.EXPORTS EXTERN VALS_WITH_TABLE
#.EXPORTS EXTERN VALS_WITH_TABLE WS_DLL
Name
......
......@@ -13,7 +13,7 @@ CauseRadioNetwork
ProcedureCode
ProtocolIE-ID
#.EXPORTS ONLY_VALS WS_VAR
#.EXPORTS ONLY_VALS WS_DLL
CauseRadioNetwork
CauseTransport
CauseNas
......
......@@ -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,
......
......@@ -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
......
......@@ -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*);
......
......@@ -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).
......
......@@ -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).
......
......@@ -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
......
......@@ -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).
......
......@@ -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:
......
......@@ -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) */
......
......@@ -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();
}
......
......@@ -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)
......
......@@ -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
......
......@@ -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 \
......
......@@ -36,6 +36,7 @@
#include <epan/address.h>
#include <epan/tvbuff.h>
#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);