Annotation of ansh/inc/defs.h, revision 1.1.1.1.2.2
1.1 misho 1: /*************************************************************************
2: * (C) 2011 AITNET - Sofia/Bulgaria - <office@aitnet.org>
3: * by Michael Pounov <misho@elwix.org>
4: *
5: * $Author: misho $
1.1.1.1.2.2! misho 6: * $Id: defs.h,v 1.1.1.1.2.1 2011/10/07 13:41:26 misho Exp $
1.1 misho 7: *
8: *************************************************************************/
9: #ifndef __DEFS_H
10: #define __DEFS_H
11:
12:
13: #define STRSIZ 256
1.1.1.1.2.2! misho 14: #define ANSH_L2_BUFLEN 1024
1.1 misho 15: #define PIDFILE_ANSHD "/var/run/anshd.pid"
16: #define PIDFILE_ANSH3D "/var/run/ansh3d.pid"
17:
18: #define VERB(x) if ((x) <= Verbose)
19: #define FTRACE(x) if ((x) <= Verbose) syslog(LOG_DEBUG, "Debug:: I`m in %s(%d) ...\n", __func__, __LINE__)
20: #define LOG(fmt, ...) do { assert((fmt)); \
21: char sz_log_fmt[STRSIZ] = { 0 }; \
22: snprintf(sz_log_fmt, sizeof sz_log_fmt, (fmt), ##__VA_ARGS__); \
23: syslog(LOG_DEBUG, "Log:: %s(%d) -> %s\n", __func__, __LINE__, sz_log_fmt); \
24: } while (0)
25: #define ERR(fmt, ...) do { assert((fmt)); \
26: char sz_err_fmt[STRSIZ] = { 0 }; \
27: snprintf(sz_err_fmt, sizeof sz_err_fmt, (fmt), ##__VA_ARGS__); \
28: syslog(LOG_ERR, "Error:: %s(%d) -> %s\n", __func__, __LINE__, sz_err_fmt); \
29: } while (0)
30:
31: struct tagProc {
32: u_short proc_id;
33: u_short proc_seq;
34:
35: char proc_flg;
36:
37: int proc_pty;
38: char proc_ttyname[64];
39: pid_t proc_pid;
40:
41: int proc_sock;
42: struct sockaddr proc_cli;
43: struct ether_addr proc_ea;
44:
45: u_short proc_blen;
46: u_char *proc_buf_[2];
47: u_short proc_rlen_[2];
48: #define NET2FD 0
49: #define FD2NET 1
50:
51: SLIST_ENTRY(tagProc) proc_next;
52: };
53: typedef SLIST_HEAD(, tagProc) proc_head_t;
54:
55:
56: extern intptr_t Kill;
1.1.1.1.2.1 misho 57: extern int Timeout, Verbose;
58: extern u_int Crypted;
1.1 misho 59:
60:
61: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>