2 * Copyright (c) 2001-2002
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
5 * Copyright (c) 2003-2004
9 * Author: Harti Brandt <harti@freebsd.org>
11 * Redistribution of this software and documentation and use in source and
12 * binary forms, with or without modification, are permitted provided that
13 * the following conditions are met:
15 * 1. Redistributions of source code or documentation must retain the above
16 * copyright notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * $FreeBSD: src/sys/netgraph/atm/ng_ccatm.h,v 1.2 2005/01/07 01:45:40 imp Exp $
34 * $DragonFly: src/sys/netgraph7/atm/ng_ccatm.h,v 1.2 2008/06/26 23:05:37 dillon Exp $
38 * Interface to ng_ccatm
40 #ifndef _NETGRAPH_ATM_NG_CCATM_H_
41 #define _NETGRAPH_ATM_NG_CCATM_H_
43 #define NG_CCATM_NODE_TYPE "ccatm"
44 #define NGM_CCATM_COOKIE 984046139
47 NGM_CCATM_DUMP
, /* dump internal status */
48 NGM_CCATM_STOP
, /* stop all processing, close all */
49 NGM_CCATM_START
, /* start processing */
50 NGM_CCATM_CLEAR
, /* clear prefix/address table */
51 NGM_CCATM_GET_ADDRESSES
, /* get list of all addresses */
52 NGM_CCATM_ADDRESS_REGISTERED
, /* registration ok */
53 NGM_CCATM_ADDRESS_UNREGISTERED
, /* unregistration ok */
54 NGM_CCATM_SET_PORT_PARAM
, /* set port parameters */
55 NGM_CCATM_GET_PORT_PARAM
, /* get port parameters */
56 NGM_CCATM_GET_PORTLIST
, /* get list of port numbers */
57 NGM_CCATM_GETSTATE
, /* get port status */
58 NGM_CCATM_SETLOG
, /* set/get loglevel */
59 NGM_CCATM_RESET
, /* reset everything */
60 NGM_CCATM_GET_EXSTAT
, /* get extended status */
64 * This must be synchronized with unistruct.h::struct uni_addr
66 #define NGM_CCATM_ADDR_ARRAY_INFO \
68 &ng_parse_hint8_type, \
72 #define NGM_CCATM_UNI_ADDR_INFO \
74 { "type", &ng_parse_uint32_type }, \
75 { "plan", &ng_parse_uint32_type }, \
76 { "len", &ng_parse_uint32_type }, \
77 { "addr", &ng_ccatm_addr_array_type }, \
84 struct ngm_ccatm_addr_req
{
88 #define NGM_CCATM_ADDR_REQ_INFO \
90 { "port", &ng_parse_uint32_type }, \
91 { "addr", &ng_ccatm_uni_addr_type }, \
96 * Get current address list
98 struct ngm_ccatm_get_addresses
{
100 struct ngm_ccatm_addr_req addr
[];
102 #define NGM_CCATM_ADDR_REQ_ARRAY_INFO \
104 &ng_ccatm_addr_req_type, \
105 ng_ccatm_addr_req_array_getlen \
107 #define NGM_CCATM_GET_ADDRESSES_INFO \
109 { "count", &ng_parse_uint32_type }, \
110 { "addr", &ng_ccatm_addr_req_array_type }, \
117 struct ngm_ccatm_port
{
120 #define NGM_CCATM_PORT_INFO \
122 { "port", &ng_parse_uint32_type }, \
128 * This must be synchronized with atmapi.h::struct atm_port_info.
130 #define NGM_CCATM_ESI_INFO \
132 &ng_parse_hint8_type, \
135 #define NGM_CCATM_ATM_PORT_INFO \
137 { "port", &ng_parse_uint32_type }, \
138 { "pcr", &ng_parse_uint32_type }, \
139 { "max_vpi_bits", &ng_parse_uint32_type }, \
140 { "max_vci_bits", &ng_parse_uint32_type }, \
141 { "max_svpc_vpi", &ng_parse_uint32_type }, \
142 { "max_svcc_vpi", &ng_parse_uint32_type }, \
143 { "min_svcc_vci", &ng_parse_uint32_type }, \
144 { "esi", &ng_ccatm_esi_type }, \
145 { "num_addr", &ng_parse_uint32_type }, \
150 * List of port numbers
152 struct ngm_ccatm_portlist
{
156 #define NGM_CCATM_PORT_ARRAY_INFO \
158 &ng_parse_uint32_type, \
159 ng_ccatm_port_array_getlen \
161 #define NGM_CCATM_PORTLIST_INFO \
163 { "nports", &ng_parse_uint32_type }, \
164 { "ports", &ng_ccatm_port_array_type }, \
169 uint32_t op
; /* request code */