Commit Graph

61 Commits

Author SHA1 Message Date
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +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
Pascal Quantin 953c6fed13 emem -> wmem
svn path=/trunk/; revision=52130
2013-09-17 21:34:05 +00:00
Michael Mann 7ec34a52c5 expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51850
2013-09-09 00:11:19 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Bill Meier 3f4fb4d56b Define certain 'const char *...' arrays as static.
(That is: Don't create the array on the stack each time
  the function is called).

 Reduces code memory usage and execution time.
 (See SVN #50271)


svn path=/trunk/; revision=50296
2013-07-01 14:40:58 +00:00
Michael Mann dffc4fefc6 Batch (some of) the plugins to filterable expert infos. The Profinet plugin started to get a bit complex in determining filter names (especially the DCOM stuff), so I'll leave that to someone more familiar with the protocol.
svn path=/trunk/; revision=49624
2013-05-29 23:41:33 +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
Bill Meier f784806968 Comment out numerous unused hf_.... instances found by checkhf.
svn path=/trunk/; revision=47617
2013-02-10 20:52:21 +00:00
Guy Harris ef175a2208 Squelch some more discarding-qualifiers warnings.
svn path=/trunk/; revision=46770
2012-12-26 11:24:39 +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
Bill Meier a4128c56b9 General cleanup:
- Use/create extended value strings as appropriate;
- Reformat hf[] entries;
- Do whitespace, & etc changes to use a consistent formatting style;
- Reformat some long lines;
- Localize some variables; remove some unneeded initializers;
- expert...() shouldnt be called under 'if (tree)' (packet-wimaxasncp);
- Move proto_register...() & etc to the end of the file (packet-ieee80211);
- Misc.

svn path=/trunk/; revision=46489
2012-12-10 14:50:32 +00:00
Michael Mann 8dcfa4214c replace unnecessary decode_numeric_bitfield calls
svn path=/trunk/; revision=45154
2012-09-26 18:33:10 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +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
Guy Harris 944ae5ae49 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42590
2012-05-11 20:02:52 +00:00
Anders Broman b1b0af6e66 From Pascal Quantin:
Fix Bug 6793  Some WiMAX messages decoded incorrectly

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

svn path=/trunk/; revision=42045
2012-04-13 13:02:57 +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 cca6984ab9 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39450
2011-10-18 00:17:48 +00:00
Chris Maynard cfca66f6e1 Remove const qualifier to name, abbrev and blurb to pacify the buildbots.
svn path=/trunk/; revision=36860
2011-04-26 01:06:25 +00:00
Guy Harris 34f8f7e77d Get rid of some unnecessary casts that just provoke uninteresting
warnings.

More fun with GArrays: cast away some warnings that don't report real
alignment problems and that wouldn't even happen if the "data" member of
a GArray were a "void *".

svn path=/trunk/; revision=36856
2011-04-25 21:20:47 +00:00
Martin Mathieson 7356320a2a Don't assign proto_item pointers that are not used.
Coverity 1174

svn path=/trunk/; revision=36395
2011-03-29 14:23:13 +00:00
Jeff Morriss f53744b59d There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().
   
Replace some tvb_get_ptr()s with tvb_get_ephemeral_string().

svn path=/trunk/; revision=35603
2011-01-21 03:00:31 +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
Jeff Morriss 9aeb1dac17 From David Katz via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5166 :
Add a configuration parameter of the NWG version for WiMAX ASN CP dissector.
The format and meaning of TLVs, as well as function types  and messages changed
between the different NWG versions.
Added support for the version number of TLVs in the dictionary xml, its parser,
and of course in the packet itself.
Added support for the version number of function-types and message-types by
extending the value_string structure to contain also a "since" version number.

Successfully tested with a live capture and capture file, containing WiMAX ASN
packets (full Network entry).
Also fuzzed 500 passes successfully.

The XML doesn't contain all existing NWG versions, only selected ones. This is
a little tedious work to go over all TLVs of each version, so I'll add some
newer versions later on. can add a short how-to of adding a new version, for
others to use, if needed.


svn path=/trunk/; revision=34919
2010-11-17 03:16:30 +00:00
Bill Meier 7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Anders Broman 846eed1d9e Get rid of check_col
svn path=/trunk/; revision=32401
2010-04-06 16:13:09 +00:00
Anders Broman dc5e066cae From sangaran:
8-bit Bit Flag decoder method needed in wimaxasncp plugin dissecto.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4608

svn path=/trunk/; revision=32356
2010-04-01 20:49:07 +00:00
Bill Meier c033a08313 Fix some gcc -Wshadow warnings.
svn path=/trunk/; revision=31724
2010-01-28 23:53:27 +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
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Bill Meier 6f87844d0a (Minor) Remove unneeded #includes.
svn path=/trunk/; revision=29492
2009-08-21 14:36:27 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Anders Broman 1196da707d From Rajasekhar Reddy Gali:
packet-wimaxasncp.c file need to update with latest wimax spec.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3730

svn path=/trunk/; revision=29125
2009-07-16 21:27:56 +00:00
Stig Bjørlykke 6d472a50fc From Kovarththanan Rajaratnam via bug 3548:
Minor hf cleanup.

svn path=/trunk/; revision=28968
2009-07-07 07:46:57 +00:00
Stig Bjørlykke 2bba6be84f From Kovarththanan Rajaratnam via bug 3548:
Cleanup header_field_info in plugins.

svn path=/trunk/; revision=28771
2009-06-18 23:22:10 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Gerald Combs fc71188963 Update calls to proto_tree_add_bytes_format to reflect r27047.
svn path=/trunk/; revision=27053
2008-12-18 20:19:49 +00:00
Stig Bjørlykke 94e9e2b1ec Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26652
2008-10-31 17:27:51 +00:00
Martin Mathieson 4aa522855d Make sure info column is set correctly when tree == NULL.
Fixes but 2561.













svn path=/trunk/; revision=25530
2008-06-23 13:02:50 +00:00
Martin Mathieson 03d7032acd Show ops, etc even when no filter set.
Also avoid crash I was seeing when changing preferences.

svn path=/trunk/; revision=25379
2008-05-26 08:22:33 +00:00
Martin Mathieson 88744abd6f Don't load in files unless tree is set.
If a user wants to load or capture quickly, they won't want to wait
for the file to be processed after the first frame.

svn path=/trunk/; revision=24781
2008-04-05 04:48:36 +00:00
Martin Mathieson 4cfefcc5a4 Use proto_register_prefix() with wimaxasncp plugin.
Also fix a crash problem seen with no filters (i.e. NULL tree).

svn path=/trunk/; revision=24767
2008-04-04 05:38:13 +00:00
Martin Mathieson b0998315f9 Fix some specifier strings (%d -> %u).
svn path=/trunk/; revision=23785
2007-12-06 17:47:00 +00:00
Martin Mathieson 9fb579537e - Prettify "Value" node that contains EAP tree with top-level details
- Lose unuseful header file

svn path=/trunk/; revision=23499
2007-11-19 19:07:49 +00:00
Martin Mathieson 24d6a39eb0 Embedding EAP inside wimaxasncp.
svn path=/trunk/; revision=23474
2007-11-16 23:03:09 +00:00
Guy Harris 6f1740aa6c Cast "char"s to "unsigned char" before handing them to <ctype.h> macros.
svn path=/trunk/; revision=23417
2007-11-10 00:36:01 +00:00