mikroSDK Reference Manual
tftp_client_misc.h
Go to the documentation of this file.
1
31#ifndef _TFTP_CLIENT_MISC_H
32#define _TFTP_CLIENT_MISC_H
33
34//Dependencies
35#include "core/net.h"
36#include "tftp/tftp_client.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//TFTP client related functions
44error_t tftpClientOpenConnection(TftpClientContext *context);
45void tftpClientCloseConnection(TftpClientContext *context);
46
47error_t tftpClientProcessEvents(TftpClientContext *context);
48
49void tftpClientProcessPacket(TftpClientContext *context,
50 const IpAddr *srcIpAddr, uint16_t srcPort);
51
52void tftpClientProcessDataPacket(TftpClientContext *context,
53 uint16_t srcPort, const TftpDataPacket *dataPacket, size_t length);
54
55void tftpClientProcessAckPacket(TftpClientContext *context,
56 uint16_t srcPort, const TftpAckPacket *ackPacket, size_t length);
57
58void tftpClientProcessErrorPacket(TftpClientContext *context,
59 uint16_t srcPort, const TftpErrorPacket *errorPacket, size_t length);
60
61error_t tftpClientSendRrqPacket(TftpClientContext *context,
62 const char_t *filename, const char_t *mode);
63
64error_t tftpClientSendWrqPacket(TftpClientContext *context,
65 const char_t *filename, const char_t *mode);
66
67error_t tftpClientSendDataPacket(TftpClientContext *context);
68error_t tftpClientSendAckPacket(TftpClientContext *context);
69
70error_t tftpClientSendErrorPacket(TftpClientContext *context,
71 uint16_t errorCode, const char_t *errorMsg);
72
73error_t tftpClientRetransmitPacket(TftpClientContext *context);
74
75//C++ guard
76#ifdef __cplusplus
77}
78#endif
79
80#endif
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
IP network address.
Definition ip.h:72
TFTP client context.
Definition tftp_client.h:129
TFTP client.