tftp.h revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
#ifndef _TFTP_H
#define _TFTP_H
#include "if_ether.h"
#include "ip.h"
#include "udp.h"
#ifndef MAX_TFTP_RETRIES
#define MAX_TFTP_RETRIES 20
#endif
/* These settings have sense only if compiled with -DCONGESTED */
/* total retransmission timeout in ticks */
/* packet retransmission timeout in ticks */
#define TFTP_PORT 69
#define TFTP_DEFAULTSIZE_PACKET 512
#define TFTP_RRQ 1
#define TFTP_WRQ 2
#define TFTP_DATA 3
#define TFTP_ACK 4
#define TFTP_ERROR 5
#define TFTP_OACK 6
#define TFTP_CODE_EOF 1
#define TFTP_CODE_MORE 2
#define TFTP_CODE_ERROR 3
#define TFTP_CODE_BOOT 4
#define TFTP_CODE_CFG 5
struct tftp_t {
union {
struct {
} data;
struct {
} ack;
struct {
} err;
struct {
} oack;
} u;
};
/* define a smaller tftp packet solely for making requests to conserve stack
512 bytes should be enough */
struct tftpreq_t {
union {
struct {
} ack;
struct {
} err;
} u;
};
typedef int (*read_actor_t)(unsigned char *, unsigned int, unsigned int, int);
#endif /* _TFTP_H */