wireshark/epan
Hadriel Kaplan 7f074364b6 Fix bug 9790: Lua: wslua allows duplicate field registration
As discussed in bug 3513 and 9709, one can register more than one new ProtoFields for
the same field name. Of course C-code can do that too, and does a LOT apparently, but
if they're not similar ftypes then things can get scrweed up in display filters.

So this change prevents duplicate field registration of dissimilar ftypes. The
similarity is based on the discussion on the mailing list, and the listing in
README.developer has been updated to refelect that as well.

Also, this change adds a testscript for Proto/ProtoFields.

Change-Id: I43bd323f785245941a21289647332a19adec2a9d
Reviewed-on: https://code.wireshark.org/review/285
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-21 20:57:43 +00:00
..
crypt Rename a couple of to_str functions to have ep_ in the name. This makes it 2013-12-19 15:49:09 +00:00
dfilter Fix all -fstrict-alias warnings found by gcc 4.1.2 2014-02-03 09:26:10 +00:00
dissectors Fix Dead Store (Dead assignement/Dead increment) warning found by Clang 2014-02-21 20:50:14 +00:00
ftypes Fix bug 9790: Lua: wslua allows duplicate field registration 2014-02-21 20:57:43 +00:00
wmem From Jim Young via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9613 2014-01-05 00:47:24 +00:00
wslua Fix bug 9790: Lua: wslua allows duplicate field registration 2014-02-21 20:57:43 +00:00
wspython Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192) 2013-10-06 02:31:10 +00:00
CMakeLists.txt Android: Add support for ADB Client-Server protocol 2014-02-20 22:02:59 +00:00
Makefile.am 1.11.2 → 1.11.3. 2013-11-18 17:41:00 +00:00
Makefile.common Move tcap and camel "persistent data" functionality to the dissectors themselves instead of being part of epan directory. 2013-12-30 22:07:38 +00:00
Makefile.nmake Take a blind stab at adding oids_test to nmake 2013-10-20 02:10:39 +00:00
addr_and_mask.c Add missing consts. 2013-12-07 17:49:41 +00:00
addr_and_mask.h
addr_resolv.c New functions: str_to_ip6(), str_to_ip() 2013-12-21 16:16:56 +00:00
addr_resolv.h New functions: str_to_ip6(), str_to_ip() 2013-12-21 16:16:56 +00:00
address.h Fix const warnings. 2013-12-14 14:33:46 +00:00
address_to_str.c Fix all -fstrict-alias warnings found by gcc 4.1.2 2014-02-03 09:26:10 +00:00
afn.c From Miroslav Miklus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9504 Enhance BGP dissector : bgp-ls dissector (draft-ietf-idr-ls-distribution-04) 2014-01-13 22:24:32 +00:00
afn.h From Miroslav Miklus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9504 Enhance BGP dissector : bgp-ls dissector (draft-ietf-idr-ls-distribution-04) 2014-01-13 22:24:32 +00:00
aftypes.c Add more LINUX_AF_* values, create value_string_ext for them. Use it in netlink, nflog. 2013-12-08 12:42:10 +00:00
aftypes.h Add more LINUX_AF_* values, create value_string_ext for them. Use it in netlink, nflog. 2013-12-08 12:42:10 +00:00
app_mem_usage.c
app_mem_usage.h
arcnet_pids.h
arptypes.h Add initial dissectors for netlink, and netlink route subsystem. 2013-12-08 12:01:32 +00:00
asm_utils.c
asm_utils.h
asm_utils_win32_x86.asm
asn1.c Explicitly include emem.h where it is needed 2013-09-13 08:16:50 +00:00
asn1.h
atalk-utils.c
atalk-utils.h
ax25_pids.h
bridged_pids.h
charsets.c Add the rest of ISO-8859-n, thanks to Jakub's "generate a mapping table" 2013-12-21 21:55:46 +00:00
charsets.h Add the rest of ISO-8859-n, thanks to Jakub's "generate a mapping table" 2013-12-21 21:55:46 +00:00
chdlctypes.h
circuit.c Allow "circuit dissectors" to pass data between dissectors. Not sure if this is immediately useful (ie remove need for packet_info (private_)data), but opens the possibility. 2013-10-27 15:00:11 +00:00
circuit.h Allow "circuit dissectors" to pass data between dissectors. Not sure if this is immediately useful (ie remove need for packet_info (private_)data), but opens the possibility. 2013-10-27 15:00:11 +00:00
column-info.h Avoid including definition of column_info structure in dissectors. 2013-12-22 10:41:27 +00:00
column-utils.c Don't cast away constness. 2014-01-14 18:16:12 +00:00
column-utils.h Avoid including definition of column_info structure in dissectors. 2013-12-22 10:41:27 +00:00
column.c Avoid including definition of column_info structure in dissectors. 2013-12-22 10:41:27 +00:00
column.h Add missing includes 2013-12-21 17:23:17 +00:00
conv_id.h
conversation.c (Trivial) explicitely --> explicitly 2014-01-04 17:29:20 +00:00
conversation.h (Trivial) explicitely --> explicitly 2014-01-04 17:29:20 +00:00
crc8-tvb.c Add missing consts. 2013-12-07 17:49:41 +00:00
crc8-tvb.h
crc16-tvb.c Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217) 2013-10-22 23:30:26 +00:00
crc16-tvb.h Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217) 2013-10-22 23:30:26 +00:00
crc32-tvb.c Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217) 2013-10-22 23:30:26 +00:00
crc32-tvb.h Add STANAG 5066 DTS CRC routines. Bug 9217 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9217) 2013-10-22 23:30:26 +00:00
decode_as.c Get the "Decode As" dialog working, albeit with a few warts. It differs 2013-12-10 19:23:26 +00:00
decode_as.h Get the "Decode As" dialog working, albeit with a few warts. It differs 2013-12-10 19:23:26 +00:00
diam_dict.h Remove trailing whitespace 2013-10-06 17:04:18 +00:00
diam_dict.l More shorten-64-to-32 warnings. 2013-12-14 19:23:34 +00:00
disabled_protos.c Move the epan/filesystem.c routines to wsutil; they're not specific to 2013-11-17 02:55:14 +00:00
disabled_protos.h
dissector_filters.c
dissector_filters.h
doxygen.cfg.in
dtd.h
dtd_grammar.lemon Use "(void) <variable/>" to avoid unused variable warnings similar to 2013-12-14 23:44:25 +00:00
dtd_parse.h
dtd_parse.l More shorten-64-to-32 warnings. 2013-12-14 19:23:34 +00:00
dtd_preparse.l
dvb_chartbl.c Support all the DVB ISO 8859-x encodings, now that we have ENC_ values 2013-12-21 22:10:49 +00:00
dvb_chartbl.h fix some warnings. 2013-12-21 17:34:41 +00:00
dwarf.c Fix warnings 2013-12-14 12:45:57 +00:00
dwarf.h From Michal Labedzki via 2013-10-24 12:41:27 +00:00
eap.h
emem.c Remove emem tree code entirely, it is unused. 2014-02-16 04:48:10 +00:00
emem.h Remove emem tree code entirely, it is unused. 2014-02-16 04:48:10 +00:00
enterprise-numbers [Automatic manuf, services and enterprise-numbers update for 2014-02-16] 2014-02-16 17:00:17 +00:00
epan-int.h
epan.c TFShark (Terminal Fileshark) v.001. Bug 9607 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607) 2014-01-08 04:35:28 +00:00
epan.h TFShark (Terminal Fileshark) v.001. Bug 9607 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607) 2014-01-08 04:35:28 +00:00
epan_dissect.h Avoid including <epan/epan.h> in dissectors. 2013-12-03 23:49:51 +00:00
etypes.h Beginnings of Motrola's MiNT protocol. 2013-10-18 13:09:22 +00:00
ex-opt.c
ex-opt.h
except.c Fix indent (Use 4spaces) and modelines info 2014-01-26 18:24:45 +00:00
except.h Fix indent (Use 4spaces) and modelines info 2014-01-26 18:24:45 +00:00
exceptions.h Don't test for guard-include-define (or how it's called) inside including header. 2013-11-10 11:53:41 +00:00
exntest.c
expert.c Move expert value_string body to expert.c (from expert.h) 2013-12-22 10:52:29 +00:00
expert.h Move expert value_string body to expert.c (from expert.h) 2013-12-22 10:52:29 +00:00
exported_pdu.c Try to fix warning: cast discards '__attribute__((const))' qualifier from pointer target type . 2014-01-06 17:28:49 +00:00
exported_pdu.h Add Logcat to Exported PDU 2014-02-18 11:14:01 +00:00
filter_expressions.c Add missing includes 2013-12-21 17:23:17 +00:00
filter_expressions.h
follow.c Don't cast away constness. 2014-01-14 18:19:31 +00:00
follow.h Fix (-W)documentation error found by Clang 2013-12-02 13:46:30 +00:00
frame_data.c Avoid including <epan/epan.h> in dissectors. 2013-12-03 23:49:51 +00:00
frame_data.h Avoid including definition of column_info structure in dissectors. 2013-12-22 10:41:27 +00:00
frame_data_sequence.c
frame_data_sequence.h
frequency-utils.c
frequency-utils.h
funnel.c
funnel.h
garrayfix.h
gcp.c Try to fix warning: initializer element is not computable at load time. 2014-01-06 17:25:03 +00:00
gcp.h Include <epan/to_str.h> only when needed. 2013-11-09 13:41:10 +00:00
geoip_db.c Don't cast away constness. 2014-01-14 18:19:31 +00:00
geoip_db.h Add extern C if cplusplus (when use with Qt) Add Modelines (and fix indent use 4 spaces for oids.h) 2013-11-17 14:03:17 +00:00
golay.c
golay.h
greproto.h
guid-utils.c Fix some const/ not const warnings. 2013-12-15 12:35:00 +00:00
guid-utils.h Squelch some casting-away-constness warnings. 2014-01-14 03:06:40 +00:00
h225-persistentdata.c
h225-persistentdata.h
iana_snap_pid.h
iax2_codec_type.h
in_cksum.c
in_cksum.h Slap a BSD checksum onto in_cksum.h. 2013-11-22 20:54:30 +00:00
ip_opts.h
ipproto.c
ipproto.h
ipv4.c Include <epan/to_str.h> only when needed. 2013-11-09 13:41:10 +00:00
ipv4.h
ipv6-utils.h Fix warnings found by Clang 5.0 (-Wself-assign and -Wparentheses-equality). 2013-10-16 17:19:59 +00:00
lapd_sapi.h
libwireshark.vcproj
llcsaps.h
next_tvb.c Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new. 2013-11-02 15:52:25 +00:00
next_tvb.h
nlpid.h
oids.c As spotted by Joerg; make a HFILL_INIT(hf) macro and use it to init the private part of the hf structure. 2014-01-19 09:40:04 +00:00
oids.h Don't cast away constness. 2014-01-14 18:35:36 +00:00
oids_test.c First round converting OIDs from emem to wmem. Just internal functions so far. 2013-12-23 20:52:12 +00:00
osi-utils.c
osi-utils.h
oui.h
packet-range.c Constant modifier 'L' not needed; 2013-12-22 15:22:49 +00:00
packet-range.h
packet.c Add remove_last_data_source and fix bug 9169 2014-01-30 22:11:41 +00:00
packet.h Add remove_last_data_source and fix bug 9169 2014-01-30 22:11:41 +00:00
packet_info.h Avoid including definition of column_info structure in dissectors. 2013-12-22 10:41:27 +00:00
params.h
ppptypes.h
prefs-int.h Add a function and an enum to register an uat preference for QT only. 2013-12-09 10:07:33 +00:00
prefs.c Don't cast away constness. 2014-01-14 18:42:54 +00:00
prefs.h Avoid including <epan/addr_resolv.h> in dissectors 2013-12-21 17:24:19 +00:00
print.c Fix display of right arrow in CSV export 2014-01-29 21:32:31 +01:00
print.h Avoid including <epan/epan.h> in dissectors. 2013-12-03 23:49:51 +00:00
print.ps
proto.c Eliminate fvalue_set() in favor of routines that take arguments 2014-01-15 01:05:03 +00:00
proto.h USB: Fix Linux header byte-order 2014-02-04 13:01:23 +00:00
ps.h
ptvcursor.h
radius_dict.l More shorten-64-to-32 warnings. 2013-12-14 19:23:34 +00:00
range.c exceptions.h not needed by tvbuff.h (no much progress because it's needed by proto.h) 2013-11-10 11:48:03 +00:00
range.h Avoid including <epan/range.h> in dissectors. 2013-12-20 23:25:36 +00:00
reassemble.c Add missing includes in order to remove exceptions.h from proto.h (next commit). 2013-11-10 15:59:37 +00:00
reassemble.h Update a comment 2013-10-09 21:59:41 +00:00
reassemble_test.c
reedsolomon.c Add correct license headers for reedsolomon code. 2014-02-12 01:47:48 +00:00
reedsolomon.h Add correct license headers for reedsolomon code. 2014-02-12 01:47:48 +00:00
req_resp_hdrs.c emem -> wmem conversion: 2013-09-22 15:50:55 +00:00
req_resp_hdrs.h
rtp_pt.h
sctpppids.h Update SCTP PPIDs and use newly assigned value. 2013-09-22 17:16:02 +00:00
show_exception.c Add missing includes in order to remove exceptions.h from proto.h (next commit). 2013-11-10 15:59:37 +00:00
show_exception.h
sigcomp-udvm.c Rename a couple of to_str functions to have ep_ in the name. This makes it 2013-12-19 15:49:09 +00:00
sigcomp-udvm.h
sigcomp_state_hdlr.c Rename a couple of to_str functions to have ep_ in the name. This makes it 2013-12-19 15:49:09 +00:00
sigcomp_state_hdlr.h
sminmpec.h
sna-utils.c fix some warnings. 2013-12-21 17:34:41 +00:00
sna-utils.h
stat_cmd_args.c Fix indent (4 spaces) and add modelines 2014-01-05 18:39:35 +00:00
stat_cmd_args.h Fix indent (4 spaces) and add modelines 2014-01-05 18:39:35 +00:00
stats_tree.c Fix indent (Use tabs) and add modelines 2014-01-05 18:39:50 +00:00
stats_tree.h Fix indent (Use tabs) and add modelines 2014-01-05 18:39:50 +00:00
stats_tree_priv.h From Deon van der Westhuysen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452 2013-12-08 11:09:54 +00:00
stream.c Explicitly include emem.h where it is needed 2013-09-13 08:16:50 +00:00
stream.h
strutil.c Move UAT xton() to wsutil library 2014-01-08 00:28:13 +00:00
strutil.h Fix warnings + remove some v. old comment from strutil.h 2013-12-13 23:11:14 +00:00
t35.c
t35.h
tap-voip.h
tap.c Move most of the plugin code from epan to wsutil and remove all 2013-12-02 08:30:29 +00:00
tap.h Make it possible to use have_tap_listener() in a plugin 2014-01-08 15:58:49 +00:00
tfs.c
tfs.h
time_fmt.h Rename base_display_* to field_display 2013-12-07 10:41:42 +00:00
timestamp.c
timestamp.h Add support for displaying dates as year and day-of-year (1-origin). 2013-11-06 20:39:09 +00:00
timestats.c
timestats.h
to_str-int.h Put "private" to_str.c functions to to_str-int.h 2013-11-09 11:26:41 +00:00
to_str.c Drop support of Visual Studio 2005 2014-01-26 12:56:32 +00:00
to_str.h Fix all -fstrict-alias warnings found by gcc 4.1.2 2014-02-03 09:26:10 +00:00
tpg.c Replace all(?) remaining ep_stack occurences with wmem stacks. 2013-12-24 03:29:14 +00:00
tpg.h Replace all(?) remaining ep_stack occurences with wmem stacks. 2013-12-24 03:29:14 +00:00
tvbparse.c tvparse_until() is used, so don't make it static. 2014-01-13 23:03:30 +00:00
tvbparse.h
tvbtest.c Rename some of pint.h macros to match common style (bits number on the end). 2013-11-29 18:59:06 +00:00
tvbuff-int.h - no need for a doubly-linked list of TVBs, single is simpler 2013-09-07 18:20:52 +00:00
tvbuff.c Get rid of tvb_get_faked_unicode() - tvb_get_string_enc() does the job 2014-01-21 09:56:34 +00:00
tvbuff.h Get rid of tvb_get_faked_unicode() - tvb_get_string_enc() does the job 2014-01-21 09:56:34 +00:00
tvbuff_base64.c Move epan/base64.[ch] to wsutil/ with function name change. 2013-12-21 14:38:51 +00:00
tvbuff_composite.c emem -> wmem conversion: 2013-09-22 15:50:55 +00:00
tvbuff_real.c Add missing includes in order to remove exceptions.h from proto.h (next commit). 2013-11-10 15:59:37 +00:00
tvbuff_subset.c (Trivial) 2013-12-22 15:47:17 +00:00
tvbuff_zlib.c Move tvb_uncompress() to tvbuff_zlib.c 2013-12-06 23:23:44 +00:00
uat-int.h Rename struct _uat_t to epan_uat 2013-12-03 21:35:36 +00:00
uat.c Fix all -fstrict-alias warnings found by gcc 4.1.2 2014-02-03 09:26:10 +00:00
uat.h Fix all -fstrict-alias warnings found by gcc 4.1.2 2014-02-03 09:26:10 +00:00
uat_load.l More shorten-64-to-32 warnings. 2013-12-14 19:23:34 +00:00
value_string.c Value_string.h: Minor changes to comment text 2013-12-13 14:39:19 +00:00
value_string.h Value_string.h: Minor changes to comment text 2013-12-13 14:39:19 +00:00
x264_prt_id.h
xdlc.c Rename some of pint.h macros to match common style (bits number on the end). 2013-11-29 18:59:06 +00:00
xdlc.h