152419Sjulian/* 252419Sjulian * ng_lmi.h 3139823Simp */ 4139823Simp 5139823Simp/*- 652419Sjulian * Copyright (c) 1996-1999 Whistle Communications, Inc. 752419Sjulian * All rights reserved. 852419Sjulian * 952419Sjulian * Subject to the following obligations and disclaimer of warranty, use and 1052419Sjulian * redistribution of this software, in source or object code forms, with or 1152419Sjulian * without modifications are expressly permitted by Whistle Communications; 1252419Sjulian * provided, however, that: 1352419Sjulian * 1. Any and all reproductions of the source or object code must include the 1452419Sjulian * copyright notice above and the following disclaimer of warranties; and 1552419Sjulian * 2. No rights are granted, in any manner or form, to use Whistle 1652419Sjulian * Communications, Inc. trademarks, including the mark "WHISTLE 1752419Sjulian * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 1852419Sjulian * such appears in the above copyright notice or in the software. 1952419Sjulian * 2052419Sjulian * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 2152419Sjulian * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 2252419Sjulian * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 2352419Sjulian * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 2452419Sjulian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 2552419Sjulian * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 2652419Sjulian * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 2752419Sjulian * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 2852419Sjulian * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 2952419Sjulian * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 3052419Sjulian * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 3152419Sjulian * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 3252419Sjulian * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 3352419Sjulian * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3452419Sjulian * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3552419Sjulian * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 3652419Sjulian * OF SUCH DAMAGE. 3752419Sjulian * 3867506Sjulian * Author: Archie Cobbs <archie@freebsd.org> 3952419Sjulian * 4052419Sjulian * $FreeBSD: releng/10.2/sys/netgraph/ng_lmi.h 139823 2005-01-07 01:45:51Z imp $ 4152419Sjulian * $Whistle: ng_lmi.h,v 1.9 1999/01/20 00:22:13 archie Exp $ 4252419Sjulian */ 4352419Sjulian 44122481Sru#ifndef _NETGRAPH_NG_LMI_H_ 45122481Sru#define _NETGRAPH_NG_LMI_H_ 4652419Sjulian 4752419Sjulian/* Node type name and magic cookie */ 4852419Sjulian#define NG_LMI_NODE_TYPE "lmi" 4952419Sjulian#define NGM_LMI_COOKIE 867184133 5052419Sjulian 5152419Sjulian/* My hook names */ 5252419Sjulian#define NG_LMI_HOOK_DEBUG "debug" 5352419Sjulian#define NG_LMI_HOOK_ANNEXA "annexA" 5452419Sjulian#define NG_LMI_HOOK_ANNEXD "annexD" 5552419Sjulian#define NG_LMI_HOOK_GROUPOF4 "group4" 5652419Sjulian#define NG_LMI_HOOK_AUTO0 "auto0" 5752419Sjulian#define NG_LMI_HOOK_AUTO1023 "auto1023" 5852419Sjulian 5952419Sjulian/* Netgraph commands */ 6052419Sjulianenum { 6152419Sjulian NGM_LMI_GET_STATUS = 1, 6252419Sjulian}; 6352419Sjulian 6452419Sjulian#define NGM_LMI_STAT_ARYSIZE (1024/8) 6552419Sjulian 6652419Sjulianstruct nglmistat { 6752419Sjulian u_char proto[12]; /* Active proto (same as hook name) */ 6852419Sjulian u_char hook[12]; /* Active hook */ 6952419Sjulian u_char fixed; /* Set to fixed LMI mode */ 7052419Sjulian u_char autod; /* Currently auto-detecting */ 7152419Sjulian u_char seen[NGM_LMI_STAT_ARYSIZE]; /* DLCIs ever seen */ 7252419Sjulian u_char up[NGM_LMI_STAT_ARYSIZE]; /* DLCIs currently up */ 7352419Sjulian}; 7452419Sjulian 7552419Sjulian/* Some default values */ 7652419Sjulian#define NG_LMI_KEEPALIVE_RATE 10 /* seconds per keepalive */ 7752419Sjulian#define NG_LMI_POLL_RATE 3 /* faster when AUTO polling */ 7852419Sjulian#define NG_LMI_SEQ_PER_FULL 5 /* keepalives per full status */ 7952419Sjulian#define NG_LMI_LMI_PRIORITY 64 /* priority for LMI data */ 8052419Sjulian 81122481Sru#endif /* _NETGRAPH_NG_LMI_H_ */ 82