Commit Graph

45 Commits

Author SHA1 Message Date
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +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
Stig Bjørlykke cc182a8bad Added support for User-Agent.
Fixed finding line end for content type parameters.

svn path=/trunk/; revision=39459
2011-10-18 16:06:17 +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
Stig Bjørlykke 7fe5caa929 Added support for SIO-Label from draft-zeilenga-email-seclabel-04.
svn path=/trunk/; revision=39415
2011-10-14 07:44:50 +00:00
Stig Bjørlykke 3be3568bce Cleanup the unregister loop to avoid freeing wrong data.
svn path=/trunk/; revision=39269
2011-10-05 11:44:38 +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 039fc59cb1 Free duplicated strings in hf entries.
svn path=/trunk/; revision=39259
2011-10-04 21:06:40 +00:00
Stig Bjørlykke 3316585afb Make custom IMF headers a part of profiles.
svn path=/trunk/; revision=39253
2011-10-04 18:53:35 +00:00
Stig Bjørlykke b3f8f54079 Delete allocated header fields when updating the UAT.
Don't call header_fields_initialize_cb for prefs, as it will be called
when done in the UAT.

svn path=/trunk/; revision=39252
2011-10-04 18:41:07 +00:00
Jeff Morriss d9d46c3014 Make value_strings const to fix checkapi warning. Do some minor reformatting.
svn path=/trunk/; revision=39250
2011-10-04 13:30:50 +00:00
Stig Bjørlykke 92001a0d3d Added support for configuring custom IMF headers.
svn path=/trunk/; revision=39249
2011-10-04 10:13:05 +00:00
Stig Bjørlykke c25dd4b1ce Don't prefix description with imf.
svn path=/trunk/; revision=38553
2011-08-16 09:08:36 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Bill Meier f3432a973c Don't assign to a proto_item* if the value won't be used:
Fixes Coverity 903,935,968,985,997,999,1024,1025,1134;
Remove unneeded #includes;
Do whitespace cleanup.

svn path=/trunk/; revision=37331
2011-05-20 15:44:25 +00:00
Gerald Combs 2d2109c0c7 Remove another unneeded NULL check. Fixes Coverity CID 605.
svn path=/trunk/; revision=36673
2011-04-16 22:02:14 +00:00
Chris Maynard 2db46ad8d4 Remove const type qualifier from cast. Resolves CID's 582-585.
svn path=/trunk/; revision=36430
2011-04-01 16:30:59 +00:00
Chris Maynard 4a8fa72830 Append text to INFO column. Closes out bug 4472.
svn path=/trunk/; revision=35423
2011-01-07 19:22:09 +00:00
Bill Meier df3c52dc2a Whitespace cleanup;
Add some braces;

svn path=/trunk/; revision=35018
2010-11-24 03:43:09 +00:00
Bill Meier 96510d9b38 Tighten up code dissecting message header.
This corrects the specific issue reported in Bug #3317
wherein the dissector decided there was a valid but unknown
header when dissecting a binary (non text) message with a ":"
as the last byte.

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

Note that a larger issue remains: the IMF dissector
presumably shouldn't really even try to dissect a
binary payload (which is proably encrypted text).

svn path=/trunk/; revision=35017
2010-11-24 02:11:43 +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
Stig Bjørlykke 44c960a3dc Improved dumping when incorrect line ending.
svn path=/trunk/; revision=32512
2010-04-19 09:04:49 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +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
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
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +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
Graeme Lunt 2c105f125b Decode id-data, usually found within S/MIME (CMS), as IMF/MIME.
svn path=/trunk/; revision=28711
2009-06-12 10:39:03 +00:00
Stig Bjørlykke fc3f1b5283 From Artem Tamazov (bug 3472):
Save/Restore pinfo->private_data when used.

svn path=/trunk/; revision=28412
2009-05-19 17:16:14 +00:00
Bill Meier 09d097e7a7 #include <conversation.h> not req'd ....
svn path=/trunk/; revision=27389
2009-02-06 20:33:53 +00:00
Bill Meier aa30dcd129 Minor proto_reg_handoff cleanup: use find_dissector when appropriate.
svn path=/trunk/; revision=26308
2008-09-30 14:49:44 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +00:00
Graeme Lunt 847d2bcb88 Support for some additionl heading fields and the display of the (non-MIME) message text.
svn path=/trunk/; revision=24991
2008-04-13 16:38:01 +00:00
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Anders Broman 57592cb2aa http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1739
Fro Stig Bjørlykke:
1. BER: Added support for empty indef SET
2. RTSE: Added fragment length in COL_INFO
3. IMF: Use correct hf_id for extension value
4. DOP: Fix typo in COL_INFO oid name

svn path=/trunk/; revision=22492
2007-08-13 16:41:16 +00:00
Anders Broman 6c161ff927 Packet-imf.c - Offset must be advanced to AFTER CRLF(CRLF).
packet-multipart.c - imf_find_field_end()'s maxlength is last offset in tvb.

svn path=/trunk/; revision=22476
2007-08-09 12:17:56 +00:00
Guy Harris d38d3652d9 "key" is a guint8 *; make the pointer into the string to which it refers
a guint8 * as well - that keeps us from sign-extending the characters
before passing them to the ctype.h macros.

svn path=/trunk/; revision=22337
2007-07-17 19:09:50 +00:00
Jeff Morriss a1c34d30c8 Don't use g_ascii_isupper() nor g_ascii_tolower(): they don't exist in GTK1. Replaced with generic isupper() and tolower().
svn path=/trunk/; revision=22336
2007-07-17 18:56:09 +00:00
Graeme Lunt b1a3d8a5a0 Expose a function (imf_find_field_end()) and
make the field format dissection case-insensitive.

svn path=/trunk/; revision=22310
2007-07-14 09:15:02 +00:00
Graeme Lunt 14e67d04bc New dissector for Internet Message Format (IMF) - RFC 2822.
It provides basic dissection of the text-based protocol, providing fields for filtering.
It also calls the multipart dissector for any MIME body that is found.
It includes very basic support for MIXER (RFC 2156) fields.
It also registers itself as "message/rfc822" in the media type table.


svn path=/trunk/; revision=22241
2007-07-04 16:24:20 +00:00