Commit Graph

37 Commits

Author SHA1 Message Date
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +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
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
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
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
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
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
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
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
Alexis La Goutte 3170f2e418 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^ \*  \$Id\$/,+1 d') (Double space between star and $Id$)

Change-Id: If9b8f345e3b6493de0b573600e60005c8b0b33c3
Reviewed-on: https://code.wireshark.org/review/877
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 15:59:51 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jakub Zawadzki bf0de4310b Rename struct _uat_t to epan_uat
Leave typedef (uat_t) unchanged.

svn path=/trunk/; revision=53767
2013-12-03 21:35:36 +00:00
Gerald Combs a05f55bffc Add a UAT dialog. Make UAT preferences uat_t * instead of void *.
C++-ize the UAT headers.

Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT
dialogs.

Update the Qt README.

svn path=/trunk/; revision=50896
2013-07-25 23:49:47 +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
Alexis La Goutte b828c33c23 Fix Indent (Replace Tabs by 4-spaces) Fix Trailing Whitespaces Add Modelines
svn path=/trunk/; revision=48770
2013-04-07 15:57:28 +00:00
Balint Reczey 1ebdb2e521 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
2013-03-01 23:53:11 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Stig Bjørlykke 4938502ee0 Added a button to refresh a UAT from the system defaults (if existing).
Added a button to clear the list.
Added tooltip to some buttons.
Removed unused clist code.

svn path=/trunk/; revision=39319
2011-10-09 09:55:14 +00:00
Stig Bjørlykke 2f8830b4d0 From LEGO via bug 3459:
Add a callback to UAT to be called after the table has being updated,
use it to renew the snmp_ue_cache.

svn path=/trunk/; revision=32112
2010-03-04 12:50:18 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +00:00
Stig Bjørlykke fdc980e79d Added an option to uat_new() to set if configuration shall be saved in the
selected profile.

Don't save SMI Paths and SMI Modules in the profiles because reloading
currently doesn't work (bug 2309).

svn path=/trunk/; revision=24580
2008-03-06 22:13:24 +00:00
Luis Ontanon dfbac00752 SNMP:
- As noted by Thomas Anders values are not added to the tree anymore. Move the calling of subdissectors to the end of the function, so that the value is added to the tree.
 - add port 8161 to be decoded as SNMP (hey, it's on IANA's services file!)
UAT:
 - do not have the uat reloaded.
OIDS:
 - do not complain if renaming an OID to an identical name



svn path=/trunk/; revision=22704
2007-08-28 15:18:32 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Luis Ontanon 53d3904a28 Have the prototypes of uat_esc and uat_unesc available to packet-snmp.c
svn path=/trunk/; revision=21296
2007-04-01 16:02:41 +00:00
Luis Ontanon b2e5988e63 Fix management of lstrings in uat code so that arbitrary chars (even '\0's) can be used inside.
Fixes bug 1502


svn path=/trunk/; revision=21294
2007-04-01 14:55:25 +00:00
Luis Ontanon 5db2005993 Have Aply, Cancel and OK buttons instead of the save and ok button.
Have these buttons reloading the capture file if needed.
Some rearrangement of the window (the editor is still missing "ornaments" and tooltips)


svn path=/trunk/; revision=20788
2007-02-11 16:09:21 +00:00
Luis Ontanon 2006fac500 * Add a category param to the uat.
* UATify SNMP Users


svn path=/trunk/; revision=20736
2007-02-07 14:54:35 +00:00
Luis Ontanon 2b22bcb1a3 * Add a help facility for UATs
* export help_topic_html()


svn path=/trunk/; revision=20717
2007-02-05 05:06:21 +00:00
Luis Ontanon fbc8912b87 Move (Up/Down) & Save buttons
svn path=/trunk/; revision=20708
2007-02-04 05:19:02 +00:00
Luis Ontanon d70a58f881 second iteration:
* fields of an uat table now are passed using an array of uat_filed_t
* field callbacks take two more userdata arguments
* add some macros to define uat field callbacks.
* uats can be registered as preferences for a specific protocol
   - the preference widget is a button that opens the uat's window
* dfilter-macro => reflect changes to API


svn path=/trunk/; revision=20695
2007-02-03 14:25:02 +00:00
Luis Ontanon 6a4a51ffec The UAT gui starts to work
set the macros_dlg to use it

add a dummy dfilter_macros file to supress a warning at startup


svn path=/trunk/; revision=20598
2007-01-29 10:23:38 +00:00
Luis Ontanon 6fe845c1b4 svn:ignore uat_load.c
$Id$ for uat.h uat-int.h


svn path=/trunk/; revision=20597
2007-01-29 05:02:14 +00:00
Luis Ontanon 5af746016a now it is operational.
svn path=/trunk/; revision=20595
2007-01-29 04:47:58 +00:00
Luis Ontanon 88e699977c Although yet untested (but it compiles and is still unused) add UAT to the repo.
UAT is an API to handle User Accessible Tables,
an UAT is basically an array of arbitrary structs that has a file representation
as a mean for mantaining things like:
- the snmp_users_table
- dfilter macros
- ipsec/ssl key bindings
- k12 configuration,
- and many other table-like user modifiable preferences

comming soon gtk's uat_window() and prefs_add_uat()

uat.h is fairly doc[uo]m[m]?ented, a README with a simple example of how is to be used will be available as I write them


svn path=/trunk/; revision=20586
2007-01-28 10:31:32 +00:00