Commit Graph

125 Commits

Author SHA1 Message Date
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
Chris Maynard cf5eae2806 PPP IPCP improvements.
svn path=/trunk/; revision=42635
2012-05-15 21:01:52 +00:00
Chris Maynard bb524c6b64 Despite the OSX-10.5-x86 buildbot insisting that they are, neither 'flags' nor 'fh_tree' were used uninitialized, but make a change to shut it up.
svn path=/trunk/; revision=42591
2012-05-11 20:24:27 +00:00
Chris Maynard 7748862a65 Further LCP improvements:
-> Support RFC 2153's Vendor Specific decode
-> Make more fields filterable by converting some add_text()'s to add_xyz().
-> Don't wrap call_dissector_only() within an if(tree){} block.

svn path=/trunk/; revision=42581
2012-05-11 18:01:51 +00:00
Chris Maynard a1c2c23a9c PPP code, identifier, length and magic number are now filterable. Don't call call_dissector() from within an if(tree){} block. Mark dissect_lcp_linkqualmon_opt()'s pinfo arg as unused.
svn path=/trunk/; revision=42540
2012-05-10 02:49:57 +00:00
Chris Maynard 91b151278b PPP LCP improvements, mostly with LCP options. checkAPIs.pl and checkfiltername.pl are happy, but checkhf.pl complains; however, all complaints are false positives - maybe a Perl expert is able to modify checkhf.pl to avoid reporting them? Lots of changes so fuzz testing was performed, but no captures exist w/all the LCP options, so some are likely still untested. Compiled on Windows using MSVC2010EE, which is notorious for not reporting problems that other compilers do. Hopefully there are no warnings, but we'll see what the buildbots say ...
svn path=/trunk/; revision=42532
2012-05-10 01:21:37 +00:00
Bill Meier 87cf82e056 Use tvb_new_subset_remaining() rather than tvb_new_subset();
#include <styring.h> not req'd (in a few cases);
Minor reformating & whitespace cleanup.

svn path=/trunk/; revision=41374
2012-03-06 16:58:09 +00:00
Anders Broman fc61fbe43a From Pascal Quantin:
decoding of IPv6 Control Protocol embedded in PCO

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6629

svn path=/trunk/; revision=40045
2011-11-29 22:32:31 +00:00
Chris Maynard 647c5c0b27 packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
2011-11-08 18:39:11 +00:00
Bill Meier 739e233871 Fix two proto_tree_add_item() encoding args not handled by fix-encoding-arg.
svn path=/trunk/; revision=39505
2011-10-21 02:54:58 +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 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +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 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +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
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Jeff Morriss 339136d1d0 Based on patch from Denis Ovsienko via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6244 :

Fix typo: s/unkown/unknown/

svn path=/trunk/; revision=38561
2011-08-16 13:16:33 +00:00
Chris Maynard 261875b924 Allow both PPP and ISO/IEC 13818-1 over USB to be dissected using heuristics.
Resolves bug 4814.

svn path=/trunk/; revision=37039
2011-05-10 14:22:17 +00:00
Bill Meier e402e91dd1 Don't assign to a proto_item* if the value won't be used:
Also: Fix a bug wherein PPP_RTP_CUD8 was being registered
 to "ppp.protocol" with the cudp16 handle rather than the cudp8 handle.

Coverity 1004-1013

svn path=/trunk/; revision=36322
2011-03-24 23:34:13 +00:00
Jeff Morriss ba3f31d873 Register an ett_ variable.
svn path=/trunk/; revision=35928
2011-02-12 03:52:05 +00:00
Jeff Morriss 6e0fcb7ab5 Introduce, and start using, tvb_eth_to_str().
Export tvb_*_to_str() and put them in alphabetical order.

svn path=/trunk/; revision=35602
2011-01-21 02:48:55 +00:00
Sake Blok 6e74ad9097 Adress => Address corrections (also in comments).
(see bug 5600)


svn path=/trunk/; revision=35600
2011-01-21 00:19:03 +00:00
Jeff Morriss e11921d192 Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str().

svn path=/trunk/; revision=35540
2011-01-15 03:25:43 +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 c256942255 Use value_string_ext fcns to access various value_string arrays.
Also: use value_string_const() instead of value_string() where apropriate;
      minor reformatting & whitespace cleanup.

svn path=/trunk/; revision=34745
2010-11-01 18:26:34 +00:00
Jeff Morriss a25ece78e5 From Alexis La Goutte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5329 :
Find a patch who clean up PPP dissector
* Remove check_col (from my previous patch #5325)
* Remove the #define ppp_min (unused) 
* Remove some unused ett_* 
* Cleanup NO ARRAY entry (it is a false positive of checkhf tool, it is need {
(in the same line) before a hf_... in hf_register_info struct
* Cleanup Unused entry in VSNP Dissector ( it's really strange, there is no
check when the code was added #4434 ;) )
* minor bug fix...

From me: put one of the check_col()'s (that also protects a val_to_str() call)
back in.

Note: the checkhf tool bug was fixed in rev 34623.

svn path=/trunk/; revision=34624
2010-10-22 18:05:50 +00:00
Jeff Morriss 01177b103e From Alexis La Goutte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5325 :
It is a rework of PAP PPP dissector 
- Replace proto_tree_add_text by proto_tree_add_item 
- add col_append_fstr to show information (Peer-ID, Password...)

svn path=/trunk/; revision=34604
2010-10-21 16:08:29 +00:00
Balint Reczey cfbd48b785 Decode SLL payloads using a dissector table based on sll.ltype.
The idea and the original patch came from Sebastian Reichel
<elektranox@gmail.com> in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594390

svn path=/trunk/; revision=34101
2010-09-12 01:13:42 +00:00
Stig Bjørlykke 1069c8dccf Added an expert info for "4 NOP in a row" in IP and TCP.
svn path=/trunk/; revision=33265
2010-06-20 16:22:51 +00:00