xref: /openbsd/usr.sbin/npppd/l2tp/l2tp_conf.h (revision 99d3c860)
1 /*	$OpenBSD: l2tp_conf.h,v 1.2 2014/03/22 04:32:39 yasuoka Exp $	*/
2 
3 /*
4  * Copyright (c) 2012 YASUOKA Masahiko <yasuoka@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 #ifndef L2TP_CONF_H
19 #define L2TP_CONF_H 1
20 
21 #include <sys/types.h>
22 #include <sys/queue.h>
23 #include <sys/socket.h>
24 
25 #include <stdbool.h>
26 
27 #define	L2TP_NAME_LEN		16
28 
29 TAILQ_HEAD(l2tp_confs, l2tp_conf);
30 
31 struct l2tp_listen_addr {
32 	struct sockaddr_storage	 addr;
33 	TAILQ_ENTRY(l2tp_listen_addr)
34 				 entry;
35 };
36 
37 struct l2tp_conf {
38 	TAILQ_ENTRY(l2tp_conf)	 entry;
39 	char			 name[L2TP_NAME_LEN];
40 	char			*hostname;
41 	char			*vendor_name;
42 	TAILQ_HEAD(l2tp_listen_addrs, l2tp_listen_addr)
43 				 listen;
44 	int			 hello_interval;
45 	int			 hello_timeout;
46 	bool			 data_use_seq;
47 	bool			 require_ipsec;
48 	bool			 accept_dialin;
49 	bool			 lcp_renegotiation;
50 	bool			 force_lcp_renegotiation;
51 	bool			 ctrl_in_pktdump;
52 	bool			 ctrl_out_pktdump;
53 	bool			 data_in_pktdump;
54 	bool			 data_out_pktdump;
55 };
56 
57 #endif
58