File:  [ELWIX - Embedded LightWeight unIX -] / tftpd / inc / defs.h
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Thu Feb 20 23:17:22 2014 UTC (10 years, 4 months ago) by misho
Branches: MAIN
CVS tags: tftp0_5, tftp0_4, TFTP0_4, TFTP0_3, HEAD
version 0.3

    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_BLKSIZE2	"blksize2"
   17: #define TFTP_OPT_TIMEOUT	"timeout"
   18: #define TFTP_OPT_ROLLOVER	"rollover"
   19: 
   20: 
   21: struct tagCli {
   22: 	int		opc;
   23: 	u_short		seq;
   24: 	struct timespec	tout;
   25: 	u_short		roll;
   26: 	int		siz;
   27: 	off_t		tsiz;
   28: 	sockaddr_t	addr;
   29: 	int		fd;
   30: 	char		file[PATH_MAX];
   31: 	char		mode[10];
   32: 	short		close;
   33: 	int		tmp;
   34: };
   35: 
   36: 
   37: extern struct timespec timeout;
   38: extern struct tagCli cli;
   39: extern cfg_root_t cfg;
   40: 
   41: 
   42: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>