Commit Graph

48646 Commits

Author SHA1 Message Date
Stig Bjørlykke 6263037e75 One small step towards fixing the broken python support.
Support Python 3.

svn path=/trunk/; revision=51862
2013-09-09 06:04:46 +00:00
Stig Bjørlykke 8175865785 Added casts in dissector_delete_all_check().
svn path=/trunk/; revision=51861
2013-09-09 05:51:35 +00:00
Stig Bjørlykke 9c3487a569 Added DissectorTable_set and DissectorTable_remove_all to simplify changing
registered port numbers in PROTO.prefs_changed.

Now we only need this code in Lua plugins having port numbers prefs:

PROTO.prefs.ports = Pref.range ("Ports", 0, "Port numbers", 65535)

PROTO.prefs_changed()
  local udp_table = DissectorTable.get ("udp.port")
  udp_table:set (PROTO.prefs.ports, PROTO)
end

svn path=/trunk/; revision=51860
2013-09-09 05:45:24 +00:00
Stig Bjørlykke 2b698e5c5f Added dissector_delete_all() to remove all entries from a dissector table.
svn path=/trunk/; revision=51859
2013-09-09 05:36:45 +00:00
Michael Mann e4025f4aba Add an example of filterable expert info.
Also cleanup references to README.developer that are now README.dissector.

svn path=/trunk/; revision=51858
2013-09-09 03:43:45 +00:00
Michael Mann 25bb947bdb Have conversion tools use the "new" expert_add_info_format.
svn path=/trunk/; revision=51857
2013-09-09 02:19:27 +00:00
Gerald Combs 829c1ed25e Add the TCP window scaling graph. Add zoom selections.
Rename some methods. Add the ability to toggle time and sequence number
origins. Add more keyboard shortcuts. Comment out abs_secs abs_usecs in
the segment struct since it looks like we aren't using them. Make sure
we stay in the same TCP stream.

svn path=/trunk/; revision=51856
2013-09-09 01:40:06 +00:00
Bill Meier 077d252fd9 Revert #51843: Build fails on OSX-10.5-x8
svn path=/trunk/; revision=51855
2013-09-09 01:23:06 +00:00
Chris Maynard eeba21136c OK, allow either positive or negative offsets no matter if we're chopping from the beginning or the end.
Given the following example, it's now possible to chop the 10 bytes depicted from the 100 byte packet 4 different ways and achieve the exact same results:

    <-------- 100 -------->       Methods:
                                  1) editcap -C 20:10 in.pcap out.pcap
    +------+----+---------+       2) editcap -C -80:10 in.pcap out.pcap
    |  20  | 10 |   70    |       3) editcap -C -70:-10 in.pcap out.pcap
    +------+----+---------+       4) editcap -C 30:-10 in.pcap out.pcap


svn path=/trunk/; revision=51854
2013-09-09 01:04:13 +00:00
Michael Mann bffe25fdc2 Complete the conversion of expert_add_info_format_text -> expert_add_info_format.
svn path=/trunk/; revision=51853
2013-09-09 01:02:44 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann 00dd0adc0d expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51851
2013-09-09 00:28:48 +00:00
Michael Mann 7ec34a52c5 expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51850
2013-09-09 00:11:19 +00:00
Michael Mann a50c42821d expert_add_info_format_text -> expert_add_info_text
svn path=/trunk/; revision=51849
2013-09-08 23:47:06 +00:00
Chris Maynard ba3a77bb9a Specify the optional offset as a positive value, regardless of chopping from packet beginning or packet end. I *think* this will be easier syntax to remember.
svn path=/trunk/; revision=51848
2013-09-08 21:35:24 +00:00
Pascal Quantin f54441c125 Add a chunk forgotten in r51846
svn path=/trunk/; revision=51847
2013-09-08 21:22:11 +00:00
Pascal Quantin a6ae13dee9 Slightly different fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9117 :
Check that tvb returned by dissect_per_bit_string is not null before trying to use it

svn path=/trunk/; revision=51846
2013-09-08 21:10:36 +00:00
Chris Maynard 54adc0d2ff Allow an optional offset to be specified when chopping bytes from packets.
svn path=/trunk/; revision=51845
2013-09-08 20:29:26 +00:00
Michael Mann 1b009df749 Couldn't quite figure out how to make the expert items in proto.c and the LUA API filterable (suggestions welcome!), but I wanted to start forcing dissectors to use the filterable expert API (nothing like compile errors to force change!). I created expert_add_info_format_internal (original expert_add_info_format) and used it as a placeholder for proto.c/LUA API until a solution is created. The "new" expert_add_info_format will be the "old" expert_add_info_format_text, and I'll slowly do the search/replace.
For those with dissectors outside the source tree, please see tools/convert_expert_add_info_format.pl for help with the conversion.  Please do not use expert_add_info_format_internal, as it's support time will be very short lived.

svn path=/trunk/; revision=51844
2013-09-08 19:32:10 +00:00
Bill Meier fb75b6867e Use a bunch of #includes only when apparently needed.
svn path=/trunk/; revision=51843
2013-09-08 19:25:36 +00:00
Michael Mann 15f1dd9b90 Convert malformed ("protocol") expert infos into something filterable. Not sure if "malformed.expert" is more confusing than helpful, but I didn't want it to share with the "malformed" display filter because their underlying types are different (FT_PROTOCOL vs FT_NONE). The ".expert" has been my convention when a condition already has a well-named hf_ display filter, but also has expert info associated with it.
Also removed the commented out calls to expert_add_info_format to avoid confusion, but left the comments noting the reason it's absent.

svn path=/trunk/; revision=51842
2013-09-08 18:35:36 +00:00
Michael Mann f746c09862 Convert profinet dissector to use filterable expert info.
NOTE: Some of the expert group values may need to be checked, PI_UNDECODED doesn't always seem like the right choice.  I thought PI_PROTOCOL should be used more.


This concludes the conversion expert_add_info_format for all dissectors (where the function isn't commented or #defined out).  Onto the "internal" (epan/lua) uses of the call.

svn path=/trunk/; revision=51841
2013-09-08 16:23:33 +00:00
Evan Huus 5f7187c658 Cycle the recycler in realloc() and free() as well, reducing memory usage of the
stress-test by another ~10%.

svn path=/trunk/; revision=51840
2013-09-08 15:18:55 +00:00
Evan Huus 720935ca04 Fix "seq_base could be used unitialized" warning. We should probably enable
-Werror for the qt code...

svn path=/trunk/; revision=51839
2013-09-08 15:05:08 +00:00
Evan Huus 2210020704 Restore some format arguments that were accidentally dropped.
svn path=/trunk/; revision=51838
2013-09-08 14:55:36 +00:00
Gerald Combs ea42adeb46 [Automatic manuf, services and enterprise-numbers update for 2013-09-08]
svn path=/trunk/; revision=51835
2013-09-08 14:03:41 +00:00
Michael Mann da96b71c95 Add filterable expert info to generated X11 dissector. I didn't regenerate the dissector files, but did manually update the source (tools/process-x11-xcb.pl) so any future regeneration won't lose the changes.
svn path=/trunk/; revision=51834
2013-09-08 13:54:07 +00:00
Michael Mann 306a110ed6 Add filterable expert info to NCP dissector.
svn path=/trunk/; revision=51833
2013-09-08 13:35:57 +00:00
Gerald Combs abdac5bfac Add the TCP RTT graph.
Show the time values in ms instead of s. Add a button and keyboard
shortcut to switch the connection direction. Move more code to
tap-tcp-stream.c. Update our axis labels.

svn path=/trunk/; revision=51832
2013-09-08 01:25:27 +00:00
Michael Mann cc26962f96 Batch of filterable expert info
svn path=/trunk/; revision=51831
2013-09-08 00:47:15 +00:00
Evan Huus 57c28aeffd Fix the FSF address in the license header for the new ASN.1 dissectors.
svn path=/trunk/; revision=51830
2013-09-07 22:12:24 +00:00
Evan Huus 2fd0b974f7 Ignore licensing in the macosx packaging - it's all copied from Inkscape (GPL)
as far as I can tell, so it doesn't have our headers.

svn path=/trunk/; revision=51829
2013-09-07 22:06:19 +00:00
Evan Huus 9507f56495 Fix lua docstring causing the buildbot's documentation step to fail.
svn path=/trunk/; revision=51828
2013-09-07 22:00:02 +00:00
Evan Huus 9fd46c37a8 - no need for a doubly-linked list of TVBs, single is simpler
- support merging chains in tvb_add_to_chain
- when we have an old reassembled TVB, just merge the chains rather than
  freeing it (we may still need it as it may already be a data source)
- modelines

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

#BACKPORT, but it's gonna be messy...

svn path=/trunk/; revision=51825
2013-09-07 18:20:52 +00:00
Stig Bjørlykke 6a4364bb40 Added pinfo.can_desegment to lua script.
This fixes bug 5205.

svn path=/trunk/; revision=51824
2013-09-07 18:04:35 +00:00
Michael Mann 17fbd9028a Batch of filterable expert info
svn path=/trunk/; revision=51823
2013-09-07 16:07:02 +00:00
Evan Huus e746a01ce8 Display GTPv2 Area Code fields (which show up in some DIAMETER AVPs) as
BASE_HEX_DEC instead of just BASE_DEC.

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

svn path=/trunk/; revision=51822
2013-09-07 13:56:25 +00:00
Evan Huus e69ec10794 Callers of tvb_per_bit_string expect that the returned value_tvb is non-NULL.
Ensure that is the case even in certain peculiar error conditions, by filling it
with a 0-length subset TVB. Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9117

Also add modelines.

svn path=/trunk/; revision=51821
2013-09-07 13:48:13 +00:00
Evan Huus a1d88c4620 Fix a few more places that didn't have a semicolon after the address-macro use.
svn path=/trunk/; revision=51820
2013-09-07 13:22:58 +00:00
Evan Huus 2e299ec910 Add modelines, use consistent indentation in address.h
Use the "do { } while (0)" trick to make the macros behave like regular function
calls syntatically.

Fix one dissector that wasn't using semicolons after the macro calls.

svn path=/trunk/; revision=51819
2013-09-07 12:51:29 +00:00
Stig Bjørlykke 7d3d67407c Added support for a "prefs_change" function in Lua scripts, which is called
when the preferences for the dissector are changed.

This is not a 100% correct implementation at the time because the
prefs_changed function in all Lua plugins will be called whenever
a preference in a single Lua plugin is changed.

svn path=/trunk/; revision=51818
2013-09-07 11:27:38 +00:00
Stig Bjørlykke a8638eec90 Added support for integer range in DissectorTable_add and DissectorTable_remove.
This was requested in bug 6762.

svn path=/trunk/; revision=51817
2013-09-07 11:07:18 +00:00
Stig Bjørlykke 452bfe4ce0 A small documentation fix for DissectorTable_remove.
svn path=/trunk/; revision=51816
2013-09-07 11:01:52 +00:00
Stig Bjørlykke 6b93b0e1dc Added syntax and range checks for Lua Prefs.range default values.
Fixed some small memory leakages.

svn path=/trunk/; revision=51815
2013-09-07 10:56:52 +00:00
Martin Kaiser 071f89e3b3 coverity 1047692: check return value of inet_pton()
svn path=/trunk/; revision=51814
2013-09-07 10:02:46 +00:00
Martin Kaiser c4f5a942d7 trivial: fix a typo
svn path=/trunk/; revision=51813
2013-09-07 09:03:21 +00:00
Pascal Quantin f974c74fd8 From Tyson Key via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9105 :
Add additional PN532 opcodes, and update USB CCID dissector to skip status word in PN532 responses

svn path=/trunk/; revision=51812
2013-09-07 08:03:32 +00:00
Gerald Combs 2dca89e7a3 Only add data points to the throughput graph if our time window has
advanced. Add a reset button.

svn path=/trunk/; revision=51811
2013-09-07 03:51:27 +00:00
Gerald Combs f9a9753d01 Fix PacketList::goToPacket work correctly. Minor screen graph
improvements.

svn path=/trunk/; revision=51808
2013-09-07 00:33:41 +00:00
Gerald Combs ac93afc00b Use "recode" to convert HTML entities to UTF-8 if it's available.
svn path=/trunk/; revision=51806
2013-09-07 00:18:10 +00:00