Commit graph

50 commits

Author SHA1 Message Date
Jeff Morriss
d7d39e9597 From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6470 :
Add some filters to the SMTP dissector (proto_tree_add_text() ->
proto_tree_add_item()).

svn path=/trunk/; revision=39550
2011-10-25 01:13:21 +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
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
26ba5d5714 Renamed reassembled snmp bytes buffer to "Reassembled SMTP".
svn path=/trunk/; revision=37470
2011-05-30 12:43:35 +00:00
Bill Meier
a2b58f051d Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;
(In many cases I previously incorrectly removed the #include <stdlib.h>).

svn path=/trunk/; revision=37334
2011-05-20 19:00:09 +00:00
Alexis La Goutte
ab2e933449 Remove is_continuation_line variable (Unused for 3 years with add SMTP Command Pipelining (RFC2920) Rev24989)
Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang 



svn path=/trunk/; revision=36763
2011-04-21 13:42:15 +00:00
Alexis La Goutte
866aede51e Fix Dead Store (Dead nested assignment) Warning found by Clang
svn path=/trunk/; revision=36759
2011-04-21 13:33:59 +00:00
Stig Bjørlykke
84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +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
Sake Blok
d323dd81ec Fix for bug 4544 - Decrypted data for STARTLS session is not shown in packet list when using "starttls" SSL decryption preference
- make sure the SSL dissector knows how to reach the original dissector for the decrypted data
- make sure the SMTP dissector does not call the SSL dissector again with the decrypted data


svn path=/trunk/; revision=32921
2010-05-23 22:23:33 +00:00
Jeff Morriss
729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Bill Meier
b28dbd9656 Minor Reformatting; Rename some enum constant identifiers to be a bit more specific;
svn path=/trunk/; revision=32270
2010-03-22 20:59:35 +00:00
Stig Bjørlykke
88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Bill Meier
73eb16d678 Fix some gcc -Wshadow warnings
svn path=/trunk/; revision=31623
2010-01-22 17:41:47 +00:00
Stig Bjørlykke
4867f84826 From rmkml via wireshark-dev:
Redirect secure SMTP traffic on non-standard port 465 to the ssl dissector.

svn path=/trunk/; revision=31482
2010-01-10 19:39:35 +00:00
Stephen Fisher
9317528c96 Introduce a value_string to provide descriptions for some SMTP response
codes.


svn path=/trunk/; revision=31305
2009-12-18 04:04:15 +00:00
Kovarththanan Rajaratnam
e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +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
Guy Harris
ed30baaa0d size_t fix (you won't get more than 2^31-1 bytes there).
svn path=/trunk/; revision=27953
2009-04-03 19:03:31 +00:00
Stig Bjørlykke
a1a14719ea From Didier Gautheron (bug 3056):
1) do more work when tree is NULL, otherwise data desegmentation doesn't work.
2) set desegment_len to DESEGMENT_ONE_MORE_SEGMENT rather than 1 when searching
   for end of line.
3) set frame_data->pdu_type for STARTTLS cmd and use se_alloc0 rather than
   se_alloc
4) restore pinfo can_desegment to saved_can_desegment or ssl can't desegment
   packets.
5) move TLS call before searching for cmd. It doesn't deal with rejected TLS
   negotation. Not hard to do but I haven't a capture, it anyone can share one.

svn path=/trunk/; revision=26826
2008-11-23 14:18:07 +00:00
Stig Bjørlykke
9a50932bcf From Ward van Wanrooij (bug 2955):
Add the fragment to the defragmentation sequence if the SMTP dissector
encouters a packet that contains both a DATA fragment and the terminating
\r\n.\r\n sequence.

svn path=/trunk/; revision=26419
2008-10-11 16:01:48 +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
961698e3e7 strncasecmp ==> g_ascii_strncasecmp
svn path=/trunk/; revision=26172
2008-09-10 12:57:48 +00:00
Guy Harris
9e82ae1e49 Move the advancement of the packet offset outside the "if (tree)".
This fixes bug 2856.

svn path=/trunk/; revision=26159
2008-09-07 08:44:47 +00:00
Guy Harris
dd317fd99c Style and indentation cleanups.
Don't initialize a variable that's set (in the handoff registration
routine) before being used.

Now that we're GLib 2.0-only, use g_ascii_isalpha() rather than rolling
our own.

svn path=/trunk/; revision=26157
2008-09-07 01:50:44 +00:00
Guy Harris
22b5159053 Add support for TLS-over-SMTP.
svn path=/trunk/; revision=26156
2008-09-07 01:28:43 +00:00
Guy Harris
93e12f5b69 Have a line_is_smtp_command() routine to check whether a line is an SMTP
command, and use that in the parsing loop (that means we don't have to
treat 4-character commands and non-4-character commands separately).

svn path=/trunk/; revision=26155
2008-09-06 23:58:23 +00:00
Guy Harris
73e36ab9da Add some comments.
svn path=/trunk/; revision=26153
2008-09-06 22:33:22 +00:00
Guy Harris
b7d8597ec3 Move another comment next to the code to which it refers.
svn path=/trunk/; revision=26144
2008-09-05 09:51:13 +00:00
Guy Harris
e707fb415f Move a comment to the right place.
svn path=/trunk/; revision=26143
2008-09-05 09:28:08 +00:00
Guy Harris
19d3eb7004 Clean up indentation.
svn path=/trunk/; revision=26142
2008-09-05 09:07:46 +00:00
Bill Meier
44af6ef887 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25290
2008-05-14 01:47:41 +00:00
Stig Bjørlykke
da74314d91 Initialize linelen to avoid a warning.
svn path=/trunk/; revision=24994
2008-04-13 16:58:57 +00:00
Graeme Lunt
fe88a7720d Support for RFC 2920 SMTP Command Pipelining.
The client can send multiple requests before waiting for responses.
Multiple requests/responses are delimited in the info column using  " | ".

Also changed to using "C:" (client) and "S:" (server) to save space in the info column and align with examples in RFC 2821.

Lack of support for PIPELINING was shown up during Sake's session at SharkFest08!


svn path=/trunk/; revision=24989
2008-04-13 16:33:44 +00:00
Anders Broman
63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Jaap Keuter
cec1f884e9 Add submission port dissection.
svn path=/trunk/; revision=23957
2007-12-28 09:09:09 +00:00
Guy Harris
9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +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
Stig Bjørlykke
a29b4bf19e Added support for RFC3030 (BDAT) in SMTP.
Added data fragment length to COL_INFO.
Changed some 0/1 values to boolean.

http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1736

svn path=/trunk/; revision=22516
2007-08-15 22:29:58 +00:00
Graeme Lunt
1066b988e6 New preference to allow for the reassembly of SMTP DATA and subsequent dissection as Internet Message Format (imf).
(imf dissector in separate patch).


svn path=/trunk/; revision=22240
2007-07-04 16:16:32 +00:00
Stephen Fisher
8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher
85a464c980 Fix a bunch of warnings, add svn:keywords Id and svn:eol-style native
to packet-iuup.c.
 

svn path=/trunk/; revision=21244
2007-03-28 07:06:39 +00:00
Martin Mathieson
e694978c74 Allow DCT2000 support to find a couple of more protocols.
Try to squash some warnings seen on the ubuntu buildbot log

svn path=/trunk/; revision=19683
2006-10-25 16:46:27 +00:00
Ronnie Sahlberg
feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg
f6e45c9d5f remove some unused variables from scsi
change two gmemchunks in smtp to se_alloc() and remove one now redundant init routine.


svn path=/trunk/; revision=15308
2005-08-12 10:03:17 +00:00
Anders Broman
851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris
bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Ulf Lamping
d530bd4e14 Prevent the word "desegmentation" at the GUI, but use reassembling at that places, as we also use "defragmentation" and "reassembling". Use reassembling as the general term for such actions.
I (hopefully) didn't changed any protocol fields or preference file names, but only the GUI labels appearing in the protocol display and the protocol preferences.

Also added a note to the protocol preferences (where appropriate), that you have to enable "Allow subdissectors to reassemble TCP streams" at the corresponding protocol settings for TCP reassembling to take effect.

If you encounter any mistakes I've made here, please let me know...

svn path=/trunk/; revision=11784
2004-08-21 09:02:52 +00:00
Guy Harris
3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Gilbert Ramirez
669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00
Renamed from packet-smtp.c (Browse further)