1 /* $Id: vpn_control_var.h,v 1.7 2004/12/30 00:08:30 manubsd Exp $ */
4 * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
6 * @APPLE_LICENSE_HEADER_START@
8 * The contents of this file constitute Original Code as defined in and
9 * are subject to the Apple Public Source License Version 1.1 (the
10 * "License"). You may not use this file except in compliance with the
11 * License. Please obtain a copy of the License at
12 * http://www.apple.com/publicsource and read it before using this file.
14 * This Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
26 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 * notice, this list of conditions and the following disclaimer in the
36 * documentation and/or other materials provided with the distribution.
37 * 3. Neither the name of the project nor the names of its contributors
38 * may be used to endorse or promote products derived from this software
39 * without specific prior written permission.
41 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54 #ifndef _VPN_CONTROL_VAR_H
55 #define _VPN_CONTROL_VAR_H
57 #include "vpn_control.h"
60 VPN_STARTED_BY_API
= 1,
65 extern int vpncontrol_handler
__P((void));
66 extern int vpncontrol_comm_handler
__P((struct vpnctl_socket_elem
*));
67 extern int vpncontrol_notify_ike_failed
__P((u_int16_t
, u_int16_t
, u_int32_t
, u_int16_t
, u_int8_t
*));
68 extern int vpncontrol_notify_phase_change
__P((int, u_int16_t
, struct ph1handle
*, struct ph2handle
*));
69 extern int vpncontrol_init
__P((void));
70 extern void vpncontrol_close
__P((void));
71 extern int vpn_control_connected
__P((void));
72 extern int vpn_connect
__P((struct bound_addr
*, int));
73 extern int vpn_disconnect
__P((struct bound_addr
*));
74 extern int vpn_start_ph2
__P((struct bound_addr
*, struct vpnctl_cmd_start_ph2
*));
75 extern int vpncontrol_notify_need_authinfo
__P((struct ph1handle
*, void*, size_t));
76 extern int vpncontrol_notify_peer_resp_ph1
__P((u_int16_t
, struct ph1handle
*));
77 extern int vpncontrol_notify_peer_resp_ph2
__P((u_int16_t
, struct ph2handle
*));
78 extern int vpn_assert
__P((struct sockaddr
*, struct sockaddr
*));
80 #endif /* _VPN_CONTROL_VAR_H */