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
40
extern
"C"
{
41
#endif
42
43
//TFTP client related functions
44
error_t
tftpClientOpenConnection(
TftpClientContext
*context);
45
void
tftpClientCloseConnection(
TftpClientContext
*context);
46
47
error_t
tftpClientProcessEvents(
TftpClientContext
*context);
48
49
void
tftpClientProcessPacket(
TftpClientContext
*context,
50
const
IpAddr
*srcIpAddr, uint16_t srcPort);
51
52
void
tftpClientProcessDataPacket(
TftpClientContext
*context,
53
uint16_t srcPort,
const
TftpDataPacket *dataPacket,
size_t
length);
54
55
void
tftpClientProcessAckPacket(
TftpClientContext
*context,
56
uint16_t srcPort,
const
TftpAckPacket *ackPacket,
size_t
length);
57
58
void
tftpClientProcessErrorPacket(
TftpClientContext
*context,
59
uint16_t srcPort,
const
TftpErrorPacket *errorPacket,
size_t
length);
60
61
error_t
tftpClientSendRrqPacket(
TftpClientContext
*context,
62
const
char_t *filename,
const
char_t *mode);
63
64
error_t
tftpClientSendWrqPacket(
TftpClientContext
*context,
65
const
char_t *filename,
const
char_t *mode);
66
67
error_t
tftpClientSendDataPacket(
TftpClientContext
*context);
68
error_t
tftpClientSendAckPacket(
TftpClientContext
*context);
69
70
error_t
tftpClientSendErrorPacket(
TftpClientContext
*context,
71
uint16_t errorCode,
const
char_t *errorMsg);
72
73
error_t
tftpClientRetransmitPacket(
TftpClientContext
*context);
74
75
//C++ guard
76
#ifdef __cplusplus
77
}
78
#endif
79
80
#endif
error_t
error_t
Error codes.
Definition
error.h:43
net.h
TCP/IP stack core.
IpAddr
IP network address.
Definition
ip.h:72
TftpClientContext
TFTP client context.
Definition
tftp_client.h:129
tftp_client.h
TFTP client.