tftp_server_misc.c
Go to the documentation of this file.
903 TRACE_DEBUG("TFTP Server: Sending DATA packet (%" PRIuSIZE " bytes)...\r\n", connection->packetLen);
953 TRACE_DEBUG("TFTP Server: Sending ACK packet (%" PRIuSIZE " bytes)...\r\n", connection->packetLen);
1003 TRACE_DEBUG("TFTP Server: Sending ERROR packet (%" PRIuSIZE " bytes)...\r\n", connection->packetLen);
error_t socketSend(Socket *socket, const void *data, size_t length, size_t *written, uint_t flags)
Send data to a connected socket.
Definition: socket.c:1514
void tftpServerProcessWrqPacket(TftpServerContext *context, NetInterface *interface, const IpAddr *clientIpAddr, uint16_t clientPort, const TftpWrqPacket *wrqPacket, size_t length)
Process incoming WRQ packet.
Definition: tftp_server_misc.c:535
void tftpServerProcessPacket(TftpServerContext *context, TftpClientConnection *connection)
Process incoming packet.
Definition: tftp_server_misc.c:366
void tftpServerCloseConnection(TftpClientConnection *connection)
Close connection.
Definition: tftp_server_misc.c:269
TftpClientConnection * tftpServerOpenConnection(TftpServerContext *context, NetInterface *interface, const IpAddr *clientIpAddr, uint16_t clientPort)
Create a new connection.
Definition: tftp_server_misc.c:153
char_t * ipAddrToString(const IpAddr *ipAddr, char_t *str)
Convert a binary IP address to a string representation.
Definition: ip.c:810
TftpClientConnection * tftpServerFindConnection(TftpServerContext *context, NetInterface *interface, const IpAddr *clientIpAddr, uint16_t clientPort)
Find a connection that matches a given client.
Definition: tftp_server_misc.c:114
error_t tftpServerRetransmitPacket(TftpClientConnection *connection)
Retransmit the last packet.
Definition: tftp_server_misc.c:1028
void tftpServerProcessRrqPacket(TftpServerContext *context, NetInterface *interface, const IpAddr *clientIpAddr, uint16_t clientPort, const TftpRrqPacket *rrqPacket, size_t length)
Process incoming RRQ packet.
Definition: tftp_server_misc.c:427
TFTP server.
error_t tftpServerSendErrorPacket(TftpClientConnection *connection, uint16_t errorCode, const char_t *errorMsg)
Send ERROR packet.
Definition: tftp_server_misc.c:979
void tftpServerProcessErrorPacket(TftpClientConnection *connection, const TftpErrorPacket *errorPacket, size_t length)
Process incoming ERROR packet.
Definition: tftp_server_misc.c:804
bool_t ipCompAddr(const IpAddr *ipAddr1, const IpAddr *ipAddr2)
Compare IP addresses.
Definition: ip.c:318
int_t socket(int_t family, int_t type, int_t protocol)
Create a socket that is bound to a specific transport service provider.
Definition: bsd_socket.c:65
error_t socketReceiveFrom(Socket *socket, IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size, size_t *received, uint_t flags)
Receive a datagram from a connectionless socket.
Definition: socket.c:1746
error_t socketReceiveMsg(Socket *socket, SocketMsg *message, uint_t flags)
Receive a message from a connectionless socket.
Definition: socket.c:1926
error_t socketConnect(Socket *socket, const IpAddr *remoteIpAddr, uint16_t remotePort)
Establish a connection to a specified socket.
Definition: socket.c:1377
void tftpServerTick(TftpServerContext *context)
Handle periodic operations.
Definition: tftp_server_misc.c:49
void tftpServerProcessAckPacket(TftpClientConnection *connection, const TftpAckPacket *ackPacket, size_t length)
Process incoming ACK packet.
Definition: tftp_server_misc.c:749
error_t tftpServerSendAckPacket(TftpClientConnection *connection)
Send ACK packet.
Definition: tftp_server_misc.c:937
void tftpServerAcceptRequest(TftpServerContext *context)
Accept connection request.
Definition: tftp_server_misc.c:310
error_t tftpServerSendDataPacket(TftpClientConnection *connection)
Send DATA packet.
Definition: tftp_server_misc.c:840
Socket * socketOpenEx(NetContext *context, uint_t type, uint_t protocol)
Create a socket.
Definition: socket.c:146
Helper functions for TFTP server.
void tftpServerProcessDataPacket(TftpClientConnection *connection, const TftpDataPacket *dataPacket, size_t length)
Process incoming DATA packet.
Definition: tftp_server_misc.c:644
TCP/IP stack core.
Debugging facilities.
