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.

Macros

#define TRACE_LEVEL   TFTP_TRACE_LEVEL
 

Functions

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...
 
error_t tftpServerStop (TftpServerContext *context)
 Stop TFTP server. More...
 
void tftpServerTask (TftpServerContext *context)
 TFTP server task. More...
 
void tftpServerDeinit (TftpServerContext *context)
 Release TFTP server context. More...
 

Detailed Description

TFTP server.

License

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

Copyright (C) 2010-2024 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.

Description

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
Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file tftp_server.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TFTP_TRACE_LEVEL

Definition at line 42 of file tftp_server.c.

Function Documentation

◆ tftpServerDeinit()

void tftpServerDeinit ( TftpServerContext context)

Release TFTP server context.

Parameters
[in]contextPointer to the TFTP server context

Definition at line 363 of file tftp_server.c.

◆ tftpServerGetDefaultSettings()

void tftpServerGetDefaultSettings ( TftpServerSettings settings)

Initialize settings with default values.

Parameters
[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.

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

Definition at line 89 of file tftp_server.c.

◆ tftpServerStart()

error_t tftpServerStart ( TftpServerContext context)

Start TFTP server.

Parameters
[in]contextPointer to the TFTP server context
Returns
Error code

Definition at line 139 of file tftp_server.c.

◆ tftpServerStop()

error_t tftpServerStop ( TftpServerContext context)

Stop TFTP server.

Parameters
[in]contextPointer to the TFTP server context
Returns
Error code

Definition at line 221 of file tftp_server.c.

◆ tftpServerTask()

void tftpServerTask ( TftpServerContext context)

TFTP server task.

Parameters
[in]contextPointer to the TFTP server context

Definition at line 268 of file tftp_server.c.