aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-26Batch of filterable expert infos.Michael Mann1-5/+14
svn path=/trunk/; revision=49584
2013-05-15Un-shadow a couple of variables.Gerald Combs1-3/+3
svn path=/trunk/; revision=49317
2013-05-15- Use the key for comparison of per_proto_data.Anders Broman1-0/+16
- Show the number of per-packet-data entries and which protocol has made entries in the frame. svn path=/trunk/; revision=49313
2013-04-23Add curr_layer_num which can be used to keep track of multiple occurances of ↵Anders Broman1-0/+1
the same protocol in a frame. svn path=/trunk/; revision=48997
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48426
2013-02-27Move show_exception() and show_reported_bounds_error() toGuy Harris1-121/+5
epan/show_exception.c, as it's used outside epan/dissectors/packet-frame.c. Update their callers to include <epan/show_exception.h> to get their declaration. Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if there's more stuff in the packet to dissect after the dissector call that threw the exception, doesn't mean you shouldn't go ahead and dissect that stuff. Use it in all those cases, including ones where BoundsError was inappropriately being caught (you want those passed up to the top level, so that the packet is reported as having been cut short in the capture process). Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that correspond to running past the end of the data for a tvbuff; use it rather than explicitly catching those exceptions individually, and rather than just catching all exceptions (the only place that DissectorError should be caught, for example, is at the top level, so dissector bugs show up in the protocol tree). Don't catch and then immediately rethrow exceptions without doing anything else; just let the exceptions go up to the final catcher. Use show_exception() to report non-fatal errors, rather than doing it yourself. If a dissector is called from Lua, catch all non-fatal errors and use show_exception() to report them rather than catching only ReportedBoundsError and adding a proto_malformed item. Don't catch exceptions when constructing a trailer tvbuff in packet-ieee8023.c - just construct it after the payload has been dissected, and let whatever exceptions that throws be handled at the top level. Avoid some TRY/CATCH/ENDTRY cases by using checks such as tvb_bytes_exist() before even looking in the tvbuff. svn path=/trunk/; revision=47924
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-12-22Fox copy-and-paste error.Michael Tüxen1-2/+2
svn path=/trunk/; revision=46701
2012-12-22Add support for displaying the Packet Block Flags Word of pcapng.Michael Tüxen1-1/+144
svn path=/trunk/; revision=46698
2012-10-29Add a comment noting that on Windows theBill Meier1-0/+10
"use of window's own __try {} __finally {} and __except {} mechanism" along with "macros based on kazlib's exception code" has problems and does not always work properly. svn path=/trunk/; revision=45831
2012-09-23Store pointers to previously displayed and captured packet, not nstime_t deltas.Jakub Zawadzki1-6/+18
This commit reduces size (from 144B to 128B on AMD64) of frame_data structure. Part of bug 5821: Reduce per-packet memory requirements. svn path=/trunk/; revision=45071
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-03MT: move global frame_end_routines to packet_info.Jakub Zawadzki1-8/+6
svn path=/trunk/; revision=44748
2012-07-22Update display filter names per Bug 2794. Part 1 of many.Michael Mann1-1/+1
svn path=/trunk/; revision=43907
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-06From Stephen Donnelly: Correct ERF name, add WTAP_ENCAP string display ↵Anders Broman1-6/+25
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7313 svn path=/trunk/; revision=43141
2012-05-03General cleanup to include:Bill Meier1-68/+95
- remove unneeded includes; - remove "boilerplate" comments; - reformat hf[] entries; - reformat long lines; - unneeded use of check_col(); - whitespace fixes. svn path=/trunk/; revision=42402
2012-04-18Show WIRETAP_ENCAnders Broman1-0/+7
svn path=/trunk/; revision=42126
2012-04-06Indicate where BACnet MS/TP is specified.Guy Harris1-1/+1
Add a new WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR encapsulation type, for use by the EyeSDN file reader; unlike the pcap-encapsulated MS/TP, it includes a direction indicator. Don't treat WTAP_ENCAP_BACNET_MS_TP as if it has a direction indicator, as it doesn't; instead, do that for WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR. Add some missing entries to encap_table_base for WTAP_ENCAP_ values that didn't get entries added. svn path=/trunk/; revision=41969
2012-04-05WTAP_ENCAP_MTP2 is for MTP2 *without* a pseudo-header giving directionGuy Harris1-1/+0
or other information; WTAP_ENCAP_MTP2_WITH_PHDR is for MTP2 *with* such a pseudo-header. Use WTAP_ENCAP_MTP2_WITH_PHDR for the EyeSDN captures, and don't assume there's a pseudo-header if you have WTAP_ENCAP_MTP2. svn path=/trunk/; revision=41962
2012-04-04From Rolf Fiedler:Anders Broman1-0/+4
Patch to add V5.2 tracing capability on E1 links using EyeSDN probes. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7027 Removed preference related stufff as it's not needed. svn path=/trunk/; revision=41915
2012-03-02Use the expert system to show packet comments.Anders Broman1-2/+5
The packet comment widget should be replaced by a ListView with two columns, packet no and Comment. svn path=/trunk/; revision=41322
2012-02-25Add a presence flag field to the packet information structure filled inGuy Harris1-38/+49
by Wiretap, to indicate whether certain fields in that structure actually have data in them. Use the "time stamp present" flag to omit showing time stamp information for packets (and "packets") that don't have time stamps; don't bother working very hard to "fake" a time stamp for data files. Use the "interface ID present" flag to omit the interface ID for packets that don't have an interface ID. We don't use the "captured length, separate from packet length, present" flag to omit the captured length; that flag might be present but equal to the packet length, and if you want to know if a packet was cut short by a snapshot length, comparing the values would be the way to do that. More work is needed to have wiretap/pcapng.c properly report the flags, e.g. reporting no time stamp being present for a Simple Packet Block. svn path=/trunk/; revision=41185
2012-02-11Add the abillity to read and write option comments unedited.Anders Broman1-7/+33
This is POC we may want to have more efficient use of the frame data structure etc. But this allows for work to be done on the GUI to actually add comments. svn path=/trunk/; revision=40969
2012-01-30Revert 40772: the abort() needs to be pushed higher (into packet.c?) soJeff Morriss1-3/+0
checkapi remains happy; thus far my attempts at that aren't working. svn path=/trunk/; revision=40773
2012-01-30If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set, abort() out if we happened toJeff Morriss1-0/+3
catch a DissectorError exception. (I found this useful when debugging a "More than 1000000 items in the tree" DissectorError.) svn path=/trunk/; revision=40772
2012-01-15Rename crypt-xxx to xxxJörg Mayer1-1/+1
svn path=/trunk/; revision=40511
2011-11-28Use __except(EXCEPTION_EXECUTE_HANDLER) rather than __except(TRUE);Bill Meier1-2/+2
Strictly speaking, it appears that __except(EXCEPTION_EXECUTE_HANDLER) rather than __exept(TRUE) should be used altho in actuality there's no difference since TRUE (as defined by GLIB) == EXCEPTION_EXECUTE_HANDLER. svn path=/trunk/; revision=40022
2011-11-21Another case of written to only variable.Jörg Mayer1-5/+0
svn path=/trunk/; revision=39967
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-1/+1
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-08-13From Edwin Groothuis via bug 6179:Stig Bjørlykke1-0/+8
Added Time Shift functionality. From me: Renamed to use "Time Shift" everywhere + some other minor cleanups. svn path=/trunk/; revision=38510
2011-08-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...Bill Meier1-1/+0
svn path=/trunk/; revision=38413
2011-04-23Use orginal nsstime_t structures (without copying).Jakub Zawadzki1-16/+7
svn path=/trunk/; revision=36829
2011-04-15From Edwin Groothuis via bug #5833: Make number of bits in Frame headerStephen Fisher1-4/+14
optional svn path=/trunk/; revision=36652
2011-02-12The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's noGuy Harris1-1/+0
pseudo-header, and hence there's no direction indication. Don't set pinfo->p2p_dir for it. Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction. Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when setting the info column in various Bluetooth dissectors; it might be unknown. In the HCI H4 dissector, put the direction into the info column regardless of whether we have a type match or not; the dissectors for HCI packet types appear to assume it's been set (as they put a blank at the beginning of the stuff they append to the direction). svn path=/trunk/; revision=35933
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-06-09Do some constifying [or other] based upon gcc -Wwrite-strings warnings.Bill Meier1-1/+1
svn path=/trunk/; revision=33198
2010-01-08Changes to use consistent indentation.Bill Meier1-206/+206
svn path=/trunk/; revision=31470
2009-12-19Oops, back out my little test change.Guy Harris1-4/+0
svn path=/trunk/; revision=31320
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-1/+5
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL == (int)BASE_NONE, so there's no source or binary compatiblity issue, although we might want to eliminate BASE_NONE at some point and have the BASE_ values used with integral types start at 0, so that you can't specify BASE_NONE for an integral field. svn path=/trunk/; revision=31319
2009-12-17Introduce "Ignore Packet" in the packet list.Stig Bjørlykke1-0/+15
This will remove the package from the dissection functions without removing it from the capture file. svn path=/trunk/; revision=31287
2009-11-29From enhancement bug #4272: Patch to add new filterable field -Stephen Fisher1-0/+15
frame.time_epoch svn path=/trunk/; revision=31110
2009-11-25Show the number of bits captured and on the wire. Use unsigned ints.Gerald Combs1-6/+12
svn path=/trunk/; revision=31074
2009-09-21Store 'color_filter' as const in 'frame_data'Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30051
2009-09-07Store the packet encapsulation type as gint8. Saves 3 bytes per packetKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29767
2009-09-06We track all protocols that appear in each packet in the frame dissector. ↵Kovarththanan Rajaratnam1-12/+16
This is an expensive operation because we: * Disable the TRY_TO_FAKE_THIS_ITEM optimization * Use GString to store the protocols We should only do this if the 'hf_frame_protocols' is referenced (unlikely) svn path=/trunk/; revision=29733
2009-09-06The frame dissector disables the TRY_TO_FAKE_THIS_ITEM() optimization by ↵Kovarththanan Rajaratnam1-5/+6
marking the protocol tree as permamently visible. It only needs to disable the optimization temporarily while it creates the protocol item it intends to use proto_item_append_string() on svn path=/trunk/; revision=29730
2009-08-15The frame dissector contains a kludge to workaround the fact that the ↵Kovarththanan Rajaratnam1-20/+12
Protocol Hierarchy stats tap always needs the protocol node to appear even though no color, display filter etc. reference it. This is no longer needed due to r29380. svn path=/trunk/; revision=29428
2009-08-03(Trivial) Fix two typos.Bill Meier1-1/+1
svn path=/trunk/; revision=29271
2009-07-22Get rid of check_col() in some of the more frequently used dissectors.Anders Broman1-19/+12
svn path=/trunk/; revision=29170