From f7e38bd5e65ca78ca1ff385a403b2eb01255c697 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 20 Jun 2006 18:30:54 +0000 Subject: Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variable definition in the Catapult DCT2000 code. svn path=/trunk/; revision=18524 --- asn1/ansi_map/packet-ansi_map-template.h | 2 +- asn1/camel/packet-camel-template.h | 2 +- asn1/gsmmap/packet-gsm_map-template.h | 2 +- config.h.win32 | 4 ++-- configure.in | 4 ++-- debian/patches/01_idl2deb.dpatch | 2 +- epan/addr_resolv.h | 2 +- epan/dfilter/dfilter.h | 2 +- epan/dissectors/packet-afp.h | 2 +- epan/dissectors/packet-ansi_a.h | 4 ++-- epan/dissectors/packet-ansi_map.h | 2 +- epan/dissectors/packet-camel.h | 2 +- epan/dissectors/packet-catapult-dct2000.c | 3 +-- epan/dissectors/packet-data.h | 2 +- epan/dissectors/packet-dcerpc.h | 4 ++-- epan/dissectors/packet-fc.h | 2 +- epan/dissectors/packet-frame.h | 10 +++++----- epan/dissectors/packet-gsm_a.h | 18 +++++++++--------- epan/dissectors/packet-gsm_map.h | 2 +- epan/dissectors/packet-h225.h | 28 ++++++++++++++-------------- epan/dissectors/packet-isup.h | 6 +++--- epan/dissectors/packet-mtp3.h | 2 +- epan/dissectors/packet-q931.h | 4 ++-- epan/dissectors/packet-rpc.h | 4 ++-- epan/dissectors/packet-scsi.h | 6 +++--- epan/dissectors/packet-smb-sidsnooping.h | 2 +- epan/dissectors/packet-smb.h | 8 ++++---- epan/dissectors/packet-smb2.h | 2 +- epan/dissectors/packet-t38.h | 8 ++++---- epan/dissectors/packet-wsp.h | 4 ++-- epan/follow.h | 2 +- epan/ftypes/ftypes.h | 2 +- epan/plugins.h | 2 +- epan/prefs-int.h | 2 +- epan/prefs.h | 2 +- epan/proto.h | 6 +++--- epan/rtp_pt.h | 4 ++-- epan/tap.h | 2 +- gtk/follow_dlg.c | 2 +- tools/asn2wrs.py | 2 +- wiretap/catapult_dct2000.h | 1 + wiretap/configure.in | 6 ++++++ 42 files changed, 92 insertions(+), 86 deletions(-) diff --git a/asn1/ansi_map/packet-ansi_map-template.h b/asn1/ansi_map/packet-ansi_map-template.h index 7b74e53ef5..52bcbb3313 100644 --- a/asn1/ansi_map/packet-ansi_map-template.h +++ b/asn1/ansi_map/packet-ansi_map-template.h @@ -39,7 +39,7 @@ typedef struct _ansi_map_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string ansi_map_opr_code_strings[]; +WS_VAR_IMPORT const value_string ansi_map_opr_code_strings[]; diff --git a/asn1/camel/packet-camel-template.h b/asn1/camel/packet-camel-template.h index 90314d26e7..3153472ba2 100644 --- a/asn1/camel/packet-camel-template.h +++ b/asn1/camel/packet-camel-template.h @@ -40,7 +40,7 @@ char camel_number_to_char(int ); #define camel_MAX_NUM_OPR_CODES 256 -ETH_VAR_IMPORT const value_string camel_opr_code_strings[]; +WS_VAR_IMPORT const value_string camel_opr_code_strings[]; /* #include "packet-camel-exp.h"*/ #endif /* PACKET_camel_H */ diff --git a/asn1/gsmmap/packet-gsm_map-template.h b/asn1/gsmmap/packet-gsm_map-template.h index 526c8890fb..bd095fa92c 100644 --- a/asn1/gsmmap/packet-gsm_map-template.h +++ b/asn1/gsmmap/packet-gsm_map-template.h @@ -35,7 +35,7 @@ typedef struct _gsm_map_tap_rec_t { guint16 size; } gsm_map_tap_rec_t; -ETH_VAR_IMPORT const value_string gsm_map_opr_code_strings[]; +WS_VAR_IMPORT const value_string gsm_map_opr_code_strings[]; char* unpack_digits(tvbuff_t *tvb, int offset); void dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); diff --git a/config.h.win32 b/config.h.win32 index 0908b2549d..50805365a0 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -70,9 +70,9 @@ * it depends on HAVE_LIBWIRESHARK and _NEED_VAR_IMPORT_ */ #if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBWIRESHARKDLL) -# define ETH_VAR_IMPORT __declspec(dllimport) extern +# define WS_VAR_IMPORT __declspec(dllimport) extern #else -# define ETH_VAR_IMPORT extern +# define WS_VAR_IMPORT extern #endif #define HAVE_NET_SNMP 1 diff --git a/configure.in b/configure.in index 1d71fb343d..84d681673a 100644 --- a/configure.in +++ b/configure.in @@ -1029,10 +1029,10 @@ fi AC_SUBST(ADNS_LIBS) # -# Define ETH_VAR_IMPORT appropriately for declarations of external +# Define WS_VAR_IMPORT appropriately for declarations of external # variables exported from dynamically-linked libraries. # -AC_DEFINE(ETH_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries]) +AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries]) dnl Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST diff --git a/debian/patches/01_idl2deb.dpatch b/debian/patches/01_idl2deb.dpatch index 8115ae0f94..2d32535b65 100644 --- a/debian/patches/01_idl2deb.dpatch +++ b/debian/patches/01_idl2deb.dpatch @@ -85,7 +85,7 @@ diff -urNad --exclude=CVS --exclude=.svn ./idl2deb /tmp/dpep-work.K2bQz4/etherea +BUILT_SOURCES = packet-%s.c +INCLUDES = -DHAVE_CONFIG -DHAVE_SYS_TYPES_H -DHAVE_SYS_TIME_H \\ + -DHAVE_STDARG_H -D_U_=\"__attribute__((unused))\" \\ -+ -I/usr/include/ethereal -DETH_VAR_IMPORT=extern $(GLIB_CFLAGS) ++ -I/usr/include/ethereal -DWS_VAR_IMPORT=extern $(GLIB_CFLAGS) +LDADD = $(GLIB_LIBS) + +# Libs must be cleared, or else libtool won't create a shared module. diff --git a/epan/addr_resolv.h b/epan/addr_resolv.h index 89eca39498..544aad0f96 100644 --- a/epan/addr_resolv.h +++ b/epan/addr_resolv.h @@ -43,7 +43,7 @@ /* * Flag controlling what names to resolve. */ -ETH_VAR_IMPORT guint32 g_resolv_flags; +WS_VAR_IMPORT guint32 g_resolv_flags; /* 32 types are sufficient (as are 640k of RAM) */ /* FIXME: Maybe MANUF/m, IP/i, IP6/6, IPX/x, UDP+TCP/t etc would be diff --git a/epan/dfilter/dfilter.h b/epan/dfilter/dfilter.h index 99cb42fbf7..401cd75812 100644 --- a/epan/dfilter/dfilter.h +++ b/epan/dfilter/dfilter.h @@ -69,7 +69,7 @@ dfilter_free(dfilter_t *df); * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT gchar *dfilter_error_msg; +WS_VAR_IMPORT gchar *dfilter_error_msg; /* Apply compiled dfilter */ diff --git a/epan/dissectors/packet-afp.h b/epan/dissectors/packet-afp.h index f7b608a0ad..4420351af3 100644 --- a/epan/dissectors/packet-afp.h +++ b/epan/dissectors/packet-afp.h @@ -123,7 +123,7 @@ struct aspinfo { /* * value_string table for AFP command codes. */ -ETH_VAR_IMPORT const value_string CommandCode_vals[]; +WS_VAR_IMPORT const value_string CommandCode_vals[]; /* * 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 35179b7d34..78c2cfd757 100644 --- a/epan/dissectors/packet-ansi_a.h +++ b/epan/dissectors/packet-ansi_a.h @@ -38,8 +38,8 @@ typedef struct _ansi_a_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[]; -ETH_VAR_IMPORT const value_string ansi_a_ios401_dtap_strings[]; +WS_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[]; +WS_VAR_IMPORT const value_string ansi_a_ios401_dtap_strings[]; /* * allows ANSI MAP to use this for IS-880 enhancements diff --git a/epan/dissectors/packet-ansi_map.h b/epan/dissectors/packet-ansi_map.h index 3d9177ca8c..65bce5c8e1 100644 --- a/epan/dissectors/packet-ansi_map.h +++ b/epan/dissectors/packet-ansi_map.h @@ -37,5 +37,5 @@ typedef struct _ansi_map_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string ansi_map_opr_code_strings[]; +WS_VAR_IMPORT const value_string ansi_map_opr_code_strings[]; diff --git a/epan/dissectors/packet-camel.h b/epan/dissectors/packet-camel.h index 53ea634fb5..beed68668f 100644 --- a/epan/dissectors/packet-camel.h +++ b/epan/dissectors/packet-camel.h @@ -48,7 +48,7 @@ char camel_number_to_char(int ); #define camel_MAX_NUM_OPR_CODES 256 -ETH_VAR_IMPORT const value_string camel_opr_code_strings[]; +WS_VAR_IMPORT const value_string camel_opr_code_strings[]; /* #include "packet-camel-exp.h"*/ #endif /* PACKET_camel_H */ diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index d3d5fe2448..a0aa46d5d6 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -32,7 +32,7 @@ #include #include -#include "../wiretap/catapult_dct2000.h" +#include /* Protocol and registered fields. */ static int proto_catapult_dct2000 = -1; @@ -47,7 +47,6 @@ static int hf_catapult_dct2000_encap = -1; static int hf_catapult_dct2000_unparsed_data = -1; /* Variables used for preferences */ -gboolean catapult_dct2000_board_ports_only; gboolean catapult_dct2000_try_ipprim_heuristic = TRUE; /* Protocol subtree. */ diff --git a/epan/dissectors/packet-data.h b/epan/dissectors/packet-data.h index 27351412b0..32ac8142d6 100644 --- a/epan/dissectors/packet-data.h +++ b/epan/dissectors/packet-data.h @@ -27,6 +27,6 @@ /* "proto_data" is exported from libwireshark.dll. * Thus we need a special declaration. */ -ETH_VAR_IMPORT int proto_data; +WS_VAR_IMPORT int proto_data; #endif /* __PACKET_DATA_H__ */ diff --git a/epan/dissectors/packet-dcerpc.h b/epan/dissectors/packet-dcerpc.h index a0661d48f9..1673c04822 100644 --- a/epan/dissectors/packet-dcerpc.h +++ b/epan/dissectors/packet-dcerpc.h @@ -290,12 +290,12 @@ typedef struct _dcerpc_info { /* the init_protocol hooks. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT GHookList dcerpc_hooks_init_protos; +WS_VAR_IMPORT GHookList dcerpc_hooks_init_protos; /* the registered subdissectors. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT GHashTable *dcerpc_uuids; +WS_VAR_IMPORT GHashTable *dcerpc_uuids; typedef struct _dcerpc_uuid_key { e_uuid_t uuid; diff --git a/epan/dissectors/packet-fc.h b/epan/dissectors/packet-fc.h index b489b55fe4..75f01c62f7 100644 --- a/epan/dissectors/packet-fc.h +++ b/epan/dissectors/packet-fc.h @@ -59,7 +59,7 @@ * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string fc_fc4_val[]; +WS_VAR_IMPORT const value_string fc_fc4_val[]; /* DF_CTL bits */ #define FC_DFCTL_DH 0x03 /* Device_Header type bits: */ diff --git a/epan/dissectors/packet-frame.h b/epan/dissectors/packet-frame.h index 6011b04d28..ca62c10aa6 100644 --- a/epan/dissectors/packet-frame.h +++ b/epan/dissectors/packet-frame.h @@ -53,8 +53,8 @@ extern int proto_malformed; /* following variables are exported from libwireshark.dll. * Thus we need a special declaration. */ -ETH_VAR_IMPORT int proto_frame; -ETH_VAR_IMPORT int hf_frame_arrival_time; -ETH_VAR_IMPORT int hf_frame_number; -ETH_VAR_IMPORT int hf_frame_packet_len; -ETH_VAR_IMPORT int hf_frame_capture_len; +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_packet_len; +WS_VAR_IMPORT int hf_frame_capture_len; diff --git a/epan/dissectors/packet-gsm_a.h b/epan/dissectors/packet-gsm_a.h index 85c44b0278..8a75d69f07 100644 --- a/epan/dissectors/packet-gsm_a.h +++ b/epan/dissectors/packet-gsm_a.h @@ -99,15 +99,15 @@ void dtap_rr_ho_cmd(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len); * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string gsm_a_bssmap_msg_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_mm_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_rr_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_cc_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_gmm_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_sms_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_sm_strings[]; -ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_ss_strings[]; -ETH_VAR_IMPORT const gchar *gsm_a_pd_str[]; +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 gchar *gsm_a_pd_str[]; extern const value_string gsm_a_qos_del_of_err_sdu_vals[]; extern const value_string gsm_a_qos_del_order_vals[]; diff --git a/epan/dissectors/packet-gsm_map.h b/epan/dissectors/packet-gsm_map.h index b40849c3b6..aa3a6306ea 100644 --- a/epan/dissectors/packet-gsm_map.h +++ b/epan/dissectors/packet-gsm_map.h @@ -43,7 +43,7 @@ typedef struct _gsm_map_tap_rec_t { guint16 size; } gsm_map_tap_rec_t; -ETH_VAR_IMPORT const value_string gsm_map_opr_code_strings[]; +WS_VAR_IMPORT const value_string gsm_map_opr_code_strings[]; char* unpack_digits(tvbuff_t *tvb, int offset); void dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); diff --git a/epan/dissectors/packet-h225.h b/epan/dissectors/packet-h225.h index 579f673b1f..5e1b3c2172 100644 --- a/epan/dissectors/packet-h225.h +++ b/epan/dissectors/packet-h225.h @@ -89,24 +89,24 @@ typedef struct _h225_packet_info { /*--- Included file: packet-h225-exp.h ---*/ #line 1 "packet-h225-exp.h" -ETH_VAR_IMPORT const value_string T_h323_message_body_vals[]; -ETH_VAR_IMPORT const value_string ReleaseCompleteReason_vals[]; +WS_VAR_IMPORT const value_string T_h323_message_body_vals[]; +WS_VAR_IMPORT const value_string ReleaseCompleteReason_vals[]; extern const value_string h225_PresentationIndicator_vals[]; extern const value_string h225_ScreeningIndicator_vals[]; -ETH_VAR_IMPORT const value_string FacilityReason_vals[]; +WS_VAR_IMPORT const value_string FacilityReason_vals[]; extern const value_string AliasAddress_vals[]; extern const value_string h225_PartyNumber_vals[]; -ETH_VAR_IMPORT const value_string RasMessage_vals[]; -ETH_VAR_IMPORT const value_string GatekeeperRejectReason_vals[]; -ETH_VAR_IMPORT const value_string RegistrationRejectReason_vals[]; -ETH_VAR_IMPORT const value_string UnregRequestReason_vals[]; -ETH_VAR_IMPORT const value_string UnregRejectReason_vals[]; -ETH_VAR_IMPORT const value_string AdmissionRejectReason_vals[]; -ETH_VAR_IMPORT const value_string BandRejectReason_vals[]; -ETH_VAR_IMPORT const value_string LocationRejectReason_vals[]; -ETH_VAR_IMPORT const value_string DisengageReason_vals[]; -ETH_VAR_IMPORT const value_string DisengageRejectReason_vals[]; -ETH_VAR_IMPORT const value_string InfoRequestNakReason_vals[]; +WS_VAR_IMPORT const value_string 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_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_PresentationIndicator(tvbuff_t *tvb, int offset, asn_ctx_t *actx, proto_tree *tree, int hf_index); int dissect_h225_ScreeningIndicator(tvbuff_t *tvb, int offset, asn_ctx_t *actx, proto_tree *tree, int hf_index); int dissect_h225_NonStandardParameter(tvbuff_t *tvb, int offset, asn_ctx_t *actx, proto_tree *tree, int hf_index); diff --git a/epan/dissectors/packet-isup.h b/epan/dissectors/packet-isup.h index f37ecfec6e..1ce597d5c3 100644 --- a/epan/dissectors/packet-isup.h +++ b/epan/dissectors/packet-isup.h @@ -40,9 +40,9 @@ typedef struct _isup_tap_rec_t { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string isup_message_type_value[]; -ETH_VAR_IMPORT const value_string isup_message_type_value_acro[]; -ETH_VAR_IMPORT const value_string q850_cause_code_vals[]; +WS_VAR_IMPORT const value_string isup_message_type_value[]; +WS_VAR_IMPORT const value_string isup_message_type_value_acro[]; +WS_VAR_IMPORT const value_string q850_cause_code_vals[]; /* * Export some definitions and value_string tables for other dissectors */ diff --git a/epan/dissectors/packet-mtp3.h b/epan/dissectors/packet-mtp3.h index 6fc98014d3..90aaeddbd9 100644 --- a/epan/dissectors/packet-mtp3.h +++ b/epan/dissectors/packet-mtp3.h @@ -79,7 +79,7 @@ extern guint32 mtp3_pc_hash(const guint8* data); * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string mtp3_service_indicator_code_short_vals[]; +WS_VAR_IMPORT const value_string mtp3_service_indicator_code_short_vals[]; /* * I only want to gather stats for non-spare SI codes diff --git a/epan/dissectors/packet-q931.h b/epan/dissectors/packet-q931.h index 6319f41a76..cf37e8ffef 100644 --- a/epan/dissectors/packet-q931.h +++ b/epan/dissectors/packet-q931.h @@ -57,8 +57,8 @@ typedef struct _q931_packet_info { * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string q931_cause_code_vals[]; -ETH_VAR_IMPORT const value_string q931_message_type_vals[]; +WS_VAR_IMPORT const value_string q931_cause_code_vals[]; +WS_VAR_IMPORT const value_string q931_message_type_vals[]; extern const value_string q931_protocol_discriminator_vals[]; diff --git a/epan/dissectors/packet-rpc.h b/epan/dissectors/packet-rpc.h index 907f91728d..b71904652a 100644 --- a/epan/dissectors/packet-rpc.h +++ b/epan/dissectors/packet-rpc.h @@ -174,7 +174,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. */ -ETH_VAR_IMPORT GHashTable *rpc_progs; +WS_VAR_IMPORT GHashTable *rpc_progs; typedef struct _rpc_proc_info_key { guint32 prog; @@ -191,7 +191,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. */ -ETH_VAR_IMPORT GHashTable *rpc_procs; +WS_VAR_IMPORT GHashTable *rpc_procs; #endif /* packet-rpc.h */ diff --git a/epan/dissectors/packet-scsi.h b/epan/dissectors/packet-scsi.h index 5dce31fb39..ebcf235583 100644 --- a/epan/dissectors/packet-scsi.h +++ b/epan/dissectors/packet-scsi.h @@ -69,8 +69,8 @@ void dissect_scsi_payload (tvbuff_t *, packet_info *, proto_tree *, gboolean, itlq_nexus_t *, itl_nexus_t *); void dissect_scsi_snsinfo (tvbuff_t *, packet_info *, proto_tree *, guint, guint, itlq_nexus_t *, itl_nexus_t *); -ETH_VAR_IMPORT const value_string scsi_sbc2_vals[]; -ETH_VAR_IMPORT const value_string scsi_mmc_vals[]; -ETH_VAR_IMPORT const value_string scsi_ssc2_vals[]; +WS_VAR_IMPORT const value_string scsi_sbc2_vals[]; +WS_VAR_IMPORT const value_string scsi_mmc_vals[]; +WS_VAR_IMPORT const value_string scsi_ssc2_vals[]; #endif diff --git a/epan/dissectors/packet-smb-sidsnooping.h b/epan/dissectors/packet-smb-sidsnooping.h index 3000dc9cdd..35ce7c5afb 100644 --- a/epan/dissectors/packet-smb-sidsnooping.h +++ b/epan/dissectors/packet-smb-sidsnooping.h @@ -29,7 +29,7 @@ /* With MSVC and a libwireshark.dll, we need a * special declaration for sid_name_table. */ -ETH_VAR_IMPORT GHashTable *sid_name_table; +WS_VAR_IMPORT GHashTable *sid_name_table; typedef struct _sid_name { char *sid; diff --git a/epan/dissectors/packet-smb.h b/epan/dissectors/packet-smb.h index 4795dcbbd6..a03c90c2c5 100644 --- a/epan/dissectors/packet-smb.h +++ b/epan/dissectors/packet-smb.h @@ -26,14 +26,14 @@ #ifndef __PACKET_SMB_H__ #define __PACKET_SMB_H__ -ETH_VAR_IMPORT gboolean sid_name_snooping; +WS_VAR_IMPORT gboolean sid_name_snooping; /* SMB command codes, from the SNIA CIFS spec. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string smb_cmd_vals[]; -ETH_VAR_IMPORT const value_string trans2_cmd_vals[]; -ETH_VAR_IMPORT const value_string nt_cmd_vals[]; +WS_VAR_IMPORT const value_string smb_cmd_vals[]; +WS_VAR_IMPORT const value_string trans2_cmd_vals[]; +WS_VAR_IMPORT const value_string nt_cmd_vals[]; #define SMB_COM_CREATE_DIRECTORY 0x00 diff --git a/epan/dissectors/packet-smb2.h b/epan/dissectors/packet-smb2.h index 73cfb444ac..a046485412 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. */ -ETH_VAR_IMPORT const value_string smb2_cmd_vals[]; +WS_VAR_IMPORT const value_string smb2_cmd_vals[]; /* 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-t38.h b/epan/dissectors/packet-t38.h index 075523ce0d..cfa2eda0a4 100644 --- a/epan/dissectors/packet-t38.h +++ b/epan/dissectors/packet-t38.h @@ -73,10 +73,10 @@ void t38_add_address(packet_info *pinfo, int other_port, const gchar *setup_method, guint32 setup_frame_number); -ETH_VAR_IMPORT const value_string t30_indicator_vals[]; -ETH_VAR_IMPORT const value_string t30_facsimile_control_field_vals[]; -ETH_VAR_IMPORT const value_string t30_facsimile_control_field_vals_short[]; -ETH_VAR_IMPORT const value_string t30_data_vals[]; +WS_VAR_IMPORT const value_string t30_indicator_vals[]; +WS_VAR_IMPORT const value_string t30_facsimile_control_field_vals[]; +WS_VAR_IMPORT const value_string t30_facsimile_control_field_vals_short[]; +WS_VAR_IMPORT const value_string t30_data_vals[]; diff --git a/epan/dissectors/packet-wsp.h b/epan/dissectors/packet-wsp.h index 0734e405ea..e93cc0741c 100644 --- a/epan/dissectors/packet-wsp.h +++ b/epan/dissectors/packet-wsp.h @@ -40,8 +40,8 @@ extern const value_string vals_wsp_reason_codes[]; * without having to duplicate it. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT const value_string vals_pdu_type[]; -ETH_VAR_IMPORT const value_string vals_status[]; +WS_VAR_IMPORT const value_string vals_pdu_type[]; +WS_VAR_IMPORT const value_string vals_status[]; /* * exported functionality */ diff --git a/epan/follow.h b/epan/follow.h index af7fcb7df2..9d92624db8 100644 --- a/epan/follow.h +++ b/epan/follow.h @@ -32,7 +32,7 @@ #define MAX_IPADDR_LEN 16 /* With MSVC and a libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT gboolean incomplete_tcp_stream; +WS_VAR_IMPORT gboolean incomplete_tcp_stream; typedef struct _tcp_stream_chunk { guint8 src_addr[MAX_IPADDR_LEN]; diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h index c4d5e57b6a..6e42655693 100644 --- a/epan/ftypes/ftypes.h +++ b/epan/ftypes/ftypes.h @@ -247,7 +247,7 @@ SLAB_ITEM_TYPE_DEFINE(fvalue_t) /* Free all memory used by an fvalue_t. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT SLAB_FREE_LIST_DECLARE(fvalue_t) +WS_VAR_IMPORT SLAB_FREE_LIST_DECLARE(fvalue_t) #define FVALUE_CLEANUP(fv) \ diff --git a/epan/plugins.h b/epan/plugins.h index 0f1ead79ee..44d942fbc8 100644 --- a/epan/plugins.h +++ b/epan/plugins.h @@ -40,7 +40,7 @@ typedef struct _plugin { struct _plugin *next; /* forward link */ } plugin; -ETH_VAR_IMPORT plugin *plugin_list; +WS_VAR_IMPORT plugin *plugin_list; extern void init_plugins(const char *); extern void register_all_plugin_handoffs(void); diff --git a/epan/prefs-int.h b/epan/prefs-int.h index 04cf25d5e6..60267daa7a 100644 --- a/epan/prefs-int.h +++ b/epan/prefs-int.h @@ -42,7 +42,7 @@ struct pref_module { * Module used for protocol preferences. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT module_t *protocols_module; +WS_VAR_IMPORT module_t *protocols_module; /* * PREF_OBSOLETE is used for preferences that a module used to support diff --git a/epan/prefs.h b/epan/prefs.h index 2f91c0233a..887d73a73a 100644 --- a/epan/prefs.h +++ b/epan/prefs.h @@ -151,7 +151,7 @@ typedef struct _e_prefs { gboolean capture_show_info; } e_prefs; -ETH_VAR_IMPORT e_prefs prefs; +WS_VAR_IMPORT e_prefs prefs; /* * Routines to let modules that have preference settings register diff --git a/epan/proto.h b/epan/proto.h index 86e07eba32..43e054b700 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -52,7 +52,7 @@ #include "ftypes/ftypes.h" /** The header-field index for the special text pseudo-field. Exported by libwireshark.dll */ -ETH_VAR_IMPORT int hf_text_only; +WS_VAR_IMPORT int hf_text_only; /** the maximum length of a protocol field string representation */ #define ITEM_LABEL_LENGTH 240 @@ -1496,11 +1496,11 @@ extern void proto_registrar_dump_fields(int format); 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. */ -ETH_VAR_IMPORT gboolean *tree_is_expanded; +WS_VAR_IMPORT gboolean *tree_is_expanded; /** Number of elements in the tree_is_expanded array. With MSVC and a * libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT int num_tree_types; +WS_VAR_IMPORT int num_tree_types; /** glib doesn't have g_ptr_array_len of all things!*/ #ifndef g_ptr_array_len diff --git a/epan/rtp_pt.h b/epan/rtp_pt.h index f684ff9e9a..f3f551dadc 100644 --- a/epan/rtp_pt.h +++ b/epan/rtp_pt.h @@ -62,7 +62,7 @@ #define PT_MP2T 33 /* RFC 2250 */ #define PT_H263 34 /* from Chunrong Zhu of Intel; see the Web page */ -ETH_VAR_IMPORT const value_string rtp_payload_type_vals[]; -ETH_VAR_IMPORT const value_string rtp_payload_type_short_vals[]; +WS_VAR_IMPORT const value_string rtp_payload_type_vals[]; +WS_VAR_IMPORT const value_string rtp_payload_type_short_vals[]; #endif diff --git a/epan/tap.h b/epan/tap.h index a08b39a0e1..8a7e79b25b 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -30,7 +30,7 @@ /* With MSVC and a libwireshark.dll, we need a * special declaration of num_tap_filters. */ -ETH_VAR_IMPORT int num_tap_filters; +WS_VAR_IMPORT int num_tap_filters; typedef void (*tap_reset_cb)(void *tapdata); typedef int (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data); diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c index dc2546359a..cd2417f6dc 100644 --- a/gtk/follow_dlg.c +++ b/gtk/follow_dlg.c @@ -121,7 +121,7 @@ static void follow_stream_om_server(GtkWidget * w, gpointer data); /* With MSVC and a libwireshark.dll, we need a special declaration. */ -ETH_VAR_IMPORT FILE *data_out_file; +WS_VAR_IMPORT FILE *data_out_file; #define E_FOLLOW_INFO_KEY "follow_info_key" diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index f7fe93b818..eb3f885d0e 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -982,7 +982,7 @@ class EthCtx: for t in self.eth_export_ord: # vals if (self.eth_type[t]['export'] & 0x02) and self.eth_type[t]['val'].eth_has_vals(): if self.eth_type[t]['export'] & 0x08: - fx.write("ETH_VAR_IMPORT ") + fx.write("WS_VAR_IMPORT ") else: fx.write("extern ") fx.write("const value_string %s[];\n" % (self.eth_vals_nm(t))) diff --git a/wiretap/catapult_dct2000.h b/wiretap/catapult_dct2000.h index fb936a91f6..f57c5d2adf 100644 --- a/wiretap/catapult_dct2000.h +++ b/wiretap/catapult_dct2000.h @@ -28,3 +28,4 @@ int catapult_dct2000_dump_can_write_encap(int encap); #define DCT2000_ENCAP_SSCOP 101 #define DCT2000_ENCAP_MTP2 102 +WS_VAR_IMPORT gboolean catapult_dct2000_board_ports_only; diff --git a/wiretap/configure.in b/wiretap/configure.in index 9a7bd9c7b3..a6628aac84 100644 --- a/wiretap/configure.in +++ b/wiretap/configure.in @@ -172,6 +172,12 @@ dnl Checks for header files AC_HEADER_STDC AC_CHECK_HEADERS(sys/time.h netinet/in.h unistd.h fcntl.h sys/stat.h sys/types.h) +# +# 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]) + # We must know our byte order AC_C_BIGENDIAN -- cgit v1.2.3