Wireshark-dev: Re: [Wireshark-dev] How can a TAP refer to external data ?
From: "Anders Broman" <
a.broman@xxxxxxxxx>
Date: Tue, 31 Oct 2006 23:18:22 +0100
Have you added the corresponding lines to /epan/libwireshark.def ?
BR
Anders
-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Michael Lum
Skickat: den 31 oktober 2006 20:12
Till: 'Developer support list for Wireshark'
Ämne: [Wireshark-dev] How can a TAP refer to external data ?
Hello,
I am trying to modify the ansi_a_stat.c file.
I want the TAP to use an array of structures (ext_value_string_t below) from
the packet-ansi_a.c dissector.
In the TAP I have a pointer to the array.
During linking I get the following error:
Linking wireshark.exe
link @C:\DOCUME~1\mlum.BC\LOCALS~1\Temp\nma04728.
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_dtap_strings
libui.lib(ansi_a_stat.obj) : error LNK2001: unresolved external symbol
__imp__ansi_a_bsmap_strings wireshark.exe : fatal error LNK1120: 2
unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
The definition of ansi_a_dtap_strings is as follows from
epan/dissectors/packet-ansi_a.h:
typedef struct ext_value_string_t
{
guint32 value;
const gchar *strptr;
guint32 dec_index;
}
ext_value_string_t;
WS_VAR_IMPORT const ext_value_string_t *ansi_a_bsmap_strings; WS_VAR_IMPORT
const ext_value_string_t *ansi_a_dtap_strings;
>From epan/dissectors/packet-ansi_a.c:
const ext_value_string_t *ansi_a_bsmap_strings = NULL; const
ext_value_string_t *ansi_a_dtap_strings = NULL;
The pointers are set in packet-ansi_a.c depending on a configuration
parameter, IOS version.
The previous version, which built and works correctly had the following
definition:
WS_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[];
In the new code I have:
WS_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[];
WS_VAR_IMPORT const value_string ansi_a_ios501_bsmap_strings[];
The pointer 'ansi_a_bsmap_strings' will be set to one of the above depending
on the current IOS version.
Thanks for your help.
Build environment:
Windows XP
Visual C++
--
Michael Lum Principal Software Engineer
4600 Jacombs Road +1.604.276.0055
Richmond, B.C.
Canada V6V 3B1
UTStarcom Canada, Inc.
CDMA Division
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev