A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tftp.h Source File

tftp.h

00001 #include <stdint.h>
00002 #include <stdbool.h>
00003 
00004 extern bool     TftpTrace;
00005 
00006 extern char     TftpServerName[];
00007 extern char     TftpFileName[];
00008 extern int      TftpWriteStatus;
00009 
00010 #define TFTP_WRITE_STATUS_UNAVAILABLE -1
00011 #define TFTP_WRITE_STATUS_NONE         0
00012 #define TFTP_WRITE_STATUS_REQUEST      1
00013 #define TFTP_WRITE_STATUS_IN_PROGRESS  2
00014 
00015 extern bool     TftpSendRequestsViaIp4;
00016 extern uint32_t TftpServerIp4;
00017 extern char     TftpServerIp6[];
00018 
00019 extern int    (*TftpGetNextByteFunction)();
00020 
00021 extern int      TftpHandlePacketReceived(void (*traceback)(void), int sizeRx, void* pPacketRx, int* pSizeTx, void* pPacketTx);
00022 extern int      TftpPollForPacketToSend(int type, void* pPacket, int* pSize);
00023 
00024 #define TFTP_SERVER_PORT 69
00025 #define TFTP_CLIENT_PORT 60690