aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smtp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-5/+5
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-5/+5
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-25/+25
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-21Move epan/base64.[ch] to wsutil/ with function name change.Jakub Zawadzki1-9/+9
svn path=/trunk/; revision=54326
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+3
svn path=/trunk/; revision=53918
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-2/+2
(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-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-22emem -> wmem conversion:Pascal Quantin1-25/+25
- 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-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-15Fix warnings: comma at end of enumerator list.Chris Maynard1-1/+1
svn path=/trunk/; revision=50640
2013-07-09Fix some uninitialized variable warnings reported in bug 8904 ↵Michael Mann1-11/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8904) by setting conversation structure (smtp_session_state) to all zeros. svn path=/trunk/; revision=50472
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-2/+2
svn path=/trunk/; revision=49259
2013-05-04Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
svn path=/trunk/; revision=49157
2013-05-03Add some casts to hush the buildbots, and fix what I assume was a copy-pastoEvan Huus1-5/+5
to ensure that the return value of strlen is actually used as the length of the string. svn path=/trunk/; revision=49142
2013-05-03Finish improving NTLM and PLAIN authentication. Bug 8600 ↵Michael Mann1-27/+46
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8600) From Uli Heilmeier svn path=/trunk/; revision=49140
2013-04-22Improve AUTH handling (NTLM and elementary PLAIN mechanism)Michael Mann1-3/+162
from Uli Heilmeier, bug 8600 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8600) svn path=/trunk/; revision=48961
2013-04-18improve AUTH handling of SMTP dissector. Bug 8591 ↵Michael Mann1-7/+41
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8591) From Uli Heilmeier The current version of the SMTP dissector expects a 'AUTH LOGIN' mechanism without checking the mechanism. When some other mechanism (like NTLM or PLAIN) is in use the decoding is wrong. Furthermore it is expected that the username is in a seperate packet. When the username is in the AUTH line the password is shown as smtp.auth.username and the username is not decoded. svn path=/trunk/; revision=48910
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-12/+11
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-19From beroset:Anders Broman1-4/+4
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2013-02-26Fix spelling/typos found using a list of commonly misspelled words.Bill Meier1-1/+1
The misspellings were mostly in comments but some were in text strings visible to the user. svn path=/trunk/; revision=47899
2013-01-22Create/use extended value-string;Bill Meier1-67/+82
Add editor modelines; Do minor whitespace, long lines, and etc cleanup. svn path=/trunk/; revision=47211
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-08Convert the SMTP dissector and the frame_data manager from emem to wmem.Evan Huus1-3/+3
Canaries in the coal mine, since I have a capture handy that I know excercises both code paths. svn path=/trunk/; revision=46470
2012-12-08Fix uninitialized value error caught by valgrind.Evan Huus1-0/+2
svn path=/trunk/; revision=46469
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-07From Robert Bullen via ↵Jeff Morriss1-3/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-11From Michael Mann:Anders Broman1-115/+228
Implemented RFC 4954 within the SMTP dissector. On principle, the decryption is disabled by default (making this feature not obviously present). However I don't think there will ever be enough data that the performance would be an issue if the default was changed. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7349 svn path=/trunk/; revision=43197
2011-10-25From Michael Mann via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6470 :Jeff Morriss1-10/+21
Add some filters to the SMTP dissector (proto_tree_add_text() -> proto_tree_add_item()). svn path=/trunk/; revision=39550
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-3/+3
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-05-30Renamed reassembled snmp bytes buffer to "Reassembled SMTP".Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=37470
2011-05-20Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;Bill Meier1-0/+3
(In many cases I previously incorrectly removed the #include <stdlib.h>). svn path=/trunk/; revision=37334
2011-04-21Remove is_continuation_line variable (Unused for 3 years with add SMTP ↵Alexis La Goutte1-12/+0
Command Pipelining (RFC2920) Rev24989) Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang svn path=/trunk/; revision=36763
2011-04-21Fix Dead Store (Dead nested assignment) Warning found by Clang Alexis La Goutte1-2/+1
svn path=/trunk/; revision=36759
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+6
svn path=/trunk/; revision=35705
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-3/+3
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-05-23Fix for bug 4544 - Decrypted data for STARTLS session is not shown in packet ↵Sake Blok1-3/+11
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-13As suggested in ↵Jeff Morriss1-23/+18
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-03-22Minor Reformatting; Rename some enum constant identifiers to be a bit more ↵Bill Meier1-579/+584
specific; svn path=/trunk/; revision=32270
2010-02-02Introduce "Reassembled length" filter element for all protocols doingStig Bjørlykke1-0/+6
reassembly. svn path=/trunk/; revision=31767
2010-01-22Fix some gcc -Wshadow warningsBill Meier1-25/+25
svn path=/trunk/; revision=31623
2010-01-10From rmkml via wireshark-dev:Stig Bjørlykke1-0/+3
Redirect secure SMTP traffic on non-standard port 465 to the ssl dissector. svn path=/trunk/; revision=31482
2009-12-18Introduce a value_string to provide descriptions for some SMTP responseStephen Fisher1-1/+29
codes. svn path=/trunk/; revision=31305
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-10/+10
(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-04-03size_t fix (you won't get more than 2^31-1 bytes there).Guy Harris1-1/+1
svn path=/trunk/; revision=27953
2008-11-23From Didier Gautheron (bug 3056):Stig Bjørlykke1-30/+36
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-10-11From Ward van Wanrooij (bug 2955):Stig Bjørlykke1-4/+7
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