Commit Graph

24 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
Martin Mathieson 48db2548a9 Deleting unneccessary #includes from dissectors.
Second batch (packet-eth.c -> packet-icmpv6.d).

Will look at cleaning up and committing script afterwards.

Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594
Reviewed-on: https://code.wireshark.org/review/6013
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 12:22:54 +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 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Guy Harris cb16dff992 Get rid of more tvb_get_nstringz* calls.
Add an FT_STRINGZPAD type, for null-padded strings (typically
fixed-length fields, where the string can be up to the length of the
field, and is null-padded if it's shorter than that), and use it.  Use
IS_FT_STRING() in more cases, so that less code needs to know what types
are string types.

Add a tvb_get_stringzpad() routine, which gets null-padded strings.
Currently, it does the same thing that tvb_get_string_enc() does, but
that might change if we don't store string values as null-terminated
strings.

Change-Id: I46f56e130de8f419a19b56ded914e24cc7518a66
Reviewed-on: https://code.wireshark.org/review/1082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-12 22:27:22 +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
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Jakub Zawadzki e0e86bab5a Fix const warnings.
svn path=/trunk/; revision=54092
2013-12-14 14:33:46 +00:00
Bill Meier 721b5d266a Do one or more of the following:
- Convert "4 space tabs" to spaces;
- Remove some unneeded initializers;
- 'offset++' --> 'offset += 1' for consistency;
- Reformat hf[] entries;
- Rework/add whitespace;
- Adjust editor modelines (set tab-width to 8).

svn path=/trunk/; revision=54005
2013-12-13 00:44:32 +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 868b345eea Convert a few more dissectors to wmem API
svn path=/trunk/; revision=52053
2013-09-15 10:29:49 +00:00
Alexis La Goutte c18eb788c2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50240
2013-06-29 22:00:13 +00:00
Michael Mann 5bc22a25df Batch of filterable expert infos.
svn path=/trunk/; revision=49584
2013-05-26 03:29:07 +00:00
Anders Broman 6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Evan Huus d7865654fc From Chris Maynard via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8360
Bail out if length is less than the minimum required length.

svn path=/trunk/; revision=47776
2013-02-20 20:49:36 +00:00
Chris Maynard 552e98b7a3 Fix Coverity CID 984638: Unused pointer value.
svn path=/trunk/; revision=47754
2013-02-20 00:53:19 +00:00
Chris Maynard 3010f6a0cc Don't call expert_add_info_format() from within an if (tree) {} block.
Misc. whitespace changes, remove tabs, add modelines to match current scheme.

svn path=/trunk/; revision=47742
2013-02-19 01:56:42 +00:00
Michael Mann 5effa93ce0 Use tcp_dissect_pdus for better dissection on TCP. Adjusted UDP dissection accordingly.
Various cleanup to use proto_tree_add_item more often.

svn path=/trunk/; revision=47739
2013-02-18 22:12:07 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
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-26 05:57:06 +00:00
Michael Mann 552e411031 Fix infinite loop in HART/IP dissector (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7845)
I also did a small bit of cleanup dissection while I was there, but it could definitely use more.  I just want to fix the fuzztest crash I discovered before the buildbots get a hold of it.

svn path=/trunk/; revision=45469
2012-10-11 14:05:27 +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
Stig Bjørlykke 2a9559e200 Removed unused 'msg_type_val' argument to some functions.
svn path=/trunk/; revision=41737
2012-03-22 12:37:03 +00:00
Chris Maynard 6c1875f2ea Fix Coverity CID's 1452-1453: UNUSED_VALUE.
svn path=/trunk/; revision=41704
2012-03-21 03:19:31 +00:00
Bill Meier a7041cacb0 From Bill Schiller: New dissector for the HART/IP protocol
I'm contributing a new dissector for the HART/IP protocol.  This
protocol is specified by the HART Conformance Foundation (HCF).  It is
a standard protocol used in the process control industry.  It
essential wraps the multip-drop serial HART packets in TCP or UDP
packets.  The standard has been approved by the HCF and has been
assigned UDP/TCP port 5094 by IANA.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6961
--This line, and those below,
will be ignored--

M    AUTHORS
M    epan/CMakeLists.txt
M    epan/dissectors/Makefile.common
AM   epan/dissectors/packet-hartip.c
M    ui/gtk/main_menubar.c

svn path=/trunk/; revision=41644
2012-03-18 19:51:39 +00:00