ng_h4_prse.h revision 171818
1178825Sdfr/* 2178825Sdfr * ng_h4_prse.h 3178825Sdfr */ 4178825Sdfr 5178825Sdfr/*- 6178825Sdfr * Copyright (c) 2001 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7178825Sdfr * All rights reserved. 8178825Sdfr * 9178825Sdfr * Redistribution and use in source and binary forms, with or without 10178825Sdfr * modification, are permitted provided that the following conditions 11178825Sdfr * are met: 12178825Sdfr * 1. Redistributions of source code must retain the above copyright 13178825Sdfr * notice, this list of conditions and the following disclaimer. 14178825Sdfr * 2. Redistributions in binary form must reproduce the above copyright 15178825Sdfr * notice, this list of conditions and the following disclaimer in the 16178825Sdfr * documentation and/or other materials provided with the distribution. 17178825Sdfr * 18178825Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19178825Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20178825Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21178825Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22178825Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23178825Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24178825Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25178825Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26178825Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27178825Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28178825Sdfr * SUCH DAMAGE. 29178825Sdfr * 30178825Sdfr * $Id: ng_h4_prse.h,v 1.4 2005/10/31 17:57:43 max Exp $ 31178825Sdfr * $FreeBSD: head/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h 171818 2007-08-13 17:19:28Z emax $ 32178825Sdfr */ 33178825Sdfr 34178825Sdfr/*************************************************************************** 35178825Sdfr *************************************************************************** 36178825Sdfr ** ng_parse definitions for the H4 node 37178825Sdfr *************************************************************************** 38178825Sdfr ***************************************************************************/ 39178825Sdfr 40178825Sdfr#ifndef _NETGRAPH_H4_PRSE_H_ 41178825Sdfr#define _NETGRAPH_H4_PRSE_H_ 42178825Sdfr 43178825Sdfr/* 44178825Sdfr * H4 node command list 45178825Sdfr */ 46178825Sdfr 47178825Sdfr/* Stat info */ 48178825Sdfrstatic const struct ng_parse_struct_field ng_h4_stat_type_fields[] = 49178825Sdfr{ 50178825Sdfr { "pckts_recv", &ng_parse_uint32_type, }, 51178825Sdfr { "bytes_recv", &ng_parse_uint32_type, }, 52178825Sdfr { "pckts_sent", &ng_parse_uint32_type, }, 53178825Sdfr { "bytes_sent", &ng_parse_uint32_type, }, 54178825Sdfr { "oerrors", &ng_parse_uint32_type, }, 55178825Sdfr { "ierrors", &ng_parse_uint32_type, }, 56178825Sdfr { NULL, } 57178825Sdfr}; 58178825Sdfrstatic const struct ng_parse_type ng_h4_stat_type = { 59178825Sdfr &ng_parse_struct_type, 60178825Sdfr &ng_h4_stat_type_fields 61178825Sdfr}; 62178825Sdfr 63178825Sdfrstatic const struct ng_cmdlist ng_h4_cmdlist[] = { 64178825Sdfr { 65178825Sdfr NGM_H4_COOKIE, 66178825Sdfr NGM_H4_NODE_RESET, 67178825Sdfr "reset", 68178825Sdfr NULL, 69178825Sdfr NULL 70178825Sdfr }, 71178825Sdfr { 72178825Sdfr NGM_H4_COOKIE, 73178825Sdfr NGM_H4_NODE_GET_STATE, 74178825Sdfr "get_state", 75178825Sdfr NULL, 76178825Sdfr &ng_parse_uint16_type 77178825Sdfr }, 78178825Sdfr { 79178825Sdfr NGM_H4_COOKIE, 80178825Sdfr NGM_H4_NODE_GET_DEBUG, 81178825Sdfr "get_debug", 82178825Sdfr NULL, 83178825Sdfr &ng_parse_uint16_type 84178825Sdfr }, 85178825Sdfr { 86178825Sdfr NGM_H4_COOKIE, 87178825Sdfr NGM_H4_NODE_SET_DEBUG, 88178825Sdfr "set_debug", 89178825Sdfr &ng_parse_uint16_type, 90178825Sdfr NULL 91178825Sdfr }, 92178825Sdfr { 93178825Sdfr NGM_H4_COOKIE, 94178825Sdfr NGM_H4_NODE_GET_QLEN, 95178825Sdfr "get_qlen", 96178825Sdfr NULL, 97178825Sdfr &ng_parse_int32_type 98178825Sdfr }, 99178825Sdfr { 100178825Sdfr NGM_H4_COOKIE, 101178825Sdfr NGM_H4_NODE_SET_QLEN, 102178825Sdfr "set_qlen", 103178825Sdfr &ng_parse_int32_type, 104178825Sdfr NULL 105178825Sdfr }, 106178825Sdfr { 107178825Sdfr NGM_H4_COOKIE, 108178825Sdfr NGM_H4_NODE_GET_STAT, 109178825Sdfr "get_stat", 110178825Sdfr NULL, 111178825Sdfr &ng_h4_stat_type 112178825Sdfr }, 113178825Sdfr { 114178825Sdfr NGM_H4_COOKIE, 115178825Sdfr NGM_H4_NODE_RESET_STAT, 116178825Sdfr "reset_stat", 117178825Sdfr NULL, 118178825Sdfr NULL 119178825Sdfr }, 120178825Sdfr { 0, } 121178825Sdfr}; 122178825Sdfr 123178825Sdfr#endif /* ndef _NETGRAPH_H4_PRSE_H_ */ 124178825Sdfr 125178825Sdfr