l2tp.h revision e66460324c0c1d5b6f767afeb6f3d201094156d3
1/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001/11/05 10:03:27 guy Exp $ (LBL) */
2/*
3 * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
4 *      The Regents of the University of California.  All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that: (1) source code distributions
8 * retain the above copyright notice and this paragraph in its entirety, (2)
9 * distributions including binary code include the above copyright notice and
10 * this paragraph in its entirety in the documentation or other materials
11 * provided with the distribution, and (3) all advertising materials mentioning
12 * features or use of this software display the following acknowledgement:
13 * ``This product includes software developed by the University of California,
14 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 * the University nor the names of its contributors may be used to endorse
16 * or promote products derived from this software without specific prior
17 * written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 * L2TP support contributed by Motonori Shindo (mshindo@mshindo.net)
23 */
24
25
26#define L2TP_FLAG_TYPE		0x8000	/* Type (0=Data, 1=Control) */
27#define L2TP_FLAG_LENGTH	0x4000	/* Length */
28#define L2TP_FLAG_SEQUENCE	0x0800	/* Sequence */
29#define L2TP_FLAG_OFFSET	0x0200	/* Offset */
30#define L2TP_FLAG_PRIORITY	0x0100	/* Priority */
31
32#define L2TP_VERSION_MASK	0x000f	/* Version Mask */
33#define L2TP_VERSION_L2F	0x0001	/* L2F */
34#define L2TP_VERSION_L2TP	0x0002	/* L2TP */
35
36#define L2TP_AVP_HDR_FLAG_MANDATORY	0x8000	/* Mandatory Flag */
37#define L2TP_AVP_HDR_FLAG_HIDDEN	0x4000	/* Hidden Flag */
38#define L2TP_AVP_HDR_LEN_MASK		0x03ff	/* Length Mask */
39
40#define L2TP_FRAMING_CAP_SYNC_MASK	0x00000001	/* Synchronous */
41#define L2TP_FRAMING_CAP_ASYNC_MASK	0x00000002	/* Asynchronous */
42
43#define L2TP_FRAMING_TYPE_SYNC_MASK	0x00000001	/* Synchronous */
44#define L2TP_FRAMING_TYPE_ASYNC_MASK	0x00000002	/* Asynchronous */
45
46#define L2TP_BEARER_CAP_DIGITAL_MASK	0x00000001	/* Digital */
47#define L2TP_BEARER_CAP_ANALOG_MASK	0x00000002	/* Analog */
48
49#define L2TP_BEARER_TYPE_DIGITAL_MASK	0x00000001	/* Digital */
50#define L2TP_BEARER_TYPE_ANALOG_MASK	0x00000002	/* Analog */
51
52/* Authen Type */
53#define L2TP_AUTHEN_TYPE_RESERVED	0x0000	/* Reserved */
54#define L2TP_AUTHEN_TYPE_TEXTUAL	0x0001	/* Textual username/password exchange */
55#define L2TP_AUTHEN_TYPE_CHAP		0x0002	/* PPP CHAP */
56#define L2TP_AUTHEN_TYPE_PAP		0x0003	/* PPP PAP */
57#define L2TP_AUTHEN_TYPE_NO_AUTH	0x0004	/* No Authentication */
58#define L2TP_AUTHEN_TYPE_MSCHAPv1	0x0005	/* MSCHAPv1 */
59
60#define L2TP_PROXY_AUTH_ID_MASK		0x00ff
61
62
63