2 * Copyright (C) 1998-2001 D. Hugh Redelmeier.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * RCSID $Id: server.h,v 1.20 2002/03/09 01:26:27 dhr Exp $
17 extern int ctl_fd; /* file descriptor of control (whack) socket */
18 extern struct sockaddr_un ctl_addr; /* address of control (whack) socket */
19 extern err_t init_ctl_socket(void);
20 extern void delete_ctl_socket(void);
22 extern bool listening; /* should we pay attention to IKE messages? */
25 /* interface: a terminal point for IKE traffic, IPsec transport mode
28 * - an IP device (eg. eth1), and
29 * - its partner, an ipsec device (eg. ipsec0), and
30 * - their shared IP address (eg. 10.7.3.2)
31 * Note: the port for IKE is always implicitly UDP/pluto_port.
34 char *vname; /* virtual (ipsec) device name */
35 char *rname; /* real device name */
36 ip_address addr; /* interface IP address */
37 int fd; /* file descriptor of socket for IKE UDP messages */
42 enum { IFN_ADD, IFN_KEEP, IFN_DELETE } change;
45 extern struct iface *interfaces; /* public interfaces */
47 extern bool use_interface(const char *rifn);
48 extern void find_ifaces(void);
49 extern void show_ifaces_status(void);
50 extern void free_ifaces(void);
51 extern void call_server(void);