l2tp.h revision 56893
150476Speter/* 247831Sfoxfair * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997 347831Sfoxfair * The Regents of the University of California. All rights reserved. 447831Sfoxfair * 547831Sfoxfair * Redistribution and use in source and binary forms, with or without 647831Sfoxfair * modification, are permitted provided that: (1) source code distributions 747831Sfoxfair * retain the above copyright notice and this paragraph in its entirety, (2) 847831Sfoxfair * distributions including binary code include the above copyright notice and 947831Sfoxfair * this paragraph in its entirety in the documentation or other materials 1047831Sfoxfair * provided with the distribution, and (3) all advertising materials mentioning 1147831Sfoxfair * features or use of this software display the following acknowledgement: 1247831Sfoxfair * ``This product includes software developed by the University of California, 1347831Sfoxfair * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 1447831Sfoxfair * the University nor the names of its contributors may be used to endorse 1547831Sfoxfair * or promote products derived from this software without specific prior 1647831Sfoxfair * written permission. 1747831Sfoxfair * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 1847831Sfoxfair * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 1947831Sfoxfair * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 2047831Sfoxfair * 2147831Sfoxfair * L2TP support contributed by Motonori Shindo (mshindo@ascend.co.jp) 2247831Sfoxfair */ 2347831Sfoxfair 2447831Sfoxfair 2547831Sfoxfair#define L2TP_FLAG_TYPE 0x8000 /* Type (0=Data, 1=Control) */ 2647831Sfoxfair#define L2TP_FLAG_LENGTH 0x4000 /* Length */ 2747831Sfoxfair#define L2TP_FLAG_SEQUENCE 0x0800 /* Sequence */ 2847831Sfoxfair#define L2TP_FLAG_OFFSET 0x0200 /* Offset */ 2947831Sfoxfair#define L2TP_FLAG_PRIORITY 0x0100 /* Priority */ 3047831Sfoxfair 3147831Sfoxfair#define L2TP_VERSION_MASK 0x000f /* Version Mask */ 3247831Sfoxfair#define L2TP_VERSION_L2F 0x0001 /* L2F */ 3347831Sfoxfair#define L2TP_VERSION_L2TP 0x0002 /* L2TP */ 3447831Sfoxfair 3547831Sfoxfair#define L2TP_AVP_HDR_FLAG_MANDATORY 0x8000 /* Mandatory Flag */ 3647831Sfoxfair#define L2TP_AVP_HDR_FLAG_HIDDEN 0x4000 /* Hidden Flag */ 3747831Sfoxfair#define L2TP_AVP_HDR_LEN_MASK 0x03ff /* Length Mask */ 3847831Sfoxfair 3947831Sfoxfair#define L2TP_FRAMING_CAP_SYNC_MASK 0x00000001 /* Synchronous */ 4047831Sfoxfair#define L2TP_FRAMING_CAP_ASYNC_MASK 0x00000002 /* Asynchronous */ 4147831Sfoxfair 4247831Sfoxfair#define L2TP_FRAMING_TYPE_SYNC_MASK 0x00000001 /* Synchronous */ 4347831Sfoxfair#define L2TP_FRAMING_TYPE_ASYNC_MASK 0x00000002 /* Asynchronous */ 4447831Sfoxfair 4547831Sfoxfair#define L2TP_BEARER_CAP_DIGITAL_MASK 0x00000001 /* Digital */ 4647831Sfoxfair#define L2TP_BEARER_CAP_ANALOG_MASK 0x00000002 /* Analog */ 4747831Sfoxfair 4847831Sfoxfair#define L2TP_BEARER_TYPE_DIGITAL_MASK 0x00000001 /* Digital */ 4947831Sfoxfair#define L2TP_BEARER_TYPE_ANALOG_MASK 0x00000002 /* Analog */ 5047831Sfoxfair 5147831Sfoxfair/* Authen Type */ 5247831Sfoxfair#define L2TP_AUTHEN_TYPE_RESERVED 0x0000 /* Reserved */ 5347831Sfoxfair#define L2TP_AUTHEN_TYPE_TEXTUAL 0x0001 /* Textual username/password exchange */ 5447831Sfoxfair#define L2TP_AUTHEN_TYPE_CHAP 0x0002 /* PPP CHAP */ 5547831Sfoxfair#define L2TP_AUTHEN_TYPE_PAP 0x0003 /* PPP PAP */ 5647831Sfoxfair#define L2TP_AUTHEN_TYPE_NO_AUTH 0x0004 /* No Authentication */ 5747831Sfoxfair#define L2TP_AUTHEN_TYPE_MSCHAP 0x0005 /* MSCHAPv1 */ 5847831Sfoxfair 5947831Sfoxfair#define L2TP_PROXY_AUTH_ID_MASK 0x00ff 6047831Sfoxfair 6147831Sfoxfair 6247831Sfoxfairstruct l2tp_avp_vec { 6347831Sfoxfair const char *name; 6447831Sfoxfair void (*print)(const u_char *, u_int); 6547831Sfoxfair}; 6653961Sache 6747831Sfoxfairstruct l2tp_call_errors { 6847831Sfoxfair u_short reserved; 6947831Sfoxfair u_int crc_errs; 7047831Sfoxfair u_int framing_errs; 7147831Sfoxfair u_int hardware_overruns; 7247831Sfoxfair u_int buffer_overruns; 7347831Sfoxfair u_int timeout_errs; 7447831Sfoxfair u_int alignment_errs; 7547831Sfoxfair}; 7647831Sfoxfair 7747831Sfoxfairstruct l2tp_accm { 7847831Sfoxfair u_short reserved; 7953943Sache u_int send_accm; 8053943Sache u_int recv_accm; 8153943Sache}; 8253943Sache 8353943Sache