Commit Graph

49 Commits

Author SHA1 Message Date
Hadriel Kaplan ceb8d954d2 Lua: Expose tcp_dissect_pdus() to Lua
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus()
to make TCP-based dissection easier.

Bug: 9851
Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3
Reviewed-on: https://code.wireshark.org/review/6778
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-27 15:14:12 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +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
Michael Mann daa70feddc Revert "Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining"
See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 021e7afc9f.

Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f
Reviewed-on: https://code.wireshark.org/review/2429
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 17:23:41 +00:00
Dario Lombardo 021e7afc9f Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66
Reviewed-on: https://code.wireshark.org/review/2378
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:20:32 +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
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +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
Martin Kaiser d18311376a merge two if statements
svn path=/trunk/; revision=54661
2014-01-08 13:57:02 +00:00
Martin Kaiser 10da33247d Coverity 280379
if the key is missing, it's always a request

svn path=/trunk/; revision=54660
2014-01-08 13:56:24 +00:00
Jakub Zawadzki 715e2d6699 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54095
2013-12-14 16:09:57 +00:00
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +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
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
Bill Meier 92fe2aa40d Minor cleanup:
- proto_reg_handoff_...() & related;
- Remove unneeded #includes

svn path=/trunk/; revision=51572
2013-08-29 02:17:00 +00:00
Anders Broman 7e3922cf43 Use dissector_delete_uint_range/dissector_add_uint_range
svn path=/trunk/; revision=51540
2013-08-27 19:21:20 +00:00
Michael Mann 6880359a5f Batch of filterable expert infos.
svn path=/trunk/; revision=51486
2013-08-23 03:17:34 +00:00
Pascal Quantin 5806f31bd6 Remove useless include
svn path=/trunk/; revision=51031
2013-07-30 17:50:05 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Pascal Quantin 0efdddc61f From Josef Zila via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8408 :
Add configurable TCP and UDP ports for MEMCACHE dissector

svn path=/trunk/; revision=48064
2013-03-04 17:48:56 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +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
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
Bill Meier 859affc2bd Don't call subdissectors / expert...() / col...() under 'if (tree)'
Also:
 Remove some uneeded initializers;
 Do some whitespace cleanup and re-formatting.

svn path=/trunk/; revision=43681
2012-07-12 17:22:47 +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
Alexis La Goutte cb2000b9f3 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=43087
2012-06-04 22:24:46 +00:00
Bill Meier b869cb0bc5 Remove unneeded includes (ctype.h, stdio.h);
In one case, define our own size for a string buffer
 (instead of using a magic constant 'BUFSIZ');
In a few cases: do some whitespace, indentation & reformatting cleanup.

svn path=/trunk/; revision=42634
2012-05-15 20:57:21 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Stig Bjørlykke ba2aae0f8e Use ENC_NA as encoding for FT_PROTOCOL, FT_NONE and FT_BYTES.
svn path=/trunk/; revision=38122
2011-07-19 18:48:31 +00:00
Stig Bjørlykke f282154ab0 Use correct encoding for proto_tree_add_item().
svn path=/trunk/; revision=38107
2011-07-19 10:51:12 +00:00
Stig Bjørlykke 27344a90fe Removed some unneeded assignments.
Found by clang.

svn path=/trunk/; revision=36698
2011-04-18 15:29:25 +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
Bill Meier 2d1dccfcfc Remove trailing blanks; Also: Altho tabs expanded, use tab-width=8 anyway.
svn path=/trunk/; revision=32587
2010-04-28 16:09:25 +00:00
Stig Bjørlykke c1729024c5 Removed second include <epan/packet.h>.
svn path=/trunk/; revision=32533
2010-04-21 10:15:01 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Bill Meier 65faee6470 Set editor modelines to be consistent between emacs and vi/ex;
Indentation and whitespace cleanup;

svn path=/trunk/; revision=29180
2009-07-23 17:46:09 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Stig Bjørlykke 1564b860e4 Remove some warnings.
svn path=/trunk/; revision=28699
2009-06-11 11:52:42 +00:00
Stig Bjørlykke 7a71847e0d Fixed the type for key_len in dissect_key().
svn path=/trunk/; revision=28609
2009-06-02 19:35:45 +00:00
Bill Meier 548e468959 Misc dissector cleanup:
- Make some fcns & vars static
- hf[] blurbs: "" and repeated text --> NULL
- Move proto_register & proto_reg_handoff to end of source
- packet-catapult-dct2000: simplify proto_reg_handoff
- Use consistent indentation

svn path=/trunk/; revision=28488
2009-05-26 16:01:12 +00:00
Stig Bjørlykke 906506f6cf Use proto_tree_add_uint64 for 64 bits values.
svn path=/trunk/; revision=28465
2009-05-24 23:23:06 +00:00
Stig Bjørlykke 905b8d0b2d From Rama Chitta (bug 3467):
Added routines for Memcache Textual Protocol.

svn path=/trunk/; revision=28462
2009-05-24 22:39:07 +00:00
Stig Bjørlykke 26d30411b6 Adjusted my name to use only ASCII characters.
svn path=/trunk/; revision=27733
2009-03-15 21:13:27 +00:00
Bill Meier 6485cd2d62 From Michael Speck: Fix so compiles with VC6
svn path=/trunk/; revision=27620
2009-03-06 15:41:02 +00:00
Bill Meier bd07a900e6 Prefs callback not req'd ...
svn path=/trunk/; revision=27611
2009-03-05 04:12:12 +00:00
Anders Broman 26afda27e0 Change key_len to guint16.
svn path=/trunk/; revision=27599
2009-03-03 22:16:26 +00:00
Stig Bjørlykke dce5b2bc42 Added support for Memcache Binary Protocol.
svn path=/trunk/; revision=27594
2009-03-03 21:57:43 +00:00