aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tftp.c
AgeCommit message (Collapse)AuthorFilesLines
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-12In one or more of the files:Bill Meier1-252/+252
- Create/use some extended value-strings; - Remove some unneeded initializers; - 'offset++' --> 'offset += 1' for consistency; - Set editor modelines 'tab-width' to 8 (not 4); - tabs --> spaces (to match editor modelines); - Rework/add whitespace. svn path=/trunk/; revision=53998
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+2
svn path=/trunk/; revision=53918
2013-09-22emem -> wmem conversion:Pascal Quantin1-2/+2
- 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-12Convert from emem to wmem.Jörg Mayer1-12/+12
Trivial whitespace fix in packet-tftp.c while at it. svn path=/trunk/; revision=51970
2013-08-27Use dissector_delete_uint_range/dissector_add_uint_rangeAnders Broman1-12/+2
svn path=/trunk/; revision=51540
2013-05-28Batch of filterable expert infos. This (mostly) completes the non-ASN.1 ↵Michael Mann1-4/+11
list of (built-in) dissectors that only had a small handful of add_expert_info_format calls. svn path=/trunk/; revision=49602
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
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-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-11Revert r44441: pinfo may be NULL only when pi is not NULLPascal Quantin1-2/+2
svn path=/trunk/; revision=44445
2012-08-11After commit r44435: pinfo -> NULLJörg Mayer1-2/+2
svn path=/trunk/; revision=44441
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-12-19Tighten up conversation port matching once the 2nd port is known. Fixes ↵Chris Maynard1-4/+9
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5727 svn path=/trunk/; revision=40245
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-7/+7
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-09-21Fix vi "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39074
2011-08-26Replace TRUE/FALSE with the new ENCAP stuff where appropriateJörg Mayer1-8/+8
svn path=/trunk/; revision=38746
2011-08-08Fix Coverity CID 1062: Pointer "ti" returned by proto_tree_add_item() is ↵Chris Maynard1-2/+2
never used. svn path=/trunk/; revision=38416
2011-04-06Fix Coverity 1062: UNUSED_VALUEStephen Fisher1-1/+1
svn path=/trunk/; revision=36486
2011-01-31Clean up dissector code. Pass data block to data dissector.Jaap Keuter1-122/+100
svn path=/trunk/; revision=35733
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-11-02Don't show \000 at the end of null terminated strings in the info column of ↵Stephen Fisher1-5/+5
the tftp dissector: tvb_format_text() -> tvb_format_stringzpad() svn path=/trunk/; revision=34756
2010-05-13As suggested in ↵Jeff Morriss1-8/+2
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-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2009-09-13From Stephane Bryant via ↵Jeff Morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2815 but (since the patch no longer applied cleanly) essentially manually re-implemented by me: Rename "stun" to "classic stun" and "stun2" to "stun", to follow the usage defined in draft-ietf-behave-rfc3489bis-18 section 2. svn path=/trunk/; revision=29884
2009-08-26(FWIW) One step towards including stdio.h & stdlib.h only when req'd.Bill Meier1-0/+1
svn path=/trunk/; revision=29568
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-8/+8
(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-03Added a preference to define more udp ports to use for TFTP.Stig Bjørlykke1-7/+44
svn path=/trunk/; revision=28619
2009-03-27Add request/response like tracking to the TFTP dissector. In this case, itStephen Fisher1-3/+28
is used to show the source or destination filename being trasnferred on every packet of that transfer as a generated item. svn path=/trunk/; revision=27870
2008-08-01From stéphane bryant:Anders Broman1-47/+105
STUN, STUN2 and TURN dissection enhancements. svn path=/trunk/; revision=25895
2008-07-11tvb_format_text() returns a pointer chars, not guint8sJeff Morriss1-2/+2
svn path=/trunk/; revision=25714
2008-06-21From David Moreau (bug 2621):Sake Blok1-0/+8
add support for MSDP protocol based on TFTP svn path=/trunk/; revision=25500
2008-04-09Remove:Anders Broman1-4/+0
#ifdef NEED_G_ASCII_STRCASECMP_H #include "g_ascii_strcasecmp.h" #endif svn path=/trunk/; revision=24859
2008-02-16Format our text before displaying it. This keeps Wireshark from crashing onGerald Combs1-8/+8
Ubuntu 7.10 and possibly other platforms. svn path=/trunk/; revision=24341
2007-11-27strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delendaGuy Harris1-1/+5
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-10-23Apply the small performance enhancment patches for:Anders Broman1-1/+1
- 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-01-26If there is just a tftp response without a prior request,Jörg Mayer1-2/+6
dissection would fail with dissector assert. svn path=/trunk/; revision=20562
2006-09-06- Make options filterableJörg Mayer1-41/+84
- Display options in info column - Only remember blksize from OACK packets - Add some rfc numbers - Move tftp_dissect_options in front of dissect_tftp (I forgot to fix the forward decl once too often ;) - Warning fixes - Add expert error in case of tftp-error pdu svn path=/trunk/; revision=19162
2006-09-05option name "blksize" is case in-sensitiveJörg Mayer1-1/+1
svn path=/trunk/; revision=19158
2006-09-05Fix for http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1092Jörg Mayer1-18/+55
Actually, this was a feature request: Store the value of the blksize option in the conversation data and use that information to compare whether we have reached the last packet. Includes the cleanup ideas from Ronnie. svn path=/trunk/; revision=19155
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2005-05-11Some applications do very naughty things like reusing a port for a different ↵Ronnie Sahlberg1-2/+2
protocol during different stages of an application cycle. This is very naughty and will cause problems when we have assigned a dissector to a dynamic port using conversation_set_dissector(). To make ethereal handle this case I have changed the try_conversation_dissector() to allow it to fail and return 0, meaning yes there is indeed a protocol registered for this conversation but that protocol rejected this packet. (which only happens for "new" style dissectors, "old" style dissectors will never reject a packet that way) When this happens the decode_udp_port() helper will still allow other dissectors to be tried, in the hope that the conversation is now used for some other protocol and thus someone else might be able to decode the packet. Update SNMP and TFTP dissectors to check that even if there already is a conversation but that conversation does NOT have snmp/tftp registered as the dissector for it, then create a new conversation anyway and attach the proper dissector. Since ethereal keeps track of which frame number a conversation started in, this actually works really well. svn path=/trunk/; revision=14345
2005-04-27TFTP dissector registeringTomas Kukosa1-1/+3
svn path=/trunk/; revision=14198
2005-02-02From Jon Ringle:Anders Broman1-2/+2
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
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+352
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