home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.urbanrage.com
/
2015-02-07.ftp.urbanrage.com.tar
/
ftp.urbanrage.com
/
pub
/
tftp.h
< prev
Wrap
C/C++ Source or Header
|
2007-02-15
|
917b
|
50 lines
#ifndef _ee_tftp_h_
#define _ee_tftp_h_
enum { NONE, RRQ, WRQ, DATA, ACK, ERR };
typedef struct _tf_rwrq_t {
unsigned short op;
char buffer[2048];
} tf_rwrq_t;
typedef struct _tf_data_t {
unsigned short op;
unsigned short block;
unsigned char data[512];
} tf_data_t;
typedef struct _tf_ack_t {
unsigned short op;
unsigned short block;
} tf_ack_t;
typedef struct _tf_err_t {
unsigned short op;
unsigned short error;
char errmsg[2048];
} tf_err_t;
typedef struct _tftp_t {
union {
unsigned short op;
tf_rwrq_t req;
tf_data_t data;
tf_ack_t ack;
tf_err_t err;
};
int size;
} tftp_t;
typedef struct _active_t {
int fd;
unsigned long block;
unsigned int ip;
unsigned short port;
time_t retransmit;
time_t drop;
tftp_t last;
} active_t;
#endif