![]() ![]() | ![]() |
add macros
1: #ifndef __DEFS_H 2: #define __DEFS_H 3: 4: 5: #ifndef STRSIZ 6: #define STRSIZ 256 7: #endif 8: 9: #define DEFAULT_CFGNAME "/etc/tftpd.conf" 10: #define DEFAULT_TIMEOUT 5 11: #define TFTP_PKT_MAX 516 12: #define TFTP_LOAD_MAX 512 13: 14: #define TFTP_OPT_TSIZE "tsize" 15: #define TFTP_OPT_BLKSIZE "blksize" 16: #define TFTP_OPT_TIMEOUT "timeout" 17: 18: 19: struct tagCli { 20: int opc; 21: u_short seq; 22: int siz; 23: sockaddr_t addr; 24: int fd; 25: char file[PATH_MAX]; 26: char mode[10]; 27: short close; 28: }; 29: 30: 31: extern struct timespec timeout; 32: extern struct tagCli cli; 33: extern cfg_root_t cfg; 34: 35: 36: #endif