Commit Graph

188 Commits

Author SHA1 Message Date
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
Jörg Mayer 23d3e3d665 Dario Lombardo <lomato@gmail.com> via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9147

Migration from emem to wmem for trivial cases (ep_alloc only).


svn path=/trunk/; revision=52002
2013-09-13 10:13:19 +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
Alexis La Goutte 0550cb5121 Make Ubuntu buildbot happy
packet-kerberos.c: In function 'proto_register_kerberos':
packet-kerberos.c:5406:29: error: unused variable 'ei' [-Werror=unused-variable]

svn path=/trunk/; revision=51691
2013-09-03 06:09:21 +00:00
Michael Mann 5405b34469 Batch of filterable expert info.
svn path=/trunk/; revision=51688
2013-09-02 23:32:31 +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
Stephen Fisher 0b56dc6a7b Cast away some errors of these types:
request for implicit conversion from 'gpointer' to 'char *' not permitted
    in C++ [-Werror=c++-compat]

and

    enum conversion when passing argument 3 of 'krb5_crypto_init' is invalid
    in C++ [-Werror=c++-compat]


svn path=/trunk/; revision=50108
2013-06-21 22:01:37 +00:00
Michael Mann de68fd6eea Removed check_col() and the occasional tree.
svn path=/trunk/; revision=49938
2013-06-14 17:49:53 +00:00
Anders Broman 55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Gerald Combs d21f62b73b Add a directory name preference type (PREF_DIRNAME) and registration
routine (prefs_register_directory_preference). Add PREF_FILENAME and
PREF_DIRNAME support to the Qt module preferences. Change a couple of
preferences to directory names.

Clean up some names and default settings.

svn path=/trunk/; revision=47573
2013-02-08 18:07:34 +00:00
Michael Mann 24065ce625 Change string to filename preference so file can be browsed for
svn path=/trunk/; revision=47566
2013-02-08 14:43:11 +00:00
Guy Harris d7763299ae The KRB_RM_ #defines fit in 32 bits, so just make them unsigned, not
long.

dissect_krb5_Checksum() is declared in
epan/dissectors/packet-kerberos.h; don't declare it again here.

svn path=/trunk/; revision=46666
2012-12-21 11:37:54 +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 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
Alexis La Goutte 3e5cc78d46 From Weijun Wang via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7481
Description for Kerberos 5's ENC-TKT-IN-SKEY is wrong

http://tools.ietf.org/html/rfc4120#section-2.9.2

#Backport

svn path=/trunk/; revision=44108
2012-07-29 16:33:34 +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 b869cb0bc5 Remove unneeded includes (ctype.h, stdio.h);
In one case, define our own size for a string buffer
 (instead of using a magic constant 'BUFSIZ');
In a few cases: do some whitespace, indentation & reformatting cleanup.

svn path=/trunk/; revision=42634
2012-05-15 20:57:21 +00:00
Bill Meier 7582254ef1 From Evan Huus: remove unused variables
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7229
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7230

svn path=/trunk/; revision=42455
2012-05-07 01:12:03 +00:00
Jakub Zawadzki 80445e5a99 Fix off by one shift errors introduced in r39530 where it seemed proper[1]
[1] I'm unsure of packet-dtpt, so I haven't patch it.

svn path=/trunk/; revision=41873
2012-03-31 20:57:15 +00:00
Bill Meier 198c9ba55f FT_BOOLEAN hf[] entries with a 0 'bitmask' should have 'display' = BASE_NONE;
In some cases:
 Use val_to_str_const() instead of val_to_str();
 Reformat long lines;
 Do some general whitespace changes.


svn path=/trunk/; revision=41587
2012-03-16 02:00:29 +00:00
Jörg Mayer 2097912587 Rename crypt-xxx to xxx
svn path=/trunk/; revision=40511
2012-01-15 12:29:44 +00:00
Ronnie Sahlberg d745d83b3c PAC: rename CONSTRAINED_DELEGATION to S4U_DELEGATION_INFO
svn path=/trunk/; revision=40225
2011-12-16 03:41:14 +00:00
Ronnie Sahlberg 90b7941dcd Kerberos: rename the pa type 129 to the correct name PA_FOR_USER and describe where this type is specified
svn path=/trunk/; revision=40224
2011-12-16 03:18:04 +00:00
Bill Meier 1460765248 Fix tvb memory leak.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3917

svn path=/trunk/; revision=40199
2011-12-14 17:35:22 +00:00
Bill Meier d7a1840204 Replace use of tvb_get_ephemeral_faked_unicode() by use of tvb_get_ephemeral_unicode_string();
Fix encoding arg as needed.

svn path=/trunk/; revision=39530
2011-10-23 22:58:45 +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 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
Bill Meier 058fc19f45 Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000
svn path=/trunk/; revision=37371
2011-05-23 18:04:45 +00:00
Guy Harris 4fdcc5c180 Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
as an argument, along the lines of ws_fstat64, and, on Windows, make it
use _wstati64, to handle 64-bit file sizes.

svn path=/trunk/; revision=36547
2011-04-10 20:59:10 +00:00
Jeff Morriss ed329ca1d4 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=35543
2011-01-15 19:01:53 +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 93b94a23ca Define some fcns & vars as static; Some #includes not req'd; packet-mikey.h not req'd.
svn path=/trunk/; revision=34464
2010-10-10 23:28:40 +00:00
Jeff Morriss cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Bill Meier 812f7c0ba7 Reword two error messages as per Bug #4518.
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4518

svn path=/trunk/; revision=32994
2010-05-27 15:47:34 +00:00
Jaap Keuter 39bd052f7b From Hadar Shoham:
Add support to AP request option reserved bit.

svn path=/trunk/; revision=32910
2010-05-20 18:34:38 +00:00
Bill Meier 1a474d8264 Use consistent indentation; Whitespace & formatting cleanup.
svn path=/trunk/; revision=32754
2010-05-11 15:34:57 +00:00
Bill Meier 2af17da2c1 Fix handling of pa-data-type KRB5_PA_PAC_REQUEST (& KRB5_PA_S4U2SELF).
-Define pa-data-type KRB5_PA_PAC_REQUEST properly so that it is recognized.
  Fixes bug #4752 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4752)
-Also revert definition of  KRB5_PA_S4U2SELF (to be a positive number).
(All of the above reverts part of SVN #31400).

-Display pa-data-type as FT_INT32.
-Display the value for pa-data-type KRB5_PA_PAC_REQUEST as Boolean (not Int).

svn path=/trunk/; revision=32752
2010-05-11 14:34:16 +00:00
Gerald Combs 55a8440162 In our case, not being able to read the Kerberos configuration file
isn't a big deal.

svn path=/trunk/; revision=31626
2010-01-22 22:36:03 +00:00
Gerald Combs 2efa26e0e1 Fix a double-free bug which was causing a crash. Our decryption buffer
length doesn't change, so allocate it just once. Add an expert item for
a successful decryption.

svn path=/trunk/; revision=31571
2010-01-19 19:28:30 +00:00
Bill Meier c5614625ee Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
2010-01-18 23:16:10 +00:00
Anders Broman 253ce6255d Try to fix a memory leak.
svn path=/trunk/; revision=31514
2010-01-13 16:35:50 +00:00
Anders Broman 7afd9b0c3b From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=31408
2010-01-02 09:46:16 +00:00
Bill Meier c0d270e5f0 Fix Bug #4363: wireshark decodes kerberos AS-REQ PADATA incorrectly.
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4363

svn path=/trunk/; revision=31400
2010-01-01 17:11:38 +00:00