l2tp.h revision 98525
178344Sobrien/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001/11/05 10:03:27 guy Exp $ (LBL) */
278344Sobrien/*
398184Sgordon * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
498184Sgordon *      The Regents of the University of California.  All rights reserved.
578344Sobrien *
678344Sobrien * Redistribution and use in source and binary forms, with or without
778344Sobrien * modification, are permitted provided that: (1) source code distributions
8168085Smtm * retain the above copyright notice and this paragraph in its entirety, (2)
998184Sgordon * distributions including binary code include the above copyright notice and
10136224Smtm * this paragraph in its entirety in the documentation or other materials
1178344Sobrien * provided with the distribution, and (3) all advertising materials mentioning
1278344Sobrien * features or use of this software display the following acknowledgement:
1378344Sobrien * ``This product includes software developed by the University of California,
14126181Sbrueffer * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1578344Sobrien * the University nor the names of its contributors may be used to endorse
1678344Sobrien * or promote products derived from this software without specific prior
17169653Smtm * written permission.
18125987Smtm * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19168085Smtm * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20168085Smtm * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21169653Smtm *
22169653Smtm * L2TP support contributed by Motonori Shindo (mshindo@mshindo.net)
23169653Smtm */
24169653Smtm
25168085Smtm
26169653Smtm#define L2TP_FLAG_TYPE		0x8000	/* Type (0=Data, 1=Control) */
27168085Smtm#define L2TP_FLAG_LENGTH	0x4000	/* Length */
28168085Smtm#define L2TP_FLAG_SEQUENCE	0x0800	/* Sequence */
29168085Smtm#define L2TP_FLAG_OFFSET	0x0200	/* Offset */
30168085Smtm#define L2TP_FLAG_PRIORITY	0x0100	/* Priority */
31169653Smtm
32168085Smtm#define L2TP_VERSION_MASK	0x000f	/* Version Mask */
33171871Smtm#define L2TP_VERSION_L2F	0x0001	/* L2F */
34169653Smtm#define L2TP_VERSION_L2TP	0x0002	/* L2TP */
35168085Smtm
36168085Smtm#define L2TP_AVP_HDR_FLAG_MANDATORY	0x8000	/* Mandatory Flag */
3778344Sobrien#define L2TP_AVP_HDR_FLAG_HIDDEN	0x4000	/* Hidden Flag */
38171871Smtm#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