11252Ssundar/* 21252Ssundar * ng_lmi.h 31252Ssundar */ 41252Ssundar 51252Ssundar/*- 61252Ssundar * Copyright (c) 1996-1999 Whistle Communications, Inc. 71252Ssundar * All rights reserved. 81252Ssundar * 91252Ssundar * Subject to the following obligations and disclaimer of warranty, use and 101252Ssundar * redistribution of this software, in source or object code forms, with or 111252Ssundar * without modifications are expressly permitted by Whistle Communications; 121252Ssundar * provided, however, that: 131252Ssundar * 1. Any and all reproductions of the source or object code must include the 141252Ssundar * copyright notice above and the following disclaimer of warranties; and 151252Ssundar * 2. No rights are granted, in any manner or form, to use Whistle 161252Ssundar * Communications, Inc. trademarks, including the mark "WHISTLE 171252Ssundar * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 181252Ssundar * such appears in the above copyright notice or in the software. 191252Ssundar * 201252Ssundar * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 211252Ssundar * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 221252Ssundar * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 231252Ssundar * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 241252Ssundar * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 251252Ssundar * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 261252Ssundar * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 271252Ssundar * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 281252Ssundar * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 291252Ssundar * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 301252Ssundar * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 311252Ssundar * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 321252Ssundar * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 331252Ssundar * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 341252Ssundar * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 351252Ssundar * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 361252Ssundar * OF SUCH DAMAGE. 371252Ssundar * 381252Ssundar * Author: Archie Cobbs <archie@freebsd.org> 391252Ssundar * 401252Ssundar * $FreeBSD$ 411252Ssundar * $Whistle: ng_lmi.h,v 1.9 1999/01/20 00:22:13 archie Exp $ 421252Ssundar */ 431252Ssundar 441252Ssundar#ifndef _NETGRAPH_NG_LMI_H_ 451252Ssundar#define _NETGRAPH_NG_LMI_H_ 461252Ssundar 471252Ssundar/* Node type name and magic cookie */ 481252Ssundar#define NG_LMI_NODE_TYPE "lmi" 491252Ssundar#define NGM_LMI_COOKIE 867184133 501252Ssundar 511252Ssundar/* My hook names */ 521252Ssundar#define NG_LMI_HOOK_DEBUG "debug" 531252Ssundar#define NG_LMI_HOOK_ANNEXA "annexA" 541252Ssundar#define NG_LMI_HOOK_ANNEXD "annexD" 551252Ssundar#define NG_LMI_HOOK_GROUPOF4 "group4" 561252Ssundar#define NG_LMI_HOOK_AUTO0 "auto0" 571252Ssundar#define NG_LMI_HOOK_AUTO1023 "auto1023" 581252Ssundar 591252Ssundar/* Netgraph commands */ 601252Ssundarenum { 611252Ssundar NGM_LMI_GET_STATUS = 1, 621252Ssundar}; 631252Ssundar 641252Ssundar#define NGM_LMI_STAT_ARYSIZE (1024/8) 651252Ssundar 661252Ssundarstruct nglmistat { 671252Ssundar u_char proto[12]; /* Active proto (same as hook name) */ 681252Ssundar u_char hook[12]; /* Active hook */ 691252Ssundar u_char fixed; /* Set to fixed LMI mode */ 701252Ssundar u_char autod; /* Currently auto-detecting */ 711252Ssundar u_char seen[NGM_LMI_STAT_ARYSIZE]; /* DLCIs ever seen */ 721252Ssundar u_char up[NGM_LMI_STAT_ARYSIZE]; /* DLCIs currently up */ 731252Ssundar}; 741252Ssundar 751252Ssundar/* Some default values */ 761252Ssundar#define NG_LMI_KEEPALIVE_RATE 10 /* seconds per keepalive */ 771252Ssundar#define NG_LMI_POLL_RATE 3 /* faster when AUTO polling */ 781252Ssundar#define NG_LMI_SEQ_PER_FULL 5 /* keepalives per full status */ 791252Ssundar#define NG_LMI_LMI_PRIORITY 64 /* priority for LMI data */ 801252Ssundar 811252Ssundar#endif /* _NETGRAPH_NG_LMI_H_ */ 821252Ssundar