xref: /openbsd/usr.sbin/npppd/pptp/pptp_conf.h (revision 99d3c860)
1 /*	$OpenBSD: pptp_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 PPTP_CONF_H
19 #define PPTP_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	PPTP_NAME_LEN		16
28 
29 TAILQ_HEAD(pptp_confs, pptp_conf);
30 
31 struct pptp_listen_addr {
32 	struct sockaddr_storage	 addr;
33 	TAILQ_ENTRY(pptp_listen_addr)
34 				 entry;
35 };
36 
37 struct pptp_conf {
38 	TAILQ_ENTRY(pptp_conf)	 entry;
39 	char			 name[PPTP_NAME_LEN];
40 	char			*hostname;
41 	char			*vendor_name;
42 	int			 echo_interval;
43 	int			 echo_timeout;
44 	TAILQ_HEAD(pptp_listen_addrs, pptp_listen_addr)
45 				 listen;
46 	bool			 ctrl_in_pktdump;
47 	bool			 ctrl_out_pktdump;
48 	bool			 data_in_pktdump;
49 	bool			 data_out_pktdump;
50 };
51 
52 #endif
53