1 /* 2 * fiked - a fake IKE PSK+XAUTH daemon based on vpnc 3 * Copyright (C) 2005, Daniel Roethlisberger <daniel@roe.ch> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, see http://www.gnu.org/copyleft/ 17 * 18 * $Id: config.h 97 2005-12-17 17:43:33Z roe $ 19 */ 20 21 #ifndef CONFIG_H 22 #define CONFIG_H 23 24 #include "datagram.h" 25 26 typedef struct _psk { 27 struct _psk *next; 28 char *id; /* primary key */ 29 char *key; 30 } psk; 31 32 typedef struct _config { 33 udp_socket *us; /* UDP socket we listen on */ 34 char *gateway; /* IP address of VPN gateway to impersonate */ 35 psk *keys; /* list of pre-shared keys */ 36 #ifdef WITH_LIBNET 37 int opt_raw; /* use raw sockets to send packets */ 38 #endif 39 } config; 40 41 char * psk_get_key(char *id, psk *head); 42 void psk_set_key(char *id, char *key, psk **head); 43 void psk_free(psk *keys); 44 45 config * config_new(); 46 void config_free(config *cfg); 47 48 #endif /* CONFIG_H */ 49 50