Commit Graph

30 Commits

Author SHA1 Message Date
Gerald Combs 3f765b3ef9 Add a CF_FUNC macro for casting BASE_CUSTOM functions.
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid
the following warning:

    warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic]

We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be
more consistent with the other macros in proto.h. Update each instance
of BASE_CUSTOM to use CF_FUNC.

Adjust a dummy variable name generated by asn2wrs.py that was triggering
an invalid error in checkhf.pl.

Fix an encoding arguement in packet-elasticsearch.c found by
fix-encoding-args.pl.

Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22
Reviewed-on: https://code.wireshark.org/review/7150
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 00:05:38 +00:00
Michael Mann 155fc8f16a Move #defines of epan/greproto.h to packet-gre.h
Change-Id: I5de4c34e2acafbe47a8ca3f07040a774e72d0d3e
Reviewed-on: https://code.wireshark.org/review/6787
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-26 01:01:18 +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
Bill Meier 9b181b97c6 Add editor modelines; Adjust whitespace; Remove boilerplate comments
Change-Id: I1f5f83ed441f6009125cf2cbe5023af04986898a
Reviewed-on: https://code.wireshark.org/review/4392
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-30 21:06:37 +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
Michael Mann 7e8e5b347e Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
2013-05-25 17:06:40 +00:00
Chris Maynard f9bc424a05 Fix Coverity CID 280362: Logically dead code.
#BACKPORT (1.8, 1.6)

svn path=/trunk/; revision=47965
2013-03-01 05:29:12 +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
Pascal Quantin 765c81a932 Revert r44441: pinfo may be NULL only when pi is not NULL
svn path=/trunk/; revision=44445
2012-08-11 17:57:18 +00:00
Jörg Mayer f0486d582a After commit r44435: pinfo -> NULL
svn path=/trunk/; revision=44441
2012-08-11 07:10:40 +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
Gerald Combs 18cbe2f0e0 Fix spelling.
svn path=/trunk/; revision=39721
2011-11-02 20:43:10 +00:00
Alexis La Goutte 695249537e From me via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6462 & 6505
Wireshark unable to parse ERSPAN from HP Comware platforms
Huawei GRE ERSPAN is not decoded properly 

Add a pref to FORCE to decode directly Ethernet frame in GRE (with no ERSPAN Header)

svn path=/trunk/; revision=39687
2011-10-31 13:45:21 +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
Jörg Mayer 18735eaba5 Replace TRUE/FALSE with the new ENCAP stuff where appropriate
svn path=/trunk/; revision=38746
2011-08-26 17:02:33 +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
Jörg Mayer c749fe000c Comparing type II and III traces of the same packet
indicate that the last 4 bytes of both types are similar.
So the extra bytes in type III are inserted before those
last bytes.

svn path=/trunk/; revision=34238
2010-09-24 18:12:45 +00:00
Jörg Mayer 72c3e35672 - trunkated -> truncated
- Print "Type II" and "Type III" as versionstrings.
- Make sure that version = 1 or 2

svn path=/trunk/; revision=34222
2010-09-23 20:44:11 +00:00
Jörg Mayer 320de7eb14 Jason Masker:
- Add decoding of direction bit for version 2 (type III) erspan.

Me:
- Decode the original direction bit as unknown in case of version 2.
- The original unknown3 value seems to indicate whether the packet
  was too long to fit into a single mtu (trunkated).
- "Timestamp(s)" -> "Timestamp"


svn path=/trunk/; revision=34221
2010-09-23 19:42:20 +00:00
Jörg Mayer 527f5d5653 Jason Masker <jason at masker.net>:
Updates for the Cisco ERSPAN type III (version 2) protocol.

svn path=/trunk/; revision=34209
2010-09-23 13:31:28 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Anders Broman 4d2e653901 From Didier Gautheron:
Dissectors using call_dissector() function inside a 'if (tree) {}' block.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4107

svn path=/trunk/; revision=30415
2009-10-09 07:24:33 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +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
Guy Harris cc793a8230 Get rid of non-ASCII characters.
svn path=/trunk/; revision=24170
2008-01-23 20:12:23 +00:00
Stig Bjørlykke f8f58fceaa From Munenori Ohuchi:
1. Priority field decode.
   The 802.1q tag field of a frame is separated from its frame body in 
   a ERSPAN packet. 
   Current packet-cisco-erspan.c decodes only the vlan id field of the 
   802.1q tag.
   This patch can also decode the priority field of the 802.1q tag.

2. Direction of a captured frame decode.
   A ERSPAN packet includes the additional information of the direction
   a captured frame as below.

   If a caputred frame comes from outside to a switch port, this means an
   'Incoming' frame.  If a caputred frame goes out of a switch port, 
   this is an 'Outgoing' frame.


Added an extra unknown value for the bit between direction and spanid.

svn path=/trunk/; revision=22649
2007-08-25 00:29:40 +00:00
Sebastien Tandel 454e23c936 typo fix
svn path=/trunk/; revision=21428
2007-04-14 07:55:43 +00:00
Jörg Mayer 8f3934e243 Beginnings of a Cisco ERSPAN dissector - the only thing missing is the code
to actually call this (aka to handle the ambiguities of DLT values).

svn path=/trunk/; revision=21427
2007-04-14 01:07:36 +00:00