summaryrefslogtreecommitdiff
path: root/epan/uat-int.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-28Qt: Drag/Drop Filter buttons to orderRoland Knall1-0/+6
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-05-16sharkd: export uat records.Jakub Zawadzki1-0/+6
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-01-12uat: add a reset callback.Dario Lombardo1-9/+4
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>
2016-10-01uat: allow insertion of new record at arbitrary indexPeter Wu1-0/+6
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-09-01uat: clarify documentationPeter Wu1-12/+51
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>
2015-12-07Spelling fixes for errors found by lintianBalint Reczey1-1/+1
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-02-15Fix handling of invalid UAT itemsPeter Wu1-0/+3
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-01-12Remove emem APIs from UAT functionality.Michael Mann1-1/+1
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>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(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-02-25Remove trailing whitespaceBill Meier1-3/+3
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>
2013-12-03Rename struct _uat_t to epan_uatJakub Zawadzki1-1/+1
Leave typedef (uat_t) unchanged. svn path=/trunk/; revision=53767
2013-07-25Add a UAT dialog. Make UAT preferences uat_t * instead of void *.Gerald Combs1-3/+13
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-04-22Add a "hidden" array of UAT entry data to allow separation between UAT file ↵Michael Mann1-2/+5
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-17Use also const char to uat_save (identical to uat_load)Alexis La Goutte1-1/+1
svn path=/trunk/; revision=48902
2013-04-07Fix Indent (Replace Tabs by 4-spaces) Fix Trailing Whitespaces Add ModelinesAlexis La Goutte1-24/+37
svn path=/trunk/; revision=48770
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-0/+6
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2012-07-08UATs could be put into "categories". The categories were defined onlyGuy Harris1-1/+1
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-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-10-09Added a button to refresh a UAT from the system defaults (if existing).Stig Bjørlykke1-0/+1
Added a button to clear the list. Added tooltip to some buttons. Removed unused clist code. svn path=/trunk/; revision=39319
2010-03-04From LEGO via bug 3459:Stig Bjørlykke1-1/+2
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
2008-08-05luis.ontanon@gmail.com => luis@ontanon.orgLuis Ontanon1-1/+1
svn path=/trunk/; revision=25937
2008-03-06Added an option to uat_new() to set if configuration shall be saved in theStig Bjørlykke1-0/+1
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
2007-08-28SNMP:Luis Ontanon1-2/+1
- 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-04-23Add some GCC warnings to the standard set, and add some others to theGuy Harris1-4/+4
--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-01Have the prototypes of uat_esc and uat_unesc available to packet-snmp.cLuis Ontanon1-4/+0
svn path=/trunk/; revision=21296
2007-04-01Fix management of lstrings in uat code so that arbitrary chars (even '\0's) ↵Luis Ontanon1-0/+4
can be used inside. Fixes bug 1502 svn path=/trunk/; revision=21294
2007-02-11Have Aply, Cancel and OK buttons instead of the save and ok button.Luis Ontanon1-0/+2
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-07* Add a category param to the uat.Luis Ontanon1-0/+1
* UATify SNMP Users svn path=/trunk/; revision=20736
2007-02-05* Add a help facility for UATsLuis Ontanon1-1/+1
* export help_topic_html() svn path=/trunk/; revision=20717
2007-02-04Move (Up/Down) & Save buttonsLuis Ontanon1-0/+3
svn path=/trunk/; revision=20708
2007-02-03second iteration:Luis Ontanon1-14/+14
* 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-01-29The UAT gui starts to workLuis Ontanon1-1/+1
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-29svn:ignore uat_load.cLuis Ontanon1-0/+2
$Id$ for uat.h uat-int.h svn path=/trunk/; revision=20597
2007-01-29now it is operational.Luis Ontanon1-2/+19
svn path=/trunk/; revision=20595
2007-01-28Although yet untested (but it compiles and is still unused) add UAT to the repo.Luis Ontanon1-0/+67
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