mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2026-07-07 12:05:46 +00:00
first add sdk
This commit is contained in:
commit
f91efd1250
3915 changed files with 1291882 additions and 0 deletions
31
component/common/network/tftp/tftp.h
Executable file
31
component/common/network/tftp/tftp.h
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef TFTP_H
|
||||
#define TFTP_H
|
||||
|
||||
#define port 69
|
||||
#define ERROR -1
|
||||
|
||||
#define RRQ 1
|
||||
#define WRQ 2
|
||||
#define DATA 3
|
||||
#define ACK 0x04
|
||||
#define ERR 0x05
|
||||
|
||||
#define BLOCK_SIZE (512+4)
|
||||
|
||||
typedef struct _tftp{
|
||||
void (*recv_handle)(unsigned char *buffer,int len, unsigned int index);
|
||||
void (*send_handle)(unsigned char *buffer,int *len, unsigned int index);
|
||||
const char *tftp_file_name;
|
||||
const char *tftp_mode;
|
||||
const char *tftp_host;
|
||||
int tftp_port;
|
||||
unsigned char tftp_buf[BLOCK_SIZE];
|
||||
int tftp_op;
|
||||
unsigned int tftp_retry_num;
|
||||
unsigned int tftp_timeout;
|
||||
}tftp;
|
||||
|
||||
int tftp_client_start(tftp *tftp_handler);
|
||||
int tftp_server_start(tftp *tftp_handler);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue