File:  [ELWIX - Embedded LightWeight unIX -] / tftpd / inc / defs.h
Revision 1.1.1.1.4.3: download - view: text, annotated - select for diffs - revision graph
Thu Feb 20 15:39:15 2014 UTC (10 years, 4 months ago) by misho
Branches: tftp0_3
Diff to: branchpoint 1.1.1.1: preferred, colored
bug fixes

#ifndef __DEFS_H
#define __DEFS_H


#ifndef STRSIZ
#define STRSIZ			256
#endif

#define DEFAULT_CFGNAME		"/etc/tftpd.conf"
#define DEFAULT_TIMEOUT		5
#define TFTP_PKT_MAX		516
#define TFTP_LOAD_MAX		512

#define TFTP_OPT_TSIZE		"tsize"
#define TFTP_OPT_BLKSIZE	"blksize"
#define TFTP_OPT_TIMEOUT	"timeout"
#define TFTP_OPT_ROLLOVER	"rollover"


struct tagCli {
	int		opc;
	u_short		seq;
	int		tout;
	int		roll;
	int		siz;
	off_t		tsiz;
	sockaddr_t	addr;
	int		fd;
	char		file[PATH_MAX];
	char		mode[10];
	short		close;
};


extern struct timespec timeout;
extern struct tagCli cli;
extern cfg_root_t cfg;


#endif

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