Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / xl2tpd / control.h
blobb1d24dbc216563ac14863507d4363c49b91f16b9
1 /*
2 * Layer Two Tunnelling Protocol Daemon
3 * Copyright (C) 1998 Adtran, Inc.
4 * Copyright (C) 2002 Jeff McAdams
6 * Mark Spencer
8 * This software is distributed under the terms
9 * of the GPL, which you should have received
10 * along with this source.
12 * Control Packet Handling header
16 #include "common.h"
18 /* Declaration of FIFO used for maintaining
19 a reliable control connection, as well
20 as for queueing stuff for the individual
21 threads */
22 #ifndef _CONTROL_H
23 #define _CONTROL_H
24 /* Control message types for vendor-ID 0, placed in the VALUE
25 field of AVP requests */
27 /* Control Connection Management */
28 #define SCCRQ 1 /* Start-Control-Connection-Request */
29 #define SCCRP 2 /* Start-Control-Connection-Reply */
30 #define SCCCN 3 /* Start-Control-Connection-Connected */
31 #define StopCCN 4 /* Stop-Control-Connection-Notification */
32 /* 5 is reserved */
33 #define Hello 6 /* Hello */
34 /* Call Management */
35 #define OCRQ 7 /* Outgoing-Call-Request */
36 #define OCRP 8 /* Outgoing-Call-Reply */
37 #define OCCN 9 /* Outgoing-Call-Connected */
38 #define ICRQ 10 /* Incoming-Call-Request */
39 #define ICRP 11 /* Incoming-Call-Reply */
40 #define ICCN 12 /* Incoming-Call-Connected */
41 /* 13 is reserved */
42 #define CDN 14 /* Call-Disconnect-Notify */
43 /* Error Reporting */
44 #define WEN 15 /* WAN-Error-Notify */
45 /* PPP Sesssion Control */
46 #define SLI 16 /* Set-Link-Info */
48 #define MAX_MSG 16
50 #define TBIT 0x8000
51 #define LBIT 0x4000
52 #define RBIT 0x2000
53 #define FBIT 0x0800
55 extern int handle_packet (struct buffer *, struct tunnel *, struct call *);
56 extern struct buffer *new_outgoing (struct tunnel *);
57 extern void add_control_hdr (struct tunnel *t, struct call *c,
58 struct buffer *);
59 extern int control_finish (struct tunnel *t, struct call *c);
60 extern void control_zlb (struct buffer *, struct tunnel *, struct call *);
61 extern void recycle_outgoing (struct buffer *, struct sockaddr_in);
62 extern void handle_special (struct buffer *, struct call *, _u16);
63 extern void hello (void *);
64 extern void send_zlb (void *);
65 extern void dethrottle (void *);
67 #endif