tftp_common.h File Reference

Definitions common to TFTP client and server. More...

#include "core/net.h"

Go to the source code of this file.

Macros

#define TFTP_PORT   69
 

Typedefs

struct {
   uint16_t   opcode
 
   char_t   filename []
 
TftpRrqPacket
 Read request packet (RRQ) More...
 
struct {
   uint16_t   opcode
 
   char_t   filename []
 
TftpWrqPacket
 Write request packet (WRQ) More...
 
struct {
   uint16_t   opcode
 
   uint16_t   block
 
   uint8_t   data []
 
TftpDataPacket
 Data packet (DATA) More...
 
struct {
   uint16_t   opcode
 
   uint16_t   block
 
TftpAckPacket
 Acknowledgment packet (ACK) More...
 
struct {
   uint16_t   opcode
 
   uint16_t   errorCode
 
   char_t   errorMsg []
 
TftpErrorPacket
 Error packet (ERROR) More...
 

Enumerations

enum  TftpOpcode {
  TFTP_OPCODE_RRQ = 1, TFTP_OPCODE_WRQ = 2, TFTP_OPCODE_DATA = 3, TFTP_OPCODE_ACK = 4,
  TFTP_OPCODE_ERROR = 5, TFTP_OPCODE_OACK = 6
}
 TFTP opcodes. More...
 
enum  TftpErrorCode {
  TFTP_ERROR_NOT_DEFINED = 0, TFTP_ERROR_FILE_NOT_FOUND = 1, TFTP_ERROR_ACCESS_VIOLATION = 2, TFTP_ERROR_DISK_FULL = 3,
  TFTP_ERROR_ILLEGAL_OPERATION = 4, TFTP_ERROR_UNKNOWN_TID = 5, TFTP_ERROR_FILE_ALREADY_EXISTS = 6, TFTP_ERROR_NO_SUCH_USER = 7
}
 TFTP error codes. More...
 

Detailed Description

Definitions common to TFTP client and server.

License

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

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.0

Definition in file tftp_common.h.

Macro Definition Documentation

◆ TFTP_PORT

#define TFTP_PORT   69

Definition at line 36 of file tftp_common.h.

Typedef Documentation

◆ TftpAckPacket

typedef { ... } TftpAckPacket

Acknowledgment packet (ACK)

◆ TftpDataPacket

typedef { ... } TftpDataPacket

Data packet (DATA)

◆ TftpErrorPacket

typedef { ... } TftpErrorPacket

Error packet (ERROR)

◆ TftpRrqPacket

typedef { ... } TftpRrqPacket

Read request packet (RRQ)

◆ TftpWrqPacket

typedef { ... } TftpWrqPacket

Write request packet (WRQ)

Enumeration Type Documentation

◆ TftpErrorCode

TFTP error codes.

Enumerator
TFTP_ERROR_NOT_DEFINED 
TFTP_ERROR_FILE_NOT_FOUND 
TFTP_ERROR_ACCESS_VIOLATION 
TFTP_ERROR_DISK_FULL 
TFTP_ERROR_ILLEGAL_OPERATION 
TFTP_ERROR_UNKNOWN_TID 
TFTP_ERROR_FILE_ALREADY_EXISTS 
TFTP_ERROR_NO_SUCH_USER 

Definition at line 63 of file tftp_common.h.

◆ TftpOpcode

enum TftpOpcode

TFTP opcodes.

Enumerator
TFTP_OPCODE_RRQ 

Read request.

TFTP_OPCODE_WRQ 

Write request.

TFTP_OPCODE_DATA 

Data.

TFTP_OPCODE_ACK 

Acknowledgment.

TFTP_OPCODE_ERROR 

Error.

TFTP_OPCODE_OACK 

Option acknowledgment.

Definition at line 48 of file tftp_common.h.

Variable Documentation

◆ block

uint16_t block

Definition at line 111 of file tftp_common.h.

◆ data

uint8_t data[]

Definition at line 112 of file tftp_common.h.

◆ errorCode

uint16_t errorCode

Definition at line 134 of file tftp_common.h.

◆ errorMsg

char_t errorMsg[]

Definition at line 135 of file tftp_common.h.

◆ filename

char_t filename[]

Definition at line 89 of file tftp_common.h.

◆ opcode

uint16_t opcode

Definition at line 88 of file tftp_common.h.