FreeBSD kernel netgraph code
ng_hci_prse.h
Go to the documentation of this file.
1/*
2 * ng_hci_prse.h
3 */
4
5/*-
6 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
7 *
8 * Copyright (c) 2001 Maksim Yevmenkin <m_evmenkin@yahoo.com>
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $Id: ng_hci_prse.h,v 1.2 2003/03/18 00:09:36 max Exp $
33 * $FreeBSD$
34 */
35
36/***************************************************************************
37 ***************************************************************************
38 ** ng_parse definitions for the HCI node
39 ***************************************************************************
40 ***************************************************************************/
41
42#ifndef _NETGRAPH_HCI_PRSE_H_
43#define _NETGRAPH_HCI_PRSE_H_
44
45/* BDADDR */
49};
50static const struct ng_parse_type ng_hci_bdaddr_type = {
53};
54
55/* Features */
59};
60static const struct ng_parse_type ng_hci_features_type = {
63};
64
65/* Buffer info */
67{
68 { "cmd_free", &ng_parse_uint8_type, },
69 { "sco_size", &ng_parse_uint8_type, },
70 { "sco_pkts", &ng_parse_uint16_type, },
71 { "sco_free", &ng_parse_uint16_type, },
72 { "acl_size", &ng_parse_uint16_type, },
73 { "acl_pkts", &ng_parse_uint16_type, },
74 { "acl_free", &ng_parse_uint16_type, },
75 { NULL, }
76};
77static const struct ng_parse_type ng_hci_buffer_type = {
80};
81
82/* Stat info */
84{
85 { "cmd_sent", &ng_parse_uint32_type, },
86 { "evnt_recv", &ng_parse_uint32_type, },
87 { "acl_recv", &ng_parse_uint32_type, },
88 { "acl_sent", &ng_parse_uint32_type, },
89 { "sco_recv", &ng_parse_uint32_type, },
90 { "sco_sent", &ng_parse_uint32_type, },
91 { "bytes_recv", &ng_parse_uint32_type, },
92 { "bytes_sent", &ng_parse_uint32_type, },
93 { NULL, }
94};
95static const struct ng_parse_type ng_hci_stat_type = {
98};
99
100/*
101 * HCI node command list
102 */
103
104static const struct ng_cmdlist ng_hci_cmdlist[] = {
105 {
108 "get_state",
109 NULL,
111 },
112 {
115 "init",
116 NULL,
117 NULL
118 },
119 {
122 "get_debug",
123 NULL,
125 },
126 {
129 "set_debug",
131 NULL
132 },
133 {
136 "get_buff_info",
137 NULL,
139 },
140 {
143 "get_bdaddr",
144 NULL,
146 },
147 {
150 "get_features",
151 NULL,
153 },
154 {
157 "get_stat",
158 NULL,
160 },
161 {
164 "reset_stat",
165 NULL,
166 NULL
167 },
168 {
171 "flush_ncache",
172 NULL,
173 NULL
174 },
175 {
178 "get_lm_mask",
179 NULL,
181 },
182 {
185 "set_lm_mask",
187 NULL
188 },
189 {
192 "get_pkt_mask",
193 NULL,
195 },
196 {
199 "set_pkt_mask",
201 NULL
202 },
203 {
206 "get_role_sw",
207 NULL,
209 },
210 {
213 "set_role_sw",
215 NULL
216 },
217 { 0, }
218};
219
220#endif /* ndef _NETGRAPH_HCI_PRSE_H_ */
#define NGM_HCI_NODE_GET_LINK_POLICY_SETTINGS_MASK
Definition: ng_hci.h:674
#define NGM_HCI_NODE_SET_DEBUG
Definition: ng_hci.h:580
#define NGM_HCI_NODE_GET_BUFFER
Definition: ng_hci.h:584
#define NGM_HCI_NODE_GET_STAT
Definition: ng_hci.h:603
#define NGM_HCI_NODE_INIT
Definition: ng_hci.h:575
#define NGM_HCI_NODE_RESET_STAT
Definition: ng_hci.h:615
#define NGM_HCI_NODE_SET_PACKET_MASK
Definition: ng_hci.h:679
#define NGM_HCI_NODE_GET_ROLE_SWITCH
Definition: ng_hci.h:682
#define NG_HCI_FEATURES_SIZE
Definition: ng_hci.h:82
#define NGM_HCI_COOKIE
Definition: ng_hci.h:60
#define NGM_HCI_NODE_SET_ROLE_SWITCH
Definition: ng_hci.h:683
#define NGM_HCI_NODE_GET_STATE
Definition: ng_hci.h:571
#define NGM_HCI_NODE_SET_LINK_POLICY_SETTINGS_MASK
Definition: ng_hci.h:675
#define NGM_HCI_NODE_GET_DEBUG
Definition: ng_hci.h:579
#define NGM_HCI_NODE_FLUSH_NEIGHBOR_CACHE
Definition: ng_hci.h:618
#define NGM_HCI_NODE_GET_PACKET_MASK
Definition: ng_hci.h:678
#define NG_HCI_BDADDR_SIZE
Definition: ng_hci.h:75
#define NGM_HCI_NODE_GET_FEATURES
Definition: ng_hci.h:600
#define NGM_HCI_NODE_GET_BDADDR
Definition: ng_hci.h:596
static const struct ng_parse_type ng_hci_stat_type
Definition: ng_hci_prse.h:95
static const struct ng_parse_fixedarray_info ng_hci_bdaddr_type_info
Definition: ng_hci_prse.h:46
static const struct ng_cmdlist ng_hci_cmdlist[]
Definition: ng_hci_prse.h:104
static const struct ng_parse_type ng_hci_buffer_type
Definition: ng_hci_prse.h:77
static const struct ng_parse_type ng_hci_features_type
Definition: ng_hci_prse.h:60
static const struct ng_parse_fixedarray_info ng_hci_features_type_info
Definition: ng_hci_prse.h:56
static const struct ng_parse_struct_field ng_hci_buffer_type_fields[]
Definition: ng_hci_prse.h:66
static const struct ng_parse_type ng_hci_bdaddr_type
Definition: ng_hci_prse.h:50
static const struct ng_parse_struct_field ng_hci_stat_type_fields[]
Definition: ng_hci_prse.h:83
const struct ng_parse_type ng_parse_uint16_type
Definition: ng_parse.c:509
const struct ng_parse_type ng_parse_fixedarray_type
Definition: ng_parse.c:271
const struct ng_parse_type ng_parse_struct_type
Definition: ng_parse.c:222
const struct ng_parse_type ng_parse_uint32_type
Definition: ng_parse.c:608
const struct ng_parse_type ng_parse_uint8_type
Definition: ng_parse.c:413