ng_ubt.h revision 114878
1107120Sjulian/* 2107120Sjulian * ng_ubt.h 3107120Sjulian * 4107120Sjulian * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5107120Sjulian * All rights reserved. 6107120Sjulian * 7107120Sjulian * Redistribution and use in source and binary forms, with or without 8107120Sjulian * modification, are permitted provided that the following conditions 9107120Sjulian * are met: 10107120Sjulian * 1. Redistributions of source code must retain the above copyright 11107120Sjulian * notice, this list of conditions and the following disclaimer. 12107120Sjulian * 2. Redistributions in binary form must reproduce the above copyright 13107120Sjulian * notice, this list of conditions and the following disclaimer in the 14107120Sjulian * documentation and/or other materials provided with the distribution. 15107120Sjulian * 16107120Sjulian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17107120Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18107120Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19107120Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20107120Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21107120Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22107120Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23107120Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24107120Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25107120Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26107120Sjulian * SUCH DAMAGE. 27107120Sjulian * 28114878Sjulian * $Id: ng_ubt.h,v 1.6 2003/04/13 21:34:42 max Exp $ 29107120Sjulian * $FreeBSD: head/sys/netgraph/bluetooth/include/ng_ubt.h 114878 2003-05-10 21:44:42Z julian $ 30107120Sjulian */ 31107120Sjulian 32107120Sjulian#ifndef _NG_UBT_H_ 33107120Sjulian#define _NG_UBT_H_ 34107120Sjulian 35107120Sjulian/************************************************************************** 36107120Sjulian ************************************************************************** 37107120Sjulian ** Netgraph node hook name, type name and type cookie and commands 38107120Sjulian ************************************************************************** 39107120Sjulian **************************************************************************/ 40107120Sjulian 41107120Sjulian#define NG_UBT_NODE_TYPE "ubt" 42107120Sjulian#define NG_UBT_HOOK "hook" 43107120Sjulian 44107120Sjulian#define NGM_UBT_COOKIE 1021837971 45107120Sjulian 46107120Sjulian/* Debug levels */ 47107120Sjulian#define NG_UBT_ALERT_LEVEL 1 48107120Sjulian#define NG_UBT_ERR_LEVEL 2 49107120Sjulian#define NG_UBT_WARN_LEVEL 3 50107120Sjulian#define NG_UBT_INFO_LEVEL 4 51107120Sjulian 52107120Sjulian/************************************************************************** 53107120Sjulian ************************************************************************** 54107120Sjulian ** UBT node command/event parameters 55107120Sjulian ************************************************************************** 56107120Sjulian **************************************************************************/ 57107120Sjulian 58107120Sjulian#define NGM_UBT_NODE_SET_DEBUG 1 /* set debug level */ 59107120Sjulian#define NGM_UBT_NODE_GET_DEBUG 2 /* get debug level */ 60107120Sjuliantypedef u_int16_t ng_ubt_node_debug_ep; 61107120Sjulian 62107120Sjulian#define NGM_UBT_NODE_SET_QLEN 3 /* set queue length */ 63107120Sjulian#define NGM_UBT_NODE_GET_QLEN 4 /* get queue length */ 64107120Sjuliantypedef struct { 65107120Sjulian int32_t queue; /* queue index */ 66114878Sjulian#define NGM_UBT_NODE_QUEUE_CMD 1 /* commands */ 67114878Sjulian#define NGM_UBT_NODE_QUEUE_ACL 2 /* ACL data */ 68114878Sjulian#define NGM_UBT_NODE_QUEUE_SCO 3 /* SCO data */ 69107120Sjulian 70107120Sjulian int32_t qlen; /* queue length */ 71107120Sjulian} ng_ubt_node_qlen_ep; 72107120Sjulian 73107120Sjulian#define NGM_UBT_NODE_GET_STAT 5 /* get statistic */ 74107120Sjuliantypedef struct { 75107120Sjulian u_int32_t pckts_recv; /* # of packets received */ 76107120Sjulian u_int32_t bytes_recv; /* # of bytes received */ 77107120Sjulian u_int32_t pckts_sent; /* # of packets sent */ 78107120Sjulian u_int32_t bytes_sent; /* # of bytes sent */ 79107120Sjulian u_int32_t oerrors; /* # of output errors */ 80107120Sjulian u_int32_t ierrors; /* # of input errors */ 81107120Sjulian} ng_ubt_node_stat_ep; 82107120Sjulian 83107120Sjulian#define NGM_UBT_NODE_RESET_STAT 6 /* reset statistic */ 84107120Sjulian 85114878Sjulian#define NGM_UBT_NODE_DEV_NODES 7 /* on/off device interface */ 86114878Sjuliantypedef u_int16_t ng_ubt_node_dev_nodes_ep; 87114878Sjulian 88107120Sjulian#endif /* ndef _NG_UBT_H_ */ 89107120Sjulian 90