00001 #ifndef __COMMANDS_H__
00002 #define __COMMANDS_H__
00003
00004 typedef struct {
00005 unsigned char id[4] __attribute__ ((packed));
00006 unsigned int address __attribute__ ((packed));
00007 unsigned int size __attribute__ ((packed));
00008 unsigned char data[1] __attribute__ ((packed));
00009 } command_t;
00010
00011 #define CMD_EXECUTE "EXEC"
00012 #define CMD_LOADBIN "LBIN"
00013 #define CMD_PARTBIN "PBIN"
00014 #define CMD_DONEBIN "DBIN"
00015 #define CMD_SENDBIN "SBIN"
00016 #define CMD_SENDBINQ "SBIQ"
00017 #define CMD_VERSION "VERS"
00018
00019 #define CMD_RETVAL "RETV"
00020
00021 #define CMD_REBOOT "RBOT"
00022
00023 #define COMMAND_LEN 12
00024
00025 extern unsigned int tool_ip;
00026 extern unsigned char tool_mac[6];
00027 extern unsigned short tool_port;
00028
00029 #endif