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
37 * Interface to ng_ccatm
39 #ifndef _NETGRAPH_ATM_NG_CCATM_H_
40 #define _NETGRAPH_ATM_NG_CCATM_H_
42 #define NG_CCATM_NODE_TYPE "ccatm"
43 #define NGM_CCATM_COOKIE 984046139
46 NGM_CCATM_DUMP, /* dump internal status */
47 NGM_CCATM_STOP, /* stop all processing, close all */
48 NGM_CCATM_START, /* start processing */
49 NGM_CCATM_CLEAR, /* clear prefix/address table */
50 NGM_CCATM_GET_ADDRESSES, /* get list of all addresses */
51 NGM_CCATM_ADDRESS_REGISTERED, /* registration ok */
52 NGM_CCATM_ADDRESS_UNREGISTERED, /* unregistration ok */
53 NGM_CCATM_SET_PORT_PARAM, /* set port parameters */
54 NGM_CCATM_GET_PORT_PARAM, /* get port parameters */
55 NGM_CCATM_GET_PORTLIST, /* get list of port numbers */
56 NGM_CCATM_GETSTATE, /* get port status */
57 NGM_CCATM_SETLOG, /* set/get loglevel */
58 NGM_CCATM_RESET, /* reset everything */
59 NGM_CCATM_GET_EXSTAT, /* get extended status */
63 * This must be synchronized with unistruct.h::struct uni_addr
65 #define NGM_CCATM_ADDR_ARRAY_INFO \
67 &ng_parse_hint8_type, \
71 #define NGM_CCATM_UNI_ADDR_INFO \
73 { "type", &ng_parse_uint32_type }, \
74 { "plan", &ng_parse_uint32_type }, \
75 { "len", &ng_parse_uint32_type }, \
76 { "addr", &ng_ccatm_addr_array_type }, \
83 struct ngm_ccatm_addr_req {
87 #define NGM_CCATM_ADDR_REQ_INFO \
89 { "port", &ng_parse_uint32_type }, \
90 { "addr", &ng_ccatm_uni_addr_type }, \
95 * Get current address list
97 struct ngm_ccatm_get_addresses {
99 struct ngm_ccatm_addr_req addr[];
101 #define NGM_CCATM_ADDR_REQ_ARRAY_INFO \
103 &ng_ccatm_addr_req_type, \
104 ng_ccatm_addr_req_array_getlen \
106 #define NGM_CCATM_GET_ADDRESSES_INFO \
108 { "count", &ng_parse_uint32_type }, \
109 { "addr", &ng_ccatm_addr_req_array_type }, \
116 struct ngm_ccatm_port {
119 #define NGM_CCATM_PORT_INFO \
121 { "port", &ng_parse_uint32_type }, \
127 * This must be synchronized with atmapi.h::struct atm_port_info.
129 #define NGM_CCATM_ESI_INFO \
131 &ng_parse_hint8_type, \
134 #define NGM_CCATM_ATM_PORT_INFO \
136 { "port", &ng_parse_uint32_type }, \
137 { "pcr", &ng_parse_uint32_type }, \
138 { "max_vpi_bits", &ng_parse_uint32_type }, \
139 { "max_vci_bits", &ng_parse_uint32_type }, \
140 { "max_svpc_vpi", &ng_parse_uint32_type }, \
141 { "max_svcc_vpi", &ng_parse_uint32_type }, \
142 { "min_svcc_vci", &ng_parse_uint32_type }, \
143 { "esi", &ng_ccatm_esi_type }, \
144 { "num_addr", &ng_parse_uint32_type }, \
149 * List of port numbers
151 struct ngm_ccatm_portlist {
155 #define NGM_CCATM_PORT_ARRAY_INFO \
157 &ng_parse_uint32_type, \
158 ng_ccatm_port_array_getlen \
160 #define NGM_CCATM_PORTLIST_INFO \
162 { "nports", &ng_parse_uint32_type }, \
163 { "ports", &ng_ccatm_port_array_type }, \
168 uint32_t op; /* request code */