Commit Graph

133 Commits

Author SHA1 Message Date
Michael Mann 9356d5c689 convert to proto_tree_add_subtree[_format] for ASN.1 dissectors
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef
Reviewed-on: https://code.wireshark.org/review/2509
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:08:21 +00:00
Evan Huus 37b903d7ab batch of tvb-length conversions
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-21 04:01:52 +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
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
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Richard Sharpe 09b5361302 This fix now allows SASL/GSS-API with integrity only to be properly dissected
in that we now properly indicate the checksum and provide the wrapped token to
the LDAP dissector to dissect.

There is still a problem in that the wrong parts of the SASL packet can be
indicated when users click on some parts.

I am committing it for review and because it is much better than the current
code.

Bug:9398
Change-Id: I552fc249db26835b79abfc8793438a95f221663a
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/1905
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-04 04:27:13 +00:00
Richard Sharpe 88a64b9e2b Improve the fix by removing code that miss dissects SPNEGO stuff ... as well
as remove redundant stuff from the spnego.cnf file.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Change-Id: I90a962a39dc4da0f13055c9b3893c26044f1fc97
Reviewed-on: https://code.wireshark.org/review/1809
Reviewed-by: Tomáš Kukosa <tomas.kukosa@unify.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-29 01:19:00 +00:00
Richard Sharpe 0ed2672abf Try to fix the problems with the SPNEGO negTokenInit differences in Microsoft implementations
Change-Id: Ifbfca88469a6bc479072c921deba280e667c7087
Reviewed-on: https://code.wireshark.org/review/1804
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-29 01:15:26 +00:00
Pascal Quantin d6548f9301 Remove unused const variables errors seen with recent Clang version
Fixes bug 9886

Change-Id: I8624ef1c5874aea5521d21c998510fc29c838936
Reviewed-on: https://code.wireshark.org/review/657
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-15 17:52:16 +00:00
Jeff Morriss 8c608e6e82 Remove $Id$ from the ASN.1 dissectors and regenerate them.
Change-Id: Ie476c6f82f318188b41ed922b92c6fec119ea954
Reviewed-on: https://code.wireshark.org/review/244
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-18 03:05:28 +00:00
Guy Harris 570a36436c Consistently use "guint8" for "8-bit byte".
Constify.

For routines that manipulate sequences of 8-bit bytes, have them take
guint8 pointers rather than void pointers.

Don't cast away constness.

svn path=/trunk/; revision=54795
2014-01-14 18:03:54 +00:00
Anders Broman eb252d2d34 - Make local functions static.
- Forward declaration of register functions.

svn path=/trunk/; revision=53821
2013-12-07 11:37:58 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Pascal Quantin b46f9bebe2 Change some dissectors to use pinfo memory pool instead of malloc if it can trigger an exception between between buffer allocation and tvb_set_free_cb call
svn path=/trunk/; revision=51427
2013-08-19 14:55:41 +00:00
Jeff Morriss f7843da692 md5.h is in wsutil now.
svn path=/trunk/; revision=51102
2013-08-01 23:53:35 +00:00
Jeff Morriss 2df54da6e2 Move a bunch of the crypt modules and pint.h into wsutil.
This means wsutil now links against libcrypt.

Protect a bunch of the crypt header files from multiple inclusion.

svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Evan Huus b1e12ec925 Convert the rest of the ASN1 dissectors from emem to wmem.
svn path=/trunk/; revision=50063
2013-06-19 22:47:36 +00:00
Pascal Quantin 0ee4d0a00a Postfix FT_NONE fields with "_element" string to reduce number of incompatible filters in ASN.1 dissectors
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402

svn path=/trunk/; revision=49599
2013-05-27 20:26:49 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Pascal Quantin a37c044203 Update the ASN.1 based dissectors following the changes done in r48812
svn path=/trunk/; revision=48820
2013-04-11 18:14:53 +00:00
Anders Broman a10b98284c From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48412
2013-03-19 04:54:30 +00:00
Alexis La Goutte 55cdb2b45b Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48374
2013-03-17 19:24:09 +00:00
Anders Broman 37a86e4de6 Use explicit casts.
svn path=/trunk/; revision=48045
2013-03-04 06:48:36 +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
Anders Broman eb618abad9 From Bill Parker:
Explicitly declare/cast 'unsigned <variable>' as 'unsigned int <variable>'

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

svn path=/trunk/; revision=45418
2012-10-09 08:40:02 +00:00
Jakub Zawadzki 7a9d27c33f Regenerate asn.1 dissectors.
svn path=/trunk/; revision=45110
2012-09-24 19:38:46 +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
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 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
Guy Harris 18dc512738 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42557
2012-05-11 03:32:56 +00:00
Jörg Mayer 2097912587 Rename crypt-xxx to xxx
svn path=/trunk/; revision=40511
2012-01-15 12:29:44 +00:00
Alexis La Goutte 09e95bda3f Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
Try to compile with cmake in Ubuntu 11.10

svn path=/trunk/; revision=40410
2012-01-09 16:32:53 +00:00
Anders Broman fa7ea2ea34 fix [-Wunused-but-set-variable]
svn path=/trunk/; revision=39803
2011-11-12 12:37:38 +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 24cf0aad06 Update generated ASN1 *.[hc] files after recent work done by Jeff Morriss;
The only change in each file is in a comment showing the asn2wrs cmd used to build that file.

svn path=/trunk/; revision=39427
2011-10-15 19:27:27 +00:00
Bill Meier e2996ceabe Convert 'encoding' parameter of certain proto_tree_add_item() calls in asn1 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=39294
2011-10-06 16:50:13 +00:00
Bill Meier e18e2694c6 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|1|0|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN
 

svn path=/trunk/; revision=39263
2011-10-05 02:39:04 +00:00
Stig Bjørlykke a7c5d642d5 Regenerate ASN.1 dissectors to update the #line directive.
svn path=/trunk/; revision=37118
2011-05-13 08:12:27 +00:00
Jakub Zawadzki ed59c450f4 Cleanup: replace se_alloc+memcpy combo with single se_memdup().
svn path=/trunk/; revision=36996
2011-05-05 06:55:12 +00:00
Jakub Zawadzki d621e6acbe Cleanup: g_malloc can't return NULL, remove checks for them.
XXX, should this code use g_try_malloc instead?

svn path=/trunk/; revision=36988
2011-05-04 21:19:04 +00:00
Gerald Combs a5b20fbdf6 Add a relative path to the "#line" directives we produce. Regenerate the
SNMP and SPNEGO dissectors to see if it helps Coverity locate the
original source files.

svn path=/trunk/; revision=36522
2011-04-08 19:51:39 +00:00
Stig Bjørlykke 632dcd0d77 Add changes in r35384 to template file.
svn path=/trunk/; revision=36009
2011-02-20 15:03:09 +00:00
Jeff Morriss 11fc9bbe33 Use some tvb_ accessor functions instead of a standard function plus tvb_get_ptr().
svn path=/trunk/; revision=35384
2011-01-05 18:59:47 +00:00
Gerald Combs 622f07b95e Initialize MechType_oid in the right place.
svn path=/trunk/; revision=33396
2010-07-01 00:44:21 +00:00
Gerald Combs 6aaa5874c6 Initialize more variables.
svn path=/trunk/; revision=33392
2010-07-01 00:11:14 +00:00
Jeff Morriss 81da8e0b6b Use find_or_create_conversation() in some ASN.1 dissectors
svn path=/trunk/; revision=32791
2010-05-13 18:55:31 +00:00
Jeff Morriss a0c858efcd Add a little more code to avoid not-very-useful blurbs:
- Change spaces in the name to underscores before comparing it to the blurb.
  - Check if the type simply as T_ prepended to the name.
  - Don't put in a blurb of "NULL".

and regenerate the dissectors.

svn path=/trunk/; revision=32748
2010-05-11 03:53:31 +00:00
Jeff Morriss 08026e8bcc Regenerate a few more of the ASN.1 dissectors
svn path=/trunk/; revision=32746
2010-05-11 02:51:39 +00:00
Jeff Morriss ed75cdd99c Make a variable a guint8* instead of a char* since it a) holds TVB data and b) matches what tvb_new_child_real_data() wants for its 2nd argument. This cleans up a warning from the Sun compiler.
svn path=/trunk/; revision=32599
2010-04-29 15:23:10 +00:00
Bill Meier f8b92f8d0b #include <stdio.h> not needed.
svn path=/trunk/; revision=32405
2010-04-06 17:01:14 +00:00