Helper functions for TFTP client. More...
Go to the source code of this file.
Detailed Description
Helper functions for TFTP client.
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.
- Version
- 2.4.4
Definition in file tftp_client_misc.h.
Function Documentation
◆ tftpClientCloseConnection()
void tftpClientCloseConnection | ( | TftpClientContext * | context | ) |
Close connection with the TFTP server.
- Parameters
-
[in] context Pointer to the TFTP client context
Definition at line 95 of file tftp_client_misc.c.
◆ tftpClientOpenConnection()
error_t tftpClientOpenConnection | ( | TftpClientContext * | context | ) |
Open connection with the TFTP server.
- Parameters
-
[in] context Pointer to the TFTP client context
- Returns
- Error code
Definition at line 49 of file tftp_client_misc.c.
◆ tftpClientProcessAckPacket()
void tftpClientProcessAckPacket | ( | TftpClientContext * | context, |
uint16_t | srcPort, | ||
const TftpAckPacket * | ackPacket, | ||
size_t | length | ||
) |
Process incoming ACK packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] srcPort Source port number [in] ackPacket Pointer to the ACK packet [in] length Length of the packet, in bytes
Definition at line 309 of file tftp_client_misc.c.
◆ tftpClientProcessDataPacket()
void tftpClientProcessDataPacket | ( | TftpClientContext * | context, |
uint16_t | srcPort, | ||
const TftpDataPacket * | dataPacket, | ||
size_t | length | ||
) |
Process incoming DATA packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] srcPort Source port number [in] dataPacket Pointer to the DATA packet [in] length Length of the packet, in bytes
Definition at line 240 of file tftp_client_misc.c.
◆ tftpClientProcessErrorPacket()
void tftpClientProcessErrorPacket | ( | TftpClientContext * | context, |
uint16_t | srcPort, | ||
const TftpErrorPacket * | errorPacket, | ||
size_t | length | ||
) |
Process incoming ERROR packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] srcPort Source port number [in] errorPacket Pointer to the ERROR packet [in] length Length of the packet, in bytes
Definition at line 395 of file tftp_client_misc.c.
◆ tftpClientProcessEvents()
error_t tftpClientProcessEvents | ( | TftpClientContext * | context | ) |
Process TFTP client events.
- Parameters
-
[in] context Pointer to the TFTP client context
- Returns
- Error code
Definition at line 113 of file tftp_client_misc.c.
◆ tftpClientProcessPacket()
void tftpClientProcessPacket | ( | TftpClientContext * | context, |
const IpAddr * | srcIpAddr, | ||
uint16_t | srcPort | ||
) |
Process incoming packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] srcIpAddr Source IP address [in] srcPort Source port number
Definition at line 187 of file tftp_client_misc.c.
◆ tftpClientRetransmitPacket()
error_t tftpClientRetransmitPacket | ( | TftpClientContext * | context | ) |
Retransmit the last packet.
- Parameters
-
[in] context Pointer to the TFTP client context
- Returns
- Error code
Definition at line 674 of file tftp_client_misc.c.
◆ tftpClientSendAckPacket()
error_t tftpClientSendAckPacket | ( | TftpClientContext * | context | ) |
Send ACK packet.
- Parameters
-
[in] context Pointer to the TFTP client context
- Returns
- Error code
Definition at line 583 of file tftp_client_misc.c.
◆ tftpClientSendDataPacket()
error_t tftpClientSendDataPacket | ( | TftpClientContext * | context | ) |
Send DATA packet.
- Parameters
-
[in] context Pointer to the TFTP client context
- Returns
- Error code
Definition at line 543 of file tftp_client_misc.c.
◆ tftpClientSendErrorPacket()
error_t tftpClientSendErrorPacket | ( | TftpClientContext * | context, |
uint16_t | errorCode, | ||
const char_t * | errorMsg | ||
) |
Send ERROR packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] errorCode Integer indicating the nature of the error [in] errorMsg Error message intended for human consumption
- Returns
- Error code
Definition at line 625 of file tftp_client_misc.c.
◆ tftpClientSendRrqPacket()
error_t tftpClientSendRrqPacket | ( | TftpClientContext * | context, |
const char_t * | filename, | ||
const char_t * | mode | ||
) |
Send RRQ packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] filename NULL-terminated string specifying the filename [in] mode NULL-terminated string specifying the transfer mode
- Returns
- Error code
Definition at line 433 of file tftp_client_misc.c.
◆ tftpClientSendWrqPacket()
error_t tftpClientSendWrqPacket | ( | TftpClientContext * | context, |
const char_t * | filename, | ||
const char_t * | mode | ||
) |
Send WRQ packet.
- Parameters
-
[in] context Pointer to the TFTP client context [in] filename NULL-terminated string specifying the filename [in] mode NULL-terminated string specifying the transfer mode
- Returns
- Error code
Definition at line 489 of file tftp_client_misc.c.