Commit Graph

54 Commits

Author SHA1 Message Date
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 055e4768ec Add subdissector table for MPLS PW Associated Channel Type
Change-Id: Id72fcbe74b91b4eb25fb4d3f3d47a1d53c2857b2
Reviewed-on: https://code.wireshark.org/review/5212
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-09 19:49:09 +00:00
Michael Mann c61df20847 Restore a "ti" assignment that slightly altered dissection.
Change-Id: I94cd7893a2e6b3668499d41519649f6a7782aa60
Reviewed-on: https://code.wireshark.org/review/5213
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-09 19:06:09 +00:00
Bill Meier 10406870f5 Add editor modelines; fix indentation as needed.
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263
Reviewed-on: https://code.wireshark.org/review/4363
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 13:47:02 +00:00
Michael Mann 5db1352526 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I398e9cf4f6882e76644aa758e12c39a39159e95f
Reviewed-on: https://code.wireshark.org/review/3319
Petri-Dish: Michael Mann <mmann78@netscape.net>
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-03 16:30:10 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +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
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
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
Michael Mann 7e8e5b347e Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
2013-05-25 17:06:40 +00:00
Anders Broman b539916835 [-Wmissing-prototypes]
explicit casts.

svn path=/trunk/; revision=48293
2013-03-14 07:37:13 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Bill Meier 4daca92053 Minor cleanup:
- Remove some uneeded initializers;
- Whitespace.

svn path=/trunk/; revision=46493
2012-12-10 23:23:01 +00:00
Anders Broman 1c22a075a8 From Krishnamurthy Mayya:
Enhancement to support MPLS-TP FM and LI payloads as per RFC 6427 and RFC 6435

Fixed some errors found by checkapi, changed filter names to use
proto abbr.

svn path=/trunk/; revision=46084
2012-11-19 20:13:57 +00:00
Bill Meier 562c890560 Cleanup:
packet-mpls.c:
  - refactor dissect_pw_ach();
  - create/uer value_string_ext as appropriate;
  - use call_dissector() rather than direct dissector call in one cse;

 all:
  - use 'LABEL' prefix for a set of rather generic enum identifiers;
  - fix some cases of calling expert...() or sub-dissectors under 'if(tree)';
  - reformat some hf[] entries;
  - do some whitespace changes.

svn path=/trunk/; revision=45195
2012-09-28 19:50:49 +00:00
Bill Meier c4d449cbff expert_add...() shouldn't be called under 'if (tree)'.
svn path=/trunk/; revision=45072
2012-09-23 18:15:09 +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
Michael Mann 0d4eafb04d Update display filter names per Bug 2794. Part 1 of many.
svn path=/trunk/; revision=43907
2012-07-22 03:06:37 +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 d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23:35 +00:00
Jeff Morriss 5ad3d4ac04 Fix some encoding arguments.
svn path=/trunk/; revision=42433
2012-05-05 00:03:59 +00:00
Guy Harris 29d7ec110e Indicate why the flags have a field width of 6.
Add the RFC numbers for the BFD RFCs, and a URL for the last I-D that
discussed version 0.

svn path=/trunk/; revision=42371
2012-05-01 01:04:24 +00:00
Guy Harris 619e455299 No C++-style comments, please; some C compilers reject them.
svn path=/trunk/; revision=42368
2012-04-30 23:08:26 +00:00
Guy Harris 3b6b521c28 Add some initializations to squelch (bogus) warnings (either the version
is 0 or it isn't, so the variables are not, in fact, used uninitialized).

svn path=/trunk/; revision=42366
2012-04-30 22:05:33 +00:00
Bill Meier aff0e40393 Rework code slightly:
- use proto_tree_add_item() istead of tvb_get...()/proto_tree_add_uint() in a few cases;
 - misc ...
Also: Whitespace cleanup and reformatting of hf[] entries.

svn path=/trunk/; revision=42364
2012-04-30 21:50:21 +00:00
Bill Meier 26566d7cb7 Parenthesize an expression to prevent a possible overflow resulting an incorrect result.
svn path=/trunk/; revision=42361
2012-04-30 20:49:19 +00:00
Anders Broman e5fcc57d87 One more contributor...
svn path=/trunk/; revision=40100
2011-12-06 07:07:19 +00:00
Anders Broman 10c7707559 Add a contributor.
svn path=/trunk/; revision=40068
2011-12-02 05:46:11 +00:00
Anders Broman 3db35fc5f3 From Krishnamurthy Mayya:
Add Copyright.

svn path=/trunk/; revision=40055
2011-11-30 20:00:42 +00:00
Anders Broman 094e30816d Fix Checkapi found errors.
svn path=/trunk/; revision=40030
2011-11-28 18:10:57 +00:00
Anders Broman c610654cc8 From Krishnamurthy Mayya:
Part of patch:
2. BFD extension has been added as per RFC 6428, to decode the BFD packet with
ACH encapsulation(without IP/UDP header encapsulation). The channel type in ACH
header identifies the BFD payload as BFD CC or CV packet. Also decoding for
MPLS-TP source MEP-ID TLV in BFD CV packet has been added.

applied with a change to add packet-bfd.h

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6610#add_comment

svn path=/trunk/; revision=40029
2011-11-28 17:59:54 +00:00
Anders Broman 2cd8cf96f9 From Krishnamurthy Mayya:
BFD extension has been added as per RFC 6428, to decode the BFD packet with
ACH encapsulation(without IP/UDP header encapsulation). The channel type in ACH
header identifies the BFD payload as BFD CC or CV packet. Also decoding for
MPLS-TP source MEP-ID TLV in BFD CV packet has been added.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6610#add_comment

svn path=/trunk/; revision=40027
2011-11-28 17:13:45 +00:00
Anders Broman 4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +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 10ffd14b8f Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
svn path=/trunk/; revision=32735
2010-05-10 15:54:57 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke cc229fada3 Removed an unused variable.
svn path=/trunk/; revision=30882
2009-11-09 14:09:40 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +00:00
Anders Broman a98ce52e80 From Artem Tamazov:
Added: PW ATM 1:1, AAL5 SDU, AAL5 PDU support + BFD fix + PW ATM OAM fix

svn path=/trunk/; revision=28881
2009-06-29 19:24:14 +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
Bill Meier 808a4e2c3c Define certain fcns as static (if not used externally).
Also: whiule we're at it: 
 - fix hf[] blurbs as appropriate to use NULL;
 - fix some indentation

svn path=/trunk/; revision=27890
2009-03-29 22:16:26 +00:00
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Stig Bjørlykke f725ed8b6a From Todd J Martin:
The attached patch to packet-bfd.c adds the following enhancements to BFD
decoding:
- The Authentication Section is now decoded.  All of the authentication methods
are supported.  Verification of checksums is not implemented.
- BFD flags are now shown in a tree
- Added support for the M flag
- Added a display filter for the message length
- For the Desired Min TX Interval, Required Min RX Interval, and Required Min
Echo RX Interval fields, the time value is now printed in both milliseconds and
microseconds.  (Previously, only milliseconds was being shown.)  The PDU
represents the time in microseconds, but most implementations deal in
milliseconds.
- Added a warning to flag the packet if the Authentication bit is set, but the
full Authentication Section is not present.
- Added descriptions for most of the fields
- Fix the name of the protocol.  BFD stands for Bidirectional Forwarding
Detection and not Bi-directional Fault Detection.
- Register the protocol on the UDP multihop port (4784).
- Change the filter name for the protocol from bfdcontrol to bfd since all of
the other display filters started with bfd.


Removed unused hf_bfd_auth_checksum.
Modified printing of the ':' at the end of the Authentication tree.

svn path=/trunk/; revision=22825
2007-09-07 19:05:55 +00:00
Jaap Keuter c9a6054b75 From: Bálint Réczey:
The attached patch fixes decoding of message flags in BFD control packets.

svn path=/trunk/; revision=18853
2006-08-08 19:54:37 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00