tftp_server.c File Reference

TFTP server. More...

#include "tftp/tftp_server.h"
#include "tftp/tftp_server_misc.h"
#include "debug.h"

Go to the source code of this file.




void tftpServerGetDefaultSettings (TftpServerSettings *settings)
 Initialize settings with default values. More...
error_t tftpServerInit (TftpServerContext *context, const TftpServerSettings *settings)
 TFTP server initialization. More...
error_t tftpServerStart (TftpServerContext *context)
 Start TFTP server. More...
void tftpServerTask (TftpServerContext *context)
 TFTP server task. More...

Detailed Description

TFTP server.


SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


TFTP is a very simple protocol used to transfer files. Refer to the following RFCs for complete details:

  • RFC 1123: Requirements for Internet Hosts
  • RFC 1350: The TFTP Protocol (Revision 2)
  • RFC 1782: TFTP Option Extension
  • RFC 1783: TFTP Blocksize Option
  • RFC 1784: TFTP Timeout Interval and Transfer Size Options
Oryx Embedded SARL (

Definition in file tftp_server.c.

Macro Definition Documentation



Definition at line 42 of file tftp_server.c.

Function Documentation

◆ tftpServerGetDefaultSettings()

void tftpServerGetDefaultSettings ( TftpServerSettings settings)

Initialize settings with default values.

[out]settingsStructure that contains TFTP server settings

Definition at line 58 of file tftp_server.c.

◆ tftpServerInit()

error_t tftpServerInit ( TftpServerContext context,
const TftpServerSettings settings 

TFTP server initialization.

[in]contextPointer to the TFTP server context
[in]settingsTFTP server specific settings
Error code

Definition at line 84 of file tftp_server.c.

◆ tftpServerStart()

error_t tftpServerStart ( TftpServerContext context)

Start TFTP server.

[in]contextPointer to the TFTP server context
Error code

Definition at line 158 of file tftp_server.c.

◆ tftpServerTask()

void tftpServerTask ( TftpServerContext context)

TFTP server task.

[in]contextPointer to the TFTP server context

Definition at line 187 of file tftp_server.c.