aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tftp.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-08Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-2/+6
Other minor cleanups while in the area. Change-Id: I623d941e53128f169e55dfc629547b4221fa72fc Reviewed-on: https://code.wireshark.org/review/4021 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-05we may set a TFTP port via Decode AsMartin Kaiser1-3/+5
take this setting into account when we try to detect the first packet of a tftp transfer Change-Id: Ia80f9b5f994b02ecaaa063308b1a87d00fe0dafe Reviewed-on: https://code.wireshark.org/review/3450 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05we either have a source or a destination file nameMartin Kaiser1-0/+5
when we set one, we clear the other Change-Id: I7c316dc9cc7b2c93cfa1b00eb617553f55a58715 Reviewed-on: https://code.wireshark.org/review/3449 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05delete the port range before re-creating itMartin Kaiser1-1/+1
Change-Id: I80f7e438cbb44c40ee28f1eb78a7779f43563732 Reviewed-on: https://code.wireshark.org/review/3448 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05if the original packet already contains a file name,Martin Kaiser1-10/+13
don't add a generated tree item with the filename stored in the conversation Change-Id: Ia9a7fe712d0dd8241399e456509019b8e3902554 Reviewed-on: https://code.wireshark.org/review/3447 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05no need for if(tree)Martin Kaiser1-20/+16
display the opcode first, followed by the file name Change-Id: Ic5dd7409414d2f748c326c59a4b850dc2244da1f Reviewed-on: https://code.wireshark.org/review/3446 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05delete unnecessary return;Martin Kaiser1-2/+0
Change-Id: Ia91d51acd7dedd18ba5d0a73bc353b2d198474c7 Reviewed-on: https://code.wireshark.org/review/3445 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29don't add nonprinting \000 characters to tftp option stringsMartin Kaiser1-4/+8
Change-Id: I81e43fac5176fdd0805001636991efb7f588a3c0 Reviewed-on: https://code.wireshark.org/review/3252 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29remove unnecessary return; statementMartin Kaiser1-2/+0
Change-Id: Icefbaf632e888e84bcb2cc20ae3a6c4744b82fae Reviewed-on: https://code.wireshark.org/review/3251 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-4/+2
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-2/+2
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-09Try to fix acket-tftp.c:207: error: \u2018data_tvb\u2019 may be usedAndersBroman1-1/+1
uninitialized in this function. Change-Id: I92a344b8ec86fc71b64903c2e6edc74f8ed7a330 Reviewed-on: https://code.wireshark.org/review/2066 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-05Add Object (file) export for files transferred over TFTP.Martin Mathieson1-3/+131
Updated following review comments. Change-Id: I56e70d8f8e332d2aea604ceec16c980ad890fa58 Reviewed-on: https://code.wireshark.org/review/1885 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.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-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