Commit Graph

104 Commits

Author SHA1 Message Date
John Thacker 994669e5b3 UAT: Have a combobox for Dissectors
Add a drop-down combobox for UATs, including User DLTs, that
have a choice of dissectors. Make the combobox editable, which
will provide suggestions, and pass things through to the existing
UAT validation for dissectors. (It's a very long list, especially
with 1717 entries, including 530 just from various BT GATT UUIDs,
so being able to still type it in seems useful.)

Dissectors are not protocols. Rename the UAT field from PROTO to
DISSECTOR where used. Update the column names and long descriptions
to use dissector instead of protocol in dissectors that used this.
There may at some point be UATs that want protocols instead of
dissectors, but that's not what the current behavior does and
none of the current dissectors that use the existing types want.

Update the documentation to use "dissector" instead of "protocol."
Put the names of the actual current three Ethernet dissectors.
Clarify that the "ip" dissector actually tries IPv4 and IPv6,
instead of just IPv4.

UAT entries are backwards and forwards compatible with versions
without this change.

Fix #18836.
2023-02-11 16:40:13 +00:00
João Valverde c5a19582e4 epan: Convert to use stdio.h from GLib
Replace:
    g_snprintf() -> snprintf()
    g_vsnprintf() -> vsnprintf()
    g_strdup_printf() -> ws_strdup_printf()
    g_strdup_vprintf() -> ws_strdup_vprintf()

This is more portable, user-friendly and faster on platforms
where GLib does not like the native I/O.

Adjust the format string to use macros from intypes.h.
2021-12-19 19:29:53 +00:00
Gerald Combs e5eb17d414 UAT: Allow missing fields.
Add uat_set_default_values, which lets us provide default values for
fields that might be missing from the end of a UAT line. Set a default
value for the I/O Graph dialog's Y Axis Factor. Fixes the backward
compatibility issue described in #17623
2021-11-08 22:20:24 +00:00
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
Dr. Lars Völker 8902386c76 UAT: Adding support for uint64 (dec/hex), int64 (dec)
This patch adds 64bit support for uint and int to uats.
2021-01-05 11:20:47 +00:00
Moshe Kaplan e16166a74c Detect and replace bad allocation patterns
Adds a pre-commit hook for detecting and replacing
occurrences of `g_malloc()` and `wmem_alloc()` with
`g_new()` and `wmem_new()`, to improve the
readability of Wireshark's code, and
occurrences of
`g_malloc(sizeof(struct myobj) * foo)`
with
`g_new(struct myobj, foo)`
to prevent integer overflows

Also fixes all existing occurrences across
the codebase.
2020-12-22 14:56:38 +00:00
Dario Lombardo b67b47558d epan: remove redundant casts.
Found by clang-tidy.

Change-Id: Iaf6cf84c33b03ddfcd39a333b49f4987002afa56
Reviewed-on: https://code.wireshark.org/review/31338
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-03 23:39:43 +00:00
Guy Harris 8652762738 Separate signed and unsigned decimal UAT fields.
Most of them are unsigned; do the appropriate fetching, checking, and
writing-to-UAT-file for them.  Have separate macros and routines for the
one signed one, which is the drbid in the LTE MAC dissector.

Use the Wireshark string-to-number routines; they do the appropriate
bounds checking, and make sure unsigned numbers don't start with a -.

Change-Id: I4f137aa31d631c5b5622b2c320574b8ab3333f31
Reviewed-on: https://code.wireshark.org/review/30288
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-20 21:03:51 +00:00
Guy Harris e317421aaa Make uat_fld_chk_num_hex() more like other uat_fld_chk_num routines.
Allow a space after the number.

Return "Invalid value" for strings that aren't valid numbers and "Value
too large" for values that don't fit in a 32-bit integer.

Change-Id: Iff616330968bf434fc7daf822a09ffc4f768105b
Reviewed-on: https://code.wireshark.org/review/30272
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-20 05:59:41 +00:00
Stig Bjørlykke 75c46e80bf Qt: Add copy from another profile in UAT dialogs
Add a new button to UAT dialogs to copy entries from another profile.

Change-Id: I641ba764d8738f738466529d74d4a21ff13075a0
Reviewed-on: https://code.wireshark.org/review/30028
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05 12:38:32 +00:00
Anders c57a52f68c UAT: HEX Values should be allowed the full uint32 range e.g allow 0xffffffff
Change-Id: I13ec13646271bd9de543d02de5c7cbc0d6d02019
Reviewed-on: https://code.wireshark.org/review/29219
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-22 03:57:55 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Michael Mann 5b3e3ee587 Use UAT model for I/O graph
Convert from using TreeWidgetItems to UAT model/delegate.  More of the GUI
is "just handled" within the table.
Required to add support for "colors" and "protocol fields" to UAT types.
Also needed to add some hacks for "custom" UAT field handlers for
backwards compatibility with the existing UAT structure used.

Because UAT functionality was switched completely to the model, some
information in the table was "lost in translation" because the UATs
themselves aren't translated to other languages.

TODO:
2. Better "order of operations"?  A bunch of NULL/size checks needed to be added to prevent crashing.
Now with model/"view" should events/functions be reordered?

Bug: 13585
Change-Id: I2bbba78182317c4fada07b927c05d0c6f4cdc0fe
Reviewed-on: https://code.wireshark.org/review/22766
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-07 17:25:02 +00:00
Roland Knall 8020be30fd Qt: Drag/Drop Filter buttons to order
Allow the ordering of the filter buttons via drag/drop in
the toolbar

Change-Id: Id8793d6514bae36066a7a23d6890985665e753bd
Reviewed-on: https://code.wireshark.org/review/22422
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-28 15:09:03 +00:00
Michael Mann 29e726a606 Add support for "bool" and "display filter" types for UATs.
Filter expressions needs support for a checkbox (bool) and
string field that verifies display filters.

Change-Id: Idfbffd6cdb5abaee8914126a05d890e834c17306
Reviewed-on: https://code.wireshark.org/review/22340
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-22 13:07:11 +00:00
Jakub Zawadzki 400bff055f sharkd: export uat records.
Move gtk's fld_tostr() to epan API as uat_fld_tostr.

Change-Id: I01e3b66ca9ea3cd1e2e06e2122190ee42b9ad44b
Reviewed-on: https://code.wireshark.org/review/21664
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-16 04:27:05 +00:00
Guy Harris 2c44a7f930 Clean up handling of enabled/disabled protocols/heuristic dissectors.
Add a "report a warning message" routine to the "report_err" code in
libwsutil, and rename files and routines appropriately, as they don't
only handle errors any more.

Have a routine read_enabled_and_disabled_protos() that reads all the
files that enable or disable protocols or heuristic dissectors, enables
and disables them based on the contents of those files, and reports
errors itself (as warnings) using the new "report a warning message"
routine.  Fix that error reporting to report separately on the disabled
protocols, enabled protocols, and heuristic dissectors files.

Have a routine to set up the enabled and disabled protocols and
heuristic dissectors from the command-line arguments, so it's done the
same way in all programs.

If we try to enable or disable an unknown heuristic dissector via a
command-line argument, report an error.

Update a bunch of comments.

Update the name of disabled_protos_cleanup(), as it cleans up
information for disabled *and* enabled protocols and for heuristic
dissectors.

Support the command-line flags to enable and disable protocols and
heuristic dissectors in tfshark.

Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df
Reviewed-on: https://code.wireshark.org/review/20966
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 20:40:08 +00:00
Gerald Combs d84577fe1a Yell at the user less.
Our user-facing messages should have a helpful (or at the very least
neutral) tone. In English, exclamation points are neither. Replace a
bunch of them with periods.

Change-Id: I29c3b2f84c25e06aae5b559860224559053a0378
Reviewed-on: https://code.wireshark.org/review/20189
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20 16:53:17 +00:00
Dario Lombardo 805ddd1add uat: add a reset callback.
This function will free the resources allocated by the caller.

Change-Id: Ib486c14e4fd3c321662fb71f7fd06733ce9a64a4
Reviewed-on: https://code.wireshark.org/review/19375
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-12 12:39:15 +00:00
Michael Mann 6a6d7ea34f Convert range API to always use wmem memory.
This is mostly to address memory leaks in range preferences (the biggest
user of range functionality) on shutdown.
Now range preferences must use epan scoped memory when referencing
internal preference structures to keep consistency.

Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157
Reviewed-on: https://code.wireshark.org/review/19387
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-07 00:44:10 +00:00
Peter Wu 7ea363223a uat: allow insertion of new record at arbitrary index
This should make drag-and-drop support (reordering) in Qt easier. It
also ensures that memcpy is used as fallback if copy_cb does not exist.

Change-Id: Iefe358890c49dcda4727054f7a2cee05614a36f6
Reviewed-on: https://code.wireshark.org/review/17992
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-01 12:08:02 +00:00
Peter Wu e7cac432fb uat: clarify documentation
No functional change, fixes typos, adds some meaningful function
parameters and tries to clarify the memory management concerns.

Also fix a -Wdocumentation issue in epan/proto.h

Change-Id: I59d1fcd2ce96178e0a64a0709409a9a7a447c7c6
Reviewed-on: https://code.wireshark.org/review/17431
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-01 19:06:49 +00:00
Gerald Combs 4b403b0b54 Fix UAT escape widths.
Pass unsigned values to the %x format specifier so that naming an IO graph

你好 TCP Segments

doesn't end up saving

"\xffffffe4\xffffffbd\xffffffa0\xffffffe5\xffffffa5\xffffffbd TCP Segments"

to io_graphs. Fixes https://ask.wireshark.org/questions/54781/statistic-io-graph-add-a-new-graph-if-graph-name-use-chinese-it-will-cause-all-graph-name-garbled

Change-Id: I5bcae05ef9b3e17532edbb293f323586c9aeb471
Reviewed-on: https://code.wireshark.org/review/17053
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-08-15 20:37:22 +00:00
Vasil Velichckov bf123efe15 BER: Fix segmentation fault when configuring new OIDs
Program terminated with signal 11, Segmentation fault.
 #0  0x00007f573e5bdecf in uat_fld_chk_oid (u1=0x2eb1830, strptr=0x7f573c8431e4 "", len=0, u2=0x0, u3=0x0, err=0x7ffee1668748) at uat.c:494
 494	    if(strptr[len-1] == '.') {
 (gdb)
 (gdb) bt
 #0  0x00007f573e5bdecf in uat_fld_chk_oid (u1=0x2eb1830, strptr=0x7f573c8431e4 "", len=0, u2=0x0, u3=0x0, err=0x7ffee1668748) at uat.c:494
 #1  0x0000000000485dfc in uat_dlg_cb (win=0x3844290, user_data=0x3632bc0) at uat_gui.c:364
 #2  0x00007f573b2f19a7 in _g_closure_invoke_va (closure=0x3367130, return_value=0x0, instance=0x3844290, args=0x7ffee1668a78, n_params=0,

Change-Id: Ic61480f8c1f2cd833c58de0b2acc24dcb831578f
Reviewed-on: https://code.wireshark.org/review/16800
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-07-31 17:58:28 +00:00
João Valverde 146c4b7016 uat: Fix warnings [-Wcast-qual]
uat_fld_tostr_cb_t callback *out_ptr argument is g_mallocated and
is to be freed by the caller so drop constness requirement to fix
the corresponding g_free warnings.

Change-Id: I1be25fa3e2f54fb32058ac0b5c1631b193b07701
Reviewed-on: https://code.wireshark.org/review/12943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 22:56:34 +00:00
Balint Reczey 9a9b1c9bba Spelling fixes for errors found by lintian
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20
Reviewed-on: https://code.wireshark.org/review/11945
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-07 07:11:54 +00:00
Gerald Combs a25c4841d2 Get rid of a couple of UAT macros.
Declare and fill in some functions normally instead of using macros.

Change-Id: I06323ecf53e0fe8ce7299168984838c87209acc5
Reviewed-on: https://code.wireshark.org/review/11336
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-28 02:40:47 +00:00
Guy Harris 170def9511 Fix escaping of strings in UATs.
Not only must characters that aren't printable ASCII characters be
escaped, backslashes must be escaped (as backslash is an escape
introducer) and double-quotes must be escaped (as double-quotes
encapsulate strings).

When constructing a string to hand to uat_load_str(), escape pathnames,
as they are likely to contain backslashes on Windows, could contain
backslashes on UN*X, and could contain quotes on UN*X and possibly
Windows.  (Arguably, we should escape all the string arguments

Bug: 11372
Change-Id: I594840327fa41895130903c3c612ba97d6c29df3
Reviewed-on: https://code.wireshark.org/review/9716
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-20 17:02:59 +00:00
Peter Wu 4f3646fe62 Fix handling of invalid UAT items
If the UAT file failed a field check, then the user_data pointer may be
empty. As a result uat_save() triggers an invalid write.

(Discovered while working with a dfilter_macros file having duplicate
names for bug 10957, caught by ASAN.)

The second issue fixed in this patch is that the validity of an item is
only calculated when a new record is added. So even if the user edits
the UAT and makes the entry valid, it would not be saved. This is solved
by adding a new uat_update_record() function which got wires up into GTK
and Qt.

Some open-coded g_array_index and UAT[_USER]_INDEX_PTR are also
converted.

Even after this patch, Qt has some issues with UAT handling. In
particular, it saves new, but empty/invalid, items. It also it does not
check individual fields when saving all fields (unlike Gtk). This patch
focused on getting Gtk fixed first so ignores those existing issues.

Change-Id: Ia35cfe9d2b793c65144ae7e29a1ed706b6668d99
Reviewed-on: https://code.wireshark.org/review/7120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-15 23:52:24 +00:00
Guy Harris 44e7ce54ff Remove some apparently-unnecessary includes of emem.h.
Change-Id: Ib7d1b587b439ff21ec6b7f1756ce6ccf25b66f80
Reviewed-on: https://code.wireshark.org/review/6635
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 20:19:05 +00:00
Guy Harris 9f5e4fb7a5 uat_load() and uat_save() return a success indication; use it.
Instead of always ignoring the return value, always check it, and only
report an error if it returns FALSE.

(Alternative: have it return NULL on success and a pointer to a
g_malloc()ed string on failure.)

Fix a comment while we're at it.

Change-Id: Icb72c9f47775b6552e3eb4fe5ddcc85482bfb5fb
Reviewed-on: https://code.wireshark.org/review/6528
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 21:01:28 +00:00
Guy Harris bc23f79729 UAT error string pointers should not be const pointers.
UAT error strings are usually allocated by g_strdup() or
g_strdup_printf(), and must ultimately be freed by the caller.

Make the pointer-to-error-string-pointer arguments to various functions
be "char **", not "const char **".

Fix cases that finds where a raw string was being used, as that won't
work if you try to free it; g_strdup() it instead.

Add a missing free of an error string.

Remove some no-longer-necessary casts.

Remove some unnecessary g_strdup()s (the string being handed to it was
already g_malloc()ated).

Change some variable declarations to match.

Put in XXX comments for some cases where the error string is just freed,
without being shown to the user.

Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
Reviewed-on: https://code.wireshark.org/review/6525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 20:20:03 +00:00
Michael Mann 7967ef9510 Remove emem APIs from UAT functionality.
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856
Reviewed-on: https://code.wireshark.org/review/6460
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-12 14:25:12 +00:00
Bill Meier 9145acb68a uat: tighten up dec/hex uat field validity checking
Specifically:
- Use the proper code for testing strtol() result;
- Also: Values greater than 32-bits treated as an error
   (on LP64 architectures);

Change-Id: I56e8e734fbb9a22dbd9ed4112e24327ffd7ee3c0
Reviewed-on: https://code.wireshark.org/review/5394
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Petri-Dish: Bill Meier <wmeier@newsguy.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-20 13:47:13 +00:00
Guy Harris 033f096ee9 Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which
we weren't always doing before).

Change-Id: Ieceb93029252f646397b6488f2df8a57c6d2a23d
Reviewed-on: https://code.wireshark.org/review/4794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 23:11:18 +00:00
Evan Huus 39a14ab75f Remove now-unused functions.
Change-Id: Iecf230d493b31ecab25b33c67323987459b23bd7
Reviewed-on: https://code.wireshark.org/review/2242
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-16 15:19:48 +00:00
AndersBroman 3157bf6ba5 isprint() -> g_ascii_isprint()
Change-Id: Ia586ef8ce500d5fc7578c52014206fa7a7eaea41
Reviewed-on: https://code.wireshark.org/review/1624
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-13 16:14:07 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Jakub Zawadzki d28084d183 Move UAT xton() to wsutil library
Use ws_xton() in few more places.

svn path=/trunk/; revision=54642
2014-01-08 00:28:13 +00:00
Jakub Zawadzki 4cf7cdd387 fix some warnings.
svn path=/trunk/; revision=54334
2013-12-21 17:34:41 +00:00
Martin Kaiser 852d93afa7 comment out unused function
svn path=/trunk/; revision=54284
2013-12-20 07:57:02 +00:00
Anders Broman 5fbfa6c351 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54280
2013-12-20 06:30:13 +00:00
Irene Rüngeler 85d84776b8 Use PT_TXTMOD_NONE for columns that should not be editable.
svn path=/trunk/; revision=53906
2013-12-10 15:33:07 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Michael Mann 4a1bd75b60 Add a "hidden" array of UAT entry data to allow separation between UAT file syntax errors and "syntactically correct, but invalid field". Now UAT files load all entries into the "hidden" array (raw_data), but only adds valid ones to the user_data, which is used by the dissectors.
This is a start to fixing bug 7471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471) and is being committed to get the new ABI/API in before the 1.10 release.
What remains is the "GUI portion" (GTK+qt) to indicate to users which UAT entries are invalid.

svn path=/trunk/; revision=48960
2013-04-22 02:10:49 +00:00
Alexis La Goutte 101489f386 Use also const char to uat_save (identical to uat_load)
svn path=/trunk/; revision=48902
2013-04-17 19:39:11 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Anders Broman 84241f46ad From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48399
2013-03-18 20:44:36 +00:00