Commit Graph

156 Commits

Author SHA1 Message Date
Michael Mann fc63343a4e convert to proto_tree_add_subtree[_format]
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35
Reviewed-on: https://code.wireshark.org/review/2865
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 20:36:36 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Bill Meier 48ce5629b0 Minor: use VALS macro (as per convention); Add editor modelines; Do whitespace changes.
Change-Id: I6007c1b2098d06e4a892474dd07f06a7538f94ef
Reviewed-on: https://code.wireshark.org/review/1843
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-05-28 15:40:39 +00:00
Michael Mann b40cb1adea Apply found fix-encoding-args.pl errors in the dissector directory.
I coincidentally found a few files with errors, so I thought it might be time to run it on the whole directory again.

Change-Id: Ia32e54b3b1b94e5a418ed758ea79807c8bc7e798
Reviewed-on: https://code.wireshark.org/review/978
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06 15:11:36 +00:00
Bill Meier 4fbcfc1289 (Benign) Don't use "address-of" operator on arg of VALS() (not that it makes any actual difference)..
Change-Id: I0766d0f130648aaa5a58d9f4062fa24e898cbdc3
Reviewed-on: https://code.wireshark.org/review/545
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-07 05:03:41 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Bill Meier ebaeed5a1f (Trivial)
- Fix indentation to match editor modelines (tabs-->spaces);
 - Rework/add some whitespace;

svn path=/trunk/; revision=53978
2013-12-12 20:16:30 +00:00
Anders Broman 4058146e26 - Forward declaration of register functions.
svn path=/trunk/; revision=53971
2013-12-12 19:52:14 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Jakub Zawadzki c9b2ee3768 include <wsutil/pint.h> only when needed.
svn path=/trunk/; revision=53196
2013-11-09 15:44:29 +00:00
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
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Evan Huus 6df83e8078 Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.

Majority of the conversion done with sed.

svn path=/trunk/; revision=52164
2013-09-21 17:04:41 +00:00
Pascal Quantin 20a40260d7 A few more dissectors converted to wmem
svn path=/trunk/; revision=52071
2013-09-15 18:03:32 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Chris Maynard 5cd898cd80 Rename frame relay NLPID dissector table from "fr.ietf" to "fr.nlpid".
svn path=/trunk/; revision=51960
2013-09-11 21:55:00 +00:00
Pascal Quantin b46f9bebe2 Change some dissectors to use pinfo memory pool instead of malloc if it can trigger an exception between between buffer allocation and tvb_set_free_cb call
svn path=/trunk/; revision=51427
2013-08-19 14:55:41 +00:00
Michael Mann 4d18fdf67d Add expert info to dissect_ip_tcp_options(). The proto_tree_add_text seems a bit duplicative, but the byte highlighting over the whole option is nice.
svn path=/trunk/; revision=50248
2013-06-30 03:16:32 +00:00
Michael Mann e5af2f55ee Separate IP option header fields for each dissector that uses dissect_ip_tcp_options(). Bug 8823 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8823)
svn path=/trunk/; revision=50230
2013-06-29 19:59:08 +00:00
Michael Mann fa5b45834b Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49921
2013-06-14 01:56:28 +00:00
Michael Mann 94add739e8 NULL terminate bit field list. Bug 8638 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8638)
svn path=/trunk/; revision=49214
2013-05-09 12:49:31 +00:00
Anders Broman a9045908df Dissect more 3GPP2 extensions.
svn path=/trunk/; revision=48700
2013-04-02 16:58:18 +00:00
Guy Harris 021e41ea66 Fix RFC number.
svn path=/trunk/; revision=48553
2013-03-25 22:04:51 +00:00
Anders Broman 3eb06be97d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48425
2013-03-19 19:28:57 +00:00
Anders Broman 077c1eb385 Update a value_string
svn path=/trunk/; revision=48401
2013-03-18 21:31:56 +00:00
Bill Meier 7316a50499 Declare a value_string as static.
svn path=/trunk/; revision=46359
2012-12-03 23:05:08 +00:00
Bill Meier 07c4d6ef7f Fix potential buffer overflow crash; (Bug #7880).
Rework code logic slightly so same code path (and tests)
 used whether or not 'if(tree)'.

svn path=/trunk/; revision=46128
2012-11-22 02:27:40 +00:00
Martin Mathieson 0aebd579e3 Show SACK information in TCP graphs. Also add a generated field for the
number of SACK ranges found in the SACK option.

This involved extending the IP options framework to include an extra
void* data field, which in the case of TCP is filled in with the tap
struct - other users currently pass NULL.

I first implemented the graph to sort the SACK ranges and show (in red)
the unacknowledged regions between them, but this became confusing where
the number of ranges is limited by TCP padding bytes. i.e. you can't
tell how many SACKs could have been encoded, so some of the gaps between
ranges may already have been received.

svn path=/trunk/; revision=46006
2012-11-12 03:55:46 +00:00
Michael Mann 4f9707469d replaced decode_boolean_bitfield calls with itemized filters
added tfs_no_yes to tfs.[ch]

svn path=/trunk/; revision=45115
2012-09-25 01:00:41 +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
Chris Maynard 7334bc59e5 Initialize ett's and hf's to "-1", not "- 1".
svn path=/trunk/; revision=44959
2012-09-18 00:16:01 +00:00
Jakub Zawadzki 9f92dc93c5 Add data parameter to call_dissector_only.
svn path=/trunk/; revision=44872
2012-09-11 08:28:07 +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
Jakub Zawadzki 0e382b6668 Yet another case of bug #7316 (r42989) and bug #7668 (r44688)
Use correct field type for ccp.opt.oui

svn path=/trunk/; revision=44689
2012-08-28 09:10:34 +00:00
Jakub Zawadzki d35ef03b15 Fix bug #7668
Use correct field type for lcp.opt.oui

svn path=/trunk/; revision=44688
2012-08-28 08:44:41 +00:00
Bill Meier 51cc4887d2 col_...() and expert...() fcns should not be under 'if (tree)';
'tab-width/tabstop/tabSize' in editor modelines should really always be 8;

svn path=/trunk/; revision=44538
2012-08-16 13:44:40 +00:00
Balint Reczey 1f37a8cf14 Fix crash in PPP dissector
Make sure that there is enough space allocated for PPP encapsulated CRTP
packet's header.
The bug can be triggered on an x86_64 system using the cpature file attached to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680056

svn path=/trunk/; revision=43784
2012-07-18 15:14:45 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 70cc6362fe Don't define value_string arrays in a .h file (included in multiple places).
Also:
 - don't use val_to_str_const() with a "format" default string;
 - rename 'opt_len_type' enumeration  identifiers to be less generic.

svn path=/trunk/; revision=43210
2012-06-11 18:47:42 +00:00
Gerald Combs 39dbd45c9f Fix some dead assignments.
svn path=/trunk/; revision=43157
2012-06-08 17:20:44 +00:00
Pascal Quantin 2256e71cc5 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7316 :
Use correct field type for OUI

svn path=/trunk/; revision=42989
2012-06-01 20:32:15 +00:00
Chris Maynard b35b911748 Mark pinfo as unused. Change args to proto_tree_add_text().
svn path=/trunk/; revision=42921
2012-05-30 17:26:00 +00:00
Chris Maynard 39d4fbeb52 PPP CCP improvements. And yay, checkAPIs no longer complains about the number of useless add_text()'s since the ratio is finally below 50%. This ratio should continue to drop as more and more fields become filterable.
svn path=/trunk/; revision=42920
2012-05-30 17:02:44 +00:00
Chris Maynard ff667657e8 Largely, whitespace and formatting changes. Added modelines to match.
Other misc. changes:
-> Delete useless, duplicate assignment of offset to 0 in dissect_vsnp().
-> Change short seq # display filter so it's not the same as the seq # filter.
-> pppoe.dump.gz looks to be malformed, so remove unnecessary "remlen" code in
   dissect_cp() and let the packets be displayed as malformed since they are.
-> Remove if (check_col()) checks.
-> Fix copy-and-paste of filter name for ipcp.opt.max_header.

svn path=/trunk/; revision=42661
2012-05-16 19:55:49 +00:00
Chris Maynard bf0f73f6be Call dissect_osinlcp_opt_type_len() to dissect the OSINLCP option type and length, unintentionally omitted. I guess this is what happens without enough packet captures to test against and a compiler that doesn't warn enough about unused functions. Anyone know how to get MSVC compilers to complain about such things like the other compilers do?
svn path=/trunk/; revision=42644
2012-05-15 23:44:23 +00:00
Jeff Morriss 6f2b6538eb ifdef out dissect_osinlcp_opt_type_len since it's not used--should it be?
svn path=/trunk/; revision=42643
2012-05-15 23:39:06 +00:00
Chris Maynard 4d7b302a6c PPP OSINLCP improvements. Note that the protocol name has been changed from OSICP to OSINLCP, which matches RFC1377 and IANA terminology from http://www.iana.org/assignments/ppp-numbers
svn path=/trunk/; revision=42639
2012-05-15 22:02:57 +00:00