mikroSDK Reference Manual
tftp_server_misc.h
Go to the documentation of this file.
1
31#ifndef _TFTP_SERVER_MISC_H
32#define _TFTP_SERVER_MISC_H
33
34//Dependencies
35#include "core/net.h"
36#include "tftp/tftp_server.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//TFTP server related functions
44void tftpServerTick(TftpServerContext *context);
45
46TftpClientConnection *tftpServerOpenConnection(TftpServerContext *context,
47 const IpAddr *clientIpAddr, uint16_t clientPort);
48
49void tftpServerCloseConnection(TftpClientConnection *connection);
50
51void tftpServerAcceptRequest(TftpServerContext *context);
52
53void tftpServerProcessPacket(TftpServerContext *context,
54 TftpClientConnection *connection);
55
56void tftpServerProcessRrqPacket(TftpServerContext *context, const IpAddr *clientIpAddr,
57 uint16_t clientPort, const TftpRrqPacket *rrqPacket, size_t length);
58
59void tftpServerProcessWrqPacket(TftpServerContext *context, const IpAddr *clientIpAddr,
60 uint16_t clientPort, const TftpWrqPacket *wrqPacket, size_t length);
61
62void tftpServerProcessDataPacket(TftpClientConnection *connection,
63 const TftpDataPacket *dataPacket, size_t length);
64
65void tftpServerProcessAckPacket(TftpClientConnection *connection,
66 const TftpAckPacket *ackPacket, size_t length);
67
68void tftpServerProcessErrorPacket(TftpClientConnection *connection,
69 const TftpErrorPacket *errorPacket, size_t length);
70
71error_t tftpServerSendDataPacket(TftpClientConnection *connection);
72error_t tftpServerSendAckPacket(TftpClientConnection *connection);
73
74error_t tftpServerSendErrorPacket(TftpClientConnection *connection,
75 uint16_t errorCode, const char_t *errorMsg);
76
77error_t tftpServerRetransmitPacket(TftpClientConnection *connection);
78
79//C++ guard
80#ifdef __cplusplus
81}
82#endif
83
84#endif
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
IP network address.
Definition ip.h:72
TFTP server.