1190207Srpaulo/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001-11-05 10:03:27 guy Exp $ (LBL) */
256893Sfenner/*
356893Sfenner * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
456893Sfenner *      The Regents of the University of California.  All rights reserved.
556893Sfenner *
656893Sfenner * Redistribution and use in source and binary forms, with or without
756893Sfenner * modification, are permitted provided that: (1) source code distributions
856893Sfenner * retain the above copyright notice and this paragraph in its entirety, (2)
956893Sfenner * distributions including binary code include the above copyright notice and
1056893Sfenner * this paragraph in its entirety in the documentation or other materials
1156893Sfenner * provided with the distribution, and (3) all advertising materials mentioning
1256893Sfenner * features or use of this software display the following acknowledgement:
1356893Sfenner * ``This product includes software developed by the University of California,
1456893Sfenner * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1556893Sfenner * the University nor the names of its contributors may be used to endorse
1656893Sfenner * or promote products derived from this software without specific prior
1756893Sfenner * written permission.
1856893Sfenner * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1956893Sfenner * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
2056893Sfenner * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2156893Sfenner *
2275115Sfenner * L2TP support contributed by Motonori Shindo (mshindo@mshindo.net)
2356893Sfenner */
2456893Sfenner
2556893Sfenner
2656893Sfenner#define L2TP_FLAG_TYPE		0x8000	/* Type (0=Data, 1=Control) */
2756893Sfenner#define L2TP_FLAG_LENGTH	0x4000	/* Length */
2856893Sfenner#define L2TP_FLAG_SEQUENCE	0x0800	/* Sequence */
2956893Sfenner#define L2TP_FLAG_OFFSET	0x0200	/* Offset */
3056893Sfenner#define L2TP_FLAG_PRIORITY	0x0100	/* Priority */
3156893Sfenner
3256893Sfenner#define L2TP_VERSION_MASK	0x000f	/* Version Mask */
3356893Sfenner#define L2TP_VERSION_L2F	0x0001	/* L2F */
3456893Sfenner#define L2TP_VERSION_L2TP	0x0002	/* L2TP */
3556893Sfenner
3656893Sfenner#define L2TP_AVP_HDR_FLAG_MANDATORY	0x8000	/* Mandatory Flag */
3756893Sfenner#define L2TP_AVP_HDR_FLAG_HIDDEN	0x4000	/* Hidden Flag */
3856893Sfenner#define L2TP_AVP_HDR_LEN_MASK		0x03ff	/* Length Mask */
3956893Sfenner
4056893Sfenner#define L2TP_FRAMING_CAP_SYNC_MASK	0x00000001	/* Synchronous */
4156893Sfenner#define L2TP_FRAMING_CAP_ASYNC_MASK	0x00000002	/* Asynchronous */
4256893Sfenner
4356893Sfenner#define L2TP_FRAMING_TYPE_SYNC_MASK	0x00000001	/* Synchronous */
4456893Sfenner#define L2TP_FRAMING_TYPE_ASYNC_MASK	0x00000002	/* Asynchronous */
4556893Sfenner
4656893Sfenner#define L2TP_BEARER_CAP_DIGITAL_MASK	0x00000001	/* Digital */
4756893Sfenner#define L2TP_BEARER_CAP_ANALOG_MASK	0x00000002	/* Analog */
4856893Sfenner
4956893Sfenner#define L2TP_BEARER_TYPE_DIGITAL_MASK	0x00000001	/* Digital */
5056893Sfenner#define L2TP_BEARER_TYPE_ANALOG_MASK	0x00000002	/* Analog */
5156893Sfenner
5256893Sfenner/* Authen Type */
5356893Sfenner#define L2TP_AUTHEN_TYPE_RESERVED	0x0000	/* Reserved */
5456893Sfenner#define L2TP_AUTHEN_TYPE_TEXTUAL	0x0001	/* Textual username/password exchange */
5556893Sfenner#define L2TP_AUTHEN_TYPE_CHAP		0x0002	/* PPP CHAP */
5656893Sfenner#define L2TP_AUTHEN_TYPE_PAP		0x0003	/* PPP PAP */
5756893Sfenner#define L2TP_AUTHEN_TYPE_NO_AUTH	0x0004	/* No Authentication */
5898524Sfenner#define L2TP_AUTHEN_TYPE_MSCHAPv1	0x0005	/* MSCHAPv1 */
5956893Sfenner
6056893Sfenner#define L2TP_PROXY_AUTH_ID_MASK		0x00ff
6156893Sfenner
6256893Sfenner
63