1 /* -*- mode: c; c-file-style: "gnu" -*-
2 * crywrap.h -- Global definitions for CryWrap
3 * Copyright (C) 2003, 2004 Gergely Nagy <algernon@bonehunter.rulez.org>
5 * This file is part of CryWrap.
7 * CryWrap is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * CryWrap is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 * Global variables and declarations for CryWrap.
24 * All of the global types, structures and whatnot are declared in
25 * this file. Not variables, though. Those are in crywrap.c.
29 #define _CRYWRAP_H 1 /**< crywrap.h multi-inclusion guard. */
31 /** @defgroup defaults Built-in defaults.
34 #define __CRYWRAP__ "crywrap" /**< Software name. */
37 #define _CRYWRAP_VERSION "0.2." CRYWRAP_PATCHLEVEL
38 /** Configuration directory.
40 #define _CRYWRAP_CONFDIR SYSCONFDIR "/crywrap"
41 #define _CRYWRAP_UID 65534 /**< Default UID to run as. */
44 #define _CRYWRAP_PIDFILE "/var/run/crywrap.pid"
45 /** Maximum number of clients supported.
47 #define _CRYWRAP_MAXCONN 1024
48 /** Maximum I/O buffer size.
50 #define _CRYWRAP_MAXBUF 64 * 1024
51 /** Default server certificate and key.
53 #define _CRYWRAP_PEMFILE _CRYWRAP_CONFDIR "/server.pem"
56 /** Configuration structure.
57 * Most of the CryWrap configuration - those options that are settable
58 * via the command-line are stored in a variable of this type.
62 /** Properties of the listening socket.
67 struct sockaddr_storage
*addr
;
70 /** Properties of the destination socket.
76 struct sockaddr_storage
*addr
;
79 gnutls_priority_t priority
; /**< GnuTLS priority string. */
80 const char *pidfile
; /**< File to store our PID in. */
81 uid_t uid
; /**< User ID to run as. */
82 int inetd
; /**< InetD-mode toggle. */
83 int anon
; /**< Anon-DH toggle. */
84 int verify
; /**< Client certificate verify level. */
88 /** @} *//* End of the Options group */
90 #endif /* !_CRYWRAP_H */