no need to check for DTLS
[gnutls.git] / src / crywrap / crywrap.h
blobe246e27a443840159e0d11aaf276f0c4e95887be
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/>.
21 /** @file crywrap.h
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.
28 #ifndef _CRYWRAP_H
29 #define _CRYWRAP_H 1 /**< crywrap.h multi-inclusion guard. */
31 /** @defgroup defaults Built-in defaults.
32 * @{
34 #define __CRYWRAP__ "crywrap" /**< Software name. */
35 /** Software version.
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. */
42 /** Default PID file.
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"
54 /** @} */
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.
60 typedef struct
62 /** Properties of the listening socket.
64 struct
66 in_port_t port;
67 struct sockaddr_storage *addr;
68 } listen;
70 /** Properties of the destination socket.
72 struct
74 in_port_t port;
75 char *host;
76 struct sockaddr_storage *addr;
77 } dest;
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. */
85 int debug;
86 } crywrap_config_t;
88 /** @} *//* End of the Options group */
90 #endif /* !_CRYWRAP_H */