Select one of the symbols to view example projects that use it.
 
Outline
#define __TFTPSERVER_H_
#include "lwip/mem.h"
#include "lwip/udp.h"
#define TFTP_OPCODE_LEN
#define TFTP_BLKNUM_LEN
#define TFTP_ERRCODE_LEN
#define TFTP_DATA_LEN_MAX
#define TFTP_DATA_PKT_HDR_LEN
#define TFTP_ERR_PKT_HDR_LEN
#define TFTP_ACK_PKT_LEN
#define TFTP_DATA_PKT_LEN_MAX
tftp_opcode
tftp_errorcode
tftpd_init();
tftp_process_write(struct udp_pcb *, const ip_addr_t *, unsigned short, char *);
tftp_process_read(struct udp_pcb *, const ip_addr_t *, unsigned short, char *);
Files
loading...
CodeScopeSTM32 Libraries and SamplesLwIP_TFTP_ServerInc/tftpserver.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file LwIP/LwIP_TFTP_Server/Inc/tftpserver.h * @author MCD Application Team * @brief This file is the header of tftpserver file. ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ #ifndef __TFTPSERVER_H_ #define __TFTPSERVER_H_ #include "lwip/mem.h" #include "lwip/udp.h" #define TFTP_OPCODE_LEN 2 #define TFTP_BLKNUM_LEN 2 #define TFTP_ERRCODE_LEN 2 #define TFTP_DATA_LEN_MAX 512 #define TFTP_DATA_PKT_HDR_LEN (TFTP_OPCODE_LEN + TFTP_BLKNUM_LEN) #define TFTP_ERR_PKT_HDR_LEN (TFTP_OPCODE_LEN + TFTP_ERRCODE_LEN) #define TFTP_ACK_PKT_LEN (TFTP_OPCODE_LEN + TFTP_BLKNUM_LEN) #define TFTP_DATA_PKT_LEN_MAX (TFTP_DATA_PKT_HDR_LEN + TFTP_DATA_LEN_MAX) 8 defines /* TFTP opcodes as specified in RFC1350 */ typedef enum { TFTP_RRQ = 1, TFTP_WRQ = 2, TFTP_DATA = 3, TFTP_ACK = 4, TFTP_ERROR = 5 ...} tftp_opcode; /* TFTP error codes as specified in RFC1350 */ typedef enum { TFTP_ERR_NOTDEFINED, TFTP_ERR_FILE_NOT_FOUND, TFTP_ERR_ACCESS_VIOLATION, TFTP_ERR_DISKFULL, TFTP_ERR_ILLEGALOP, TFTP_ERR_UKNOWN_TRANSFER_ID, TFTP_ERR_FILE_ALREADY_EXISTS, TFTP_ERR_NO_SUCH_USER, ...} tftp_errorcode; void tftpd_init(void); int tftp_process_write(struct udp_pcb *upcb2, const ip_addr_t *to, unsigned short to_port, char* FileName); int tftp_process_read(struct udp_pcb *upcb2, const ip_addr_t *to, unsigned short to_port, char* FileName); /* ... */ #endif