]>
Commit | Line | Data |
---|---|---|
52b7d2ce A |
1 | /* $Id: vpn_control_var.h,v 1.7 2004/12/30 00:08:30 manubsd Exp $ */ |
2 | ||
3 | /* | |
4 | * Copyright (c) 2006 Apple Computer, Inc. All rights reserved. | |
5 | * | |
6 | * @APPLE_LICENSE_HEADER_START@ | |
7 | * | |
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. | |
13 | * | |
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 | |
20 | * under the License. | |
21 | * | |
22 | * @APPLE_LICENSE_HEADER_END@ | |
23 | */ | |
24 | ||
25 | /* | |
26 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | |
27 | * All rights reserved. | |
28 | * | |
29 | * Redistribution and use in source and binary forms, with or without | |
30 | * modification, are permitted provided that the following conditions | |
31 | * are met: | |
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. | |
40 | * | |
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 | |
51 | * SUCH DAMAGE. | |
52 | */ | |
53 | ||
54 | #ifndef _VPN_CONTROL_VAR_H | |
55 | #define _VPN_CONTROL_VAR_H | |
56 | ||
d1e348cf | 57 | #include "vpn_control.h" |
65c25746 A |
58 | #include <dispatch/dispatch.h> |
59 | #include "localconf.h" | |
d1e348cf | 60 | |
e8d9021d A |
61 | enum { |
62 | VPN_STARTED_BY_API = 1, | |
63 | VPN_STARTED_BY_ADMIN, | |
64 | VPN_RESTARTED_BY_API, | |
65 | }; | |
66 | ||
65c25746 A |
67 | extern void vpncontrol_handler (void *); |
68 | extern void vpncontrol_comm_handler (struct vpnctl_socket_elem *); | |
69 | extern int vpncontrol_notify_ike_failed (u_int16_t, u_int16_t, u_int32_t, u_int16_t, u_int8_t*); | |
70 | extern int vpncontrol_notify_phase_change (int, u_int16_t, phase1_handle_t*, phase2_handle_t*); | |
71 | extern int vpncontrol_init (void); | |
72 | extern void vpncontrol_close (void); | |
73 | extern int vpn_control_connected (void); | |
74 | extern int vpn_connect (struct bound_addr *, int); | |
75 | extern int vpn_disconnect (struct bound_addr *, const char *); | |
76 | extern void vpncontrol_disconnect_all (struct vpnctl_socket_elem *, const char *); | |
886926c0 | 77 | extern int vpn_start_ph2 (struct bound_addr *, struct vpnctl_cmd_start_ph2 *, size_t); |
65c25746 A |
78 | extern int vpncontrol_notify_need_authinfo (phase1_handle_t *, void*, size_t); |
79 | extern int vpncontrol_notify_peer_resp_ph1 (u_int16_t, phase1_handle_t*); | |
80 | extern int vpncontrol_notify_peer_resp_ph2 (u_int16_t, phase2_handle_t*); | |
81 | extern int vpn_assert (struct sockaddr_storage *, struct sockaddr_storage *); | |
d06a7ccb | 82 | extern bool vpncontrol_set_nat64_prefix(nw_nat64_prefix_t *prefix); |
52b7d2ce A |
83 | |
84 | #endif /* _VPN_CONTROL_VAR_H */ |