1b06ebda0SMatthew Dillon /* 2b06ebda0SMatthew Dillon * ng_h4_prse.h 3b06ebda0SMatthew Dillon */ 4b06ebda0SMatthew Dillon 5b06ebda0SMatthew Dillon /*- 6b06ebda0SMatthew Dillon * Copyright (c) 2001 Maksim Yevmenkin <m_evmenkin@yahoo.com> 7b06ebda0SMatthew Dillon * All rights reserved. 8b06ebda0SMatthew Dillon * 9b06ebda0SMatthew Dillon * Redistribution and use in source and binary forms, with or without 10b06ebda0SMatthew Dillon * modification, are permitted provided that the following conditions 11b06ebda0SMatthew Dillon * are met: 12b06ebda0SMatthew Dillon * 1. Redistributions of source code must retain the above copyright 13b06ebda0SMatthew Dillon * notice, this list of conditions and the following disclaimer. 14b06ebda0SMatthew Dillon * 2. Redistributions in binary form must reproduce the above copyright 15b06ebda0SMatthew Dillon * notice, this list of conditions and the following disclaimer in the 16b06ebda0SMatthew Dillon * documentation and/or other materials provided with the distribution. 17b06ebda0SMatthew Dillon * 18b06ebda0SMatthew Dillon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19b06ebda0SMatthew Dillon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20b06ebda0SMatthew Dillon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21b06ebda0SMatthew Dillon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22b06ebda0SMatthew Dillon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23b06ebda0SMatthew Dillon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24b06ebda0SMatthew Dillon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25b06ebda0SMatthew Dillon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26b06ebda0SMatthew Dillon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27b06ebda0SMatthew Dillon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28b06ebda0SMatthew Dillon * SUCH DAMAGE. 29b06ebda0SMatthew Dillon * 30b06ebda0SMatthew Dillon * $Id: ng_h4_prse.h,v 1.4 2005/10/31 17:57:43 max Exp $ 31*e85b99abSSascha Wildner * $FreeBSD: head/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h 171818 2007-08-13 17:19:28Z emax $ 32b06ebda0SMatthew Dillon */ 33b06ebda0SMatthew Dillon 34b06ebda0SMatthew Dillon /*************************************************************************** 35b06ebda0SMatthew Dillon *************************************************************************** 36b06ebda0SMatthew Dillon ** ng_parse definitions for the H4 node 37b06ebda0SMatthew Dillon *************************************************************************** 38b06ebda0SMatthew Dillon ***************************************************************************/ 39b06ebda0SMatthew Dillon 40b06ebda0SMatthew Dillon #ifndef _NETGRAPH_H4_PRSE_H_ 41b06ebda0SMatthew Dillon #define _NETGRAPH_H4_PRSE_H_ 42b06ebda0SMatthew Dillon 43b06ebda0SMatthew Dillon /* 44b06ebda0SMatthew Dillon * H4 node command list 45b06ebda0SMatthew Dillon */ 46b06ebda0SMatthew Dillon 47b06ebda0SMatthew Dillon /* Stat info */ 48b06ebda0SMatthew Dillon static const struct ng_parse_struct_field ng_h4_stat_type_fields[] = 49b06ebda0SMatthew Dillon { 50b06ebda0SMatthew Dillon { "pckts_recv", &ng_parse_uint32_type, }, 51b06ebda0SMatthew Dillon { "bytes_recv", &ng_parse_uint32_type, }, 52b06ebda0SMatthew Dillon { "pckts_sent", &ng_parse_uint32_type, }, 53b06ebda0SMatthew Dillon { "bytes_sent", &ng_parse_uint32_type, }, 54b06ebda0SMatthew Dillon { "oerrors", &ng_parse_uint32_type, }, 55b06ebda0SMatthew Dillon { "ierrors", &ng_parse_uint32_type, }, 56b06ebda0SMatthew Dillon { NULL, } 57b06ebda0SMatthew Dillon }; 58b06ebda0SMatthew Dillon static const struct ng_parse_type ng_h4_stat_type = { 59b06ebda0SMatthew Dillon &ng_parse_struct_type, 60b06ebda0SMatthew Dillon &ng_h4_stat_type_fields 61b06ebda0SMatthew Dillon }; 62b06ebda0SMatthew Dillon 63b06ebda0SMatthew Dillon static const struct ng_cmdlist ng_h4_cmdlist[] = { 64b06ebda0SMatthew Dillon { 65b06ebda0SMatthew Dillon NGM_H4_COOKIE, 66b06ebda0SMatthew Dillon NGM_H4_NODE_RESET, 67b06ebda0SMatthew Dillon "reset", 68b06ebda0SMatthew Dillon NULL, 69b06ebda0SMatthew Dillon NULL 70b06ebda0SMatthew Dillon }, 71b06ebda0SMatthew Dillon { 72b06ebda0SMatthew Dillon NGM_H4_COOKIE, 73b06ebda0SMatthew Dillon NGM_H4_NODE_GET_STATE, 74b06ebda0SMatthew Dillon "get_state", 75b06ebda0SMatthew Dillon NULL, 76b06ebda0SMatthew Dillon &ng_parse_uint16_type 77b06ebda0SMatthew Dillon }, 78b06ebda0SMatthew Dillon { 79b06ebda0SMatthew Dillon NGM_H4_COOKIE, 80b06ebda0SMatthew Dillon NGM_H4_NODE_GET_DEBUG, 81b06ebda0SMatthew Dillon "get_debug", 82b06ebda0SMatthew Dillon NULL, 83b06ebda0SMatthew Dillon &ng_parse_uint16_type 84b06ebda0SMatthew Dillon }, 85b06ebda0SMatthew Dillon { 86b06ebda0SMatthew Dillon NGM_H4_COOKIE, 87b06ebda0SMatthew Dillon NGM_H4_NODE_SET_DEBUG, 88b06ebda0SMatthew Dillon "set_debug", 89b06ebda0SMatthew Dillon &ng_parse_uint16_type, 90b06ebda0SMatthew Dillon NULL 91b06ebda0SMatthew Dillon }, 92b06ebda0SMatthew Dillon { 93b06ebda0SMatthew Dillon NGM_H4_COOKIE, 94b06ebda0SMatthew Dillon NGM_H4_NODE_GET_QLEN, 95b06ebda0SMatthew Dillon "get_qlen", 96b06ebda0SMatthew Dillon NULL, 97b06ebda0SMatthew Dillon &ng_parse_int32_type 98b06ebda0SMatthew Dillon }, 99b06ebda0SMatthew Dillon { 100b06ebda0SMatthew Dillon NGM_H4_COOKIE, 101b06ebda0SMatthew Dillon NGM_H4_NODE_SET_QLEN, 102b06ebda0SMatthew Dillon "set_qlen", 103b06ebda0SMatthew Dillon &ng_parse_int32_type, 104b06ebda0SMatthew Dillon NULL 105b06ebda0SMatthew Dillon }, 106b06ebda0SMatthew Dillon { 107b06ebda0SMatthew Dillon NGM_H4_COOKIE, 108b06ebda0SMatthew Dillon NGM_H4_NODE_GET_STAT, 109b06ebda0SMatthew Dillon "get_stat", 110b06ebda0SMatthew Dillon NULL, 111b06ebda0SMatthew Dillon &ng_h4_stat_type 112b06ebda0SMatthew Dillon }, 113b06ebda0SMatthew Dillon { 114b06ebda0SMatthew Dillon NGM_H4_COOKIE, 115b06ebda0SMatthew Dillon NGM_H4_NODE_RESET_STAT, 116b06ebda0SMatthew Dillon "reset_stat", 117b06ebda0SMatthew Dillon NULL, 118b06ebda0SMatthew Dillon NULL 119b06ebda0SMatthew Dillon }, 120b06ebda0SMatthew Dillon { 0, } 121b06ebda0SMatthew Dillon }; 122b06ebda0SMatthew Dillon 123b06ebda0SMatthew Dillon #endif /* ndef _NETGRAPH_H4_PRSE_H_ */ 124b06ebda0SMatthew Dillon 125