Commit Graph

32 Commits

Author SHA1 Message Date
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

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


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +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 0776754488 Some improvements to the bundle protocol:
1. Cleanly break out Convergence Layer Protocol (TCPCL) into its own (new-style) pure dissector.
2. Make Bundle dissection into a new style dissector and clean so that it can be called using call_disssector.
3. Use tcp_dissect_pdus for TCPCL protocol instead of "manual" while loop.  This allows contact header to benefit from TCP fragmentation.
4. Make time fields use time field types so they can be filterable.
5. A few functions were move to remove need for static declaration at top of file.
6. Remove pri_hdr_procflags global variable.

Next up - making more fields filterable.

svn path=/trunk/; revision=51337
2013-08-13 11:37:27 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Michael Mann ea177a2575 Batch of filterable expert infos
svn path=/trunk/; revision=49596
2013-05-27 17:30:43 +00:00
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Bill Meier 959ae3d687 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).


svn path=/trunk/; revision=47391
2013-01-31 18:35:06 +00:00
Bill Meier c929e42eb4 Fix various instances of unused hf[] entries found
by checkhf.

svn path=/trunk/; revision=47312
2013-01-26 22:43:34 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Anders Broman 67c79aea50 From Evan Huus: Catch impossible sub-field counts. Fixes LTP infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7124
svn path=/trunk/; revision=42121
2012-04-18 05:24:32 +00:00
Chris Maynard d528b4b0f1 Fix some duplicate display filter names.
svn path=/trunk/; revision=40614
2012-01-20 20:20:40 +00:00
Chris Maynard b97844bcaa Fix LTP multiple bundle bug and allow LTP/DCCP. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5035
svn path=/trunk/; revision=40325
2011-12-29 16:22:02 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly 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-10-04 22:44:31 +00:00
Bill Meier ad1efb6b9c (Trivial) Remove trailing whitespace from lines for a few files.
svn path=/trunk/; revision=39084
2011-09-21 23:42:55 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Guy Harris 6b38961a95 Instead of going over the Report segment twice, once to get the fields
in the segment and once to put them into the protocol tree, just do it
once.  That also means we don't need to allocate an array for all the
reception claims, so we don't have to worry about the claim count (other
than making sure it's non-negative), and that we won't abort the
dissection until we run past the end of the packet.

(The rest of the dissector should be changed to work that way as well.)

svn path=/trunk/; revision=35356
2011-01-04 07:48:28 +00:00
Chris Maynard f18068e9ef Improve sanity checking of reception claim count. Fixes bug 5521.
svn path=/trunk/; revision=35287
2010-12-28 18:02:24 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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-12-20 05:35:29 +00:00
Gerasimos Dimitriadis c79b4e5473 Fix for bug 4509:
Make sure that the length addition results have not wrapped.

svn path=/trunk/; revision=31945
2010-02-22 00:04:51 +00:00
Guy Harris 6105fcc8d5 Squelch some uninitialized-variable warnings (they're false positives).
svn path=/trunk/; revision=31936
2010-02-20 18:51:56 +00:00
Guy Harris 4a44d2c3dd Cast away some implicit-narrowing-conversion warnings.
svn path=/trunk/; revision=31935
2010-02-20 18:36:01 +00:00
Anders Broman cb427754aa Add a protocol reference.
svn path=/trunk/; revision=31930
2010-02-20 11:53:36 +00:00
Stig Bjørlykke 9d918146ff Changed val_to_str() to val_to_str_const() when used with col_set_str().
svn path=/trunk/; revision=31535
2010-01-15 13:51:47 +00:00
Guy Harris 07f9348849 Use the right field for the extension length. Should fix
http://buildbot.wireshark.org/trunk/builders/Ubuntu-7.10-x86-64/builds/311/steps/run-randpkt/logs/stdio

svn path=/trunk/; revision=31270
2009-12-14 23:55:50 +00:00
Gerald Combs 2ebdf97ca3 Add an item length check to the DTN dissector. Fixes bugs 4277
and 4278.  Add a couple of expert items.

svn path=/trunk/; revision=31133
2009-11-30 18:10:46 +00:00
Gerald Combs 9417a7c86f From Jakub Zawadzki via bug 4274:
Switch back to checking size instead of asize in emem_alloc_chunk. Make
sure we don't try to cross the streams by allocating a negative amount
of memory in the LTP dissector.

svn path=/trunk/; revision=31132
2009-11-30 17:31:13 +00:00
Jaap Keuter 6cdc6d4968 Try to get the Win64 compile going as well.
svn path=/trunk/; revision=31124
2009-11-29 22:47:03 +00:00
Jaap Keuter c795dd1af5 From Mithun Roy:
This is a patch for a new dissector that decodes LTP (Licklider Transmission
Protocol) data according to RFC 5326.

svn path=/trunk/; revision=31120
2009-11-29 19:11:55 +00:00