1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24
25
26#ifndef __PPTP_RFC_H__
27#define __PPTP_RFC_H__
28
29#define PPTP_MTU	1500
30
31enum {
32    PPTP_EVT_XMIT_OK = 1,
33    PPTP_EVT_XMIT_FULL,
34    PPTP_EVT_INPUTERROR
35};
36
37enum {
38    PPTP_CMD_VOID = 1,	 	// command codes to define
39    PPTP_CMD_SETFLAGS,		// set flags
40    PPTP_CMD_SETPEERADDR,	// set peer IP address
41    PPTP_CMD_SETCALLID,		// set call id
42    PPTP_CMD_SETPEERCALLID,	// set peer call id
43    PPTP_CMD_SETWINDOW,		// set our receive window
44    PPTP_CMD_SETPEERWINDOW,	// set peer receive window
45    PPTP_CMD_SETPEERPPD,	// set packet processing delay
46    PPTP_CMD_SETMAXTIMEOUT,	// set send maximum timeout
47    PPTP_CMD_SETOURADDR,	// set our IP address
48    PPTP_CMD_SETBAUDRATE,	// set tunnel baud rate
49    PPTP_CMD_GETBAUDRATE	// get tunnel baud rate
50};
51
52typedef int (*pptp_rfc_input_callback)(void *data, mbuf_t m);
53typedef void (*pptp_rfc_event_callback)(void *data, u_int32_t evt, u_int32_t msg);
54
55u_int16_t pptp_rfc_init();
56u_int16_t pptp_rfc_dispose();
57u_int16_t pptp_rfc_new_client(void *host, void **data,
58                         pptp_rfc_input_callback input,
59                         pptp_rfc_event_callback event);
60void pptp_rfc_free_client(void *data);
61
62
63u_int16_t pptp_rfc_command(void *userdata, u_int32_t cmd, void *cmddata);
64
65void pptp_rfc_slowtimer();
66
67u_int16_t pptp_rfc_output(void *data, mbuf_t m);
68
69// callback from dlil layer
70int pptp_rfc_lower_input(mbuf_t m, u_int32_t from);
71
72
73#endif