aboutsummaryrefslogtreecommitdiffstats
path: root/tap-protocolinfo.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary include: register.hJeff Morriss2010-09-231-4/+3
| | | | svn path=/trunk/; revision=34194
* Have tap listeners specify whether the "packet" routine requiresGuy Harris2009-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | a protocol tree; the column values. This includes stats-tree listeners. Have the routines to build the packet list, and to retap packets, honor those requirements. This means that cf_retap_packets() no longer needs an argument to specify whether to construct the column values or not, so get rid of that argument. This also means that there's no need for a tap to have a fake filter to ensure that the protocol tree will be built, so don't set up a fake "frame" filter. While we're at it, clean up some cases where "no filter" was represented as a null string rather than a null pointer. Have a routine to return an indication of the number of tap listeners with filters; use that rather than the global num_tap_filters. Clean up some indentation and some gboolean vs. gint items. svn path=/trunk/; revision=28645
* From Jakub Zawadzki:Stig Bjørlykke2009-03-151-3/+1
| | | | | | More remove checking for NULL before g_free(). svn path=/trunk/; revision=27728
* Make the column check actually check the information column status.Jaap Keuter2009-01-131-4/+4
| | | | svn path=/trunk/; revision=27222
* Rewrote to use g_strlcpy and g_strlcat.Stig Bjørlykke2008-03-021-2/+2
| | | | svn path=/trunk/; revision=24531
* Have separate proto_construct_match_selected_string() andGuy Harris2006-11-241-1/+2
| | | | | | | | | proto_can_match_selected() routines, to more clearly separate the two functions - but have them both call the same underlying routine, so they both make the same decisions as to whether a match-selected string can be constructed or not. svn path=/trunk/; revision=19976
* Rename proto_construct_dfilter_string() toGuy Harris2006-11-231-2/+1
| | | | | | | | | | | | | | | | | | | proto_construct_match_selected_string() to indicate what it does - and have it return a Boolean indication of whether the string could be built, returning the string through a pointer, and, if that pointer is null, have it just return the Boolean and not construct the string. Get rid of proto_can_match_selected() - proto_construct_match_selected_string() can be used for that, which means we have only one piece of code that knows whether a "match selected" string can be constructed or not. Have proto_construct_match_selected_string() support matching zero-length FT_NONE (and FT_PCRE, but that shouldn't happen) fields even if there's no epan_dissect_t, as such a match just checks whether the field is present. svn path=/trunk/; revision=19967
* Tethereal/tethereal -> TShark/tshark.Gerald Combs2006-05-311-5/+5
| | | | svn path=/trunk/; revision=18268
* Ethereal->WiresharkAnders Broman2006-05-281-5/+5
| | | | svn path=/trunk/; revision=18235
* name changeRonnie Sahlberg2006-05-211-2/+2
| | | | svn path=/trunk/; revision=18197
* add an userdata argument to register_stat_cmd_arg() and its callback to use ↵Luis Ontanon2006-02-111-2/+2
| | | | | | the callback for multiple registrations. svn path=/trunk/; revision=17252
* convert one sprintf into g_snprintf()Ronnie Sahlberg2005-09-011-1/+0
| | | | | | | | at the same time, make proto_construct_dfilter_string() return an emem allocated string. This fixes a tiny memleak in print.c that never freed the string returned by this function. svn path=/trunk/; revision=15651
* Rename epan/stat.[ch] to epan/stat_cmd_args.[ch] - it only deals withGuy Harris2005-08-201-1/+1
| | | | | | | implementing the "-z" command-line arguments, it doesn't deal with *all* issues for stats. svn path=/trunk/; revision=15483
* Move the stats.[ch] stuff into epan, so plugins can use it.Guy Harris2005-08-191-1/+1
| | | | svn path=/trunk/; revision=15429
* Move the APIs for registering and processing "-z" command-line argumentsGuy Harris2005-08-191-1/+2
| | | | | | | | | | | and "Statistics" menu items into "stat.h" and "stat.c", to separate them from the core tapping APIs. A tap could conceivably not register as a "-z" command-line argument or "Statistics" menu item, and a stat could conceivably not be implemented as a tap, and dissectors that implement tapping points don't need the UI-related stuff from "stat.h", they just want the tap-related stuff in <epan/tap.h>. svn path=/trunk/; revision=15427
* Squelch more const warnings (and fix some memory leaks that found).Guy Harris2005-08-061-3/+3
| | | | | | | | | | _U_-ify some unused arguments, rather than assigning them to themselves. Un-constify one variable that gets assigned a mallocated pointer. Clean up indentation. svn path=/trunk/; revision=15236
* Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" asGuy Harris2005-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | it's used to register a callback for a tap listener invoked if the specified command line argument is specified to the "-z" flag. Move it, along with routines to: look up a "-z" argument in the table constructed by "register_tap_listener_cmd_arg()" and either save the full argument to "-z" and the corresponding listener if it's found or return a failure indication if it isn't; list the available tap listeners; call the "init" routines for the tap listeners saved in the table above; and have Ethereal and Tethereal use those routines. svn path=/trunk/; revision=13993
* As we've made the tap_specific_data field of a tap_packet_t structure aGuy Harris2005-01-011-1/+1
| | | | | | | | | | | | | | | const pointer (so that we don't get complaints when we make the tap-specific data argument to "tap_queue_packet()" a const pointer, allowing dissectors to hand const data to a tap without a complaint), we should make the tap per-packet function take a const pointer as an argument as well. Do so. In some taps, use _U_, or actually use the argument, rather than sticking in dummy "X = X" assignments to fake use of parameters. (This means that the tap functions in question no longer have the notion that they act on a particular static structure wired in.) svn path=/trunk/; revision=12910
* Make the tone of the error messages a bit less formal, by usingGuy Harris2004-12-291-1/+1
| | | | | | | contractions. (Safari does, at least when you're trying to open a file to which you don't have read access.) svn path=/trunk/; revision=12852
* Don't blow up if the proto,colinfo tap is used but the columns aren'tGuy Harris2004-10-181-0/+14
| | | | | | being printed. svn path=/trunk/; revision=12335
* Move the tap infrastructure to the epan directory.Guy Harris2004-09-291-1/+1
| | | | svn path=/trunk/; revision=12128
* Set the svn:eol-style property on all text files to "native", so thatGuy Harris2004-07-181-1/+1
| | | | | | | | | they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
* Rename "proto_alloc_dfilter_string()" toGuy Harris2003-05-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "proto_construct_dfilter_string()", to more accurately reflect what it does. Give it, and "proto_can_match_selected()", an "epan_dissect_t *" argument, which replaces the raw data pointer argument to "proto_construct_dfilter_string()". For fields that don't have a type we can directly filter on, we don't support filtering on the field as raw data if: the "epan_dissect_t *" argument is null; the data source tvbuff for the field isn't the tvbuff for the "epan_dissect_t" in question (i.e., it's in the result of a reassembly, and "frame[N:M]" can't get at it). Trim the length the raw data in the case of such a field to the length of the tvbuff for the "epan_dissect_t" in question, so we don't go past it. Fetch the raw data bytes to match from that tvbuff. Have "proto_construct_dfilter_string()" return a null pointer if it can't construct the filter string, and have "protocolinfo_packet()" in the tap-protocolinfo tap ignore a field if "proto_construct_dfilter_string()" can't construct a filter string for it - and have it pass NULL as the "epan_dissect_t *", for now. If somebody decides it makes sense to dump out a "frame[N:M] =" value for non-registered fields, it can be changed to pass "edt". svn path=/trunk/; revision=7635
* Make "register_tap_listener()" return NULL on success and a "GString *"Guy Harris2003-04-231-4/+8
| | | | | | | | | | | | | | | | | | | referring to a GString containing an error message on failure, and don't have it print anything on failure. If it fails, have its Tethereal-tap callers print an error message before exiting, and have its Ethereal callers pop up a dialog box with the error (except in cases where the failure is guaranteed not to be the user's fault, and where we exit, in which case we just print an error message before we exit). In all cases, the error message includes the text of the GString. Fix a scanf format string in the DCE RPC statistics Ethereal tap, so that it properly skips the comma before the filter string. Fix some Ethereal error messages not to say "tethereal". svn path=/trunk/; revision=7542
* Allow taps to have menu item registration routines; the menu itemGuy Harris2003-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | registration routines, for taps with menu items (taps that can be run from the "Tools->Statistics" menu), create the menu item for the tap. "make-tapreg-dotc" constructs a "register_all_tap_menus()" function that calls all the tap menu item registration routines it finds, and Ethereal calls that routine after the main window has been constructed (so that the main menu exists, as the menu items are added to it). (Tethereal doesn't call it.) Get rid of the "menu" and "menu_init" arguments to "register_ethereal_tap"; the menu item is registered in the tap's menu item registration routine, not in its main registration routine. Have the RTP GUI tap register its menu item that way, rather than by having it compiled into "gtk/menu.c". (We're not ready yet to have taps whose menu items are under a submenu register themselves in that fashion, as "register_tap_menu_item()" can't yet create submenus.) svn path=/trunk/; revision=7540
* New tap extension to tethereal: ProtoColInfoRonnie Sahlberg2002-11-041-0/+127
Using this command line option you canb now place any arbitrary display-filter fields on the COL_INFO line. Assume you want NFS dissector in tethereal to put ALL filehandle hashes (nfs.fh.hash) on COL_INFO. No worries, just add -z proto,colinfo,nfs.fh.hash,nfs.fh.hash as a parameter to tethereal. Never again do you need to hack tethereal and recompile just because you want some extra info on the COL_INFO line. svn path=/trunk/; revision=6560