1 /*-
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Hartmut Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: releng/10.2/sys/netgraph/atm/ng_uni.h 139823 2005-01-07 01:45:51Z imp $
30 *
31 * Netgraph module for UNI 4.0
32 */
33 #ifndef _NETGRAPH_ATM_NG_UNI_H_
34 #define _NETGRAPH_ATM_NG_UNI_H_
35
36 #define NG_UNI_NODE_TYPE "uni"
37 #define NGM_UNI_COOKIE 981112392
38
39 enum {
40 NGM_UNI_GETDEBUG, /* get debug flags */
41 NGM_UNI_SETDEBUG, /* set debug flags */
42 NGM_UNI_GET_CONFIG, /* get configuration */
43 NGM_UNI_SET_CONFIG, /* set configuration */
44 NGM_UNI_ENABLE, /* enable processing */
45 NGM_UNI_DISABLE, /* free resources and disable */
46 NGM_UNI_GETSTATE, /* retrieve coord state */
47 };
48
49 struct ngm_uni_debug {
50 uint32_t level[UNI_MAXFACILITY];
51 };
52 #define NGM_UNI_DEBUGLEVEL_INFO { \
53 &ng_parse_uint32_type, \
54 UNI_MAXFACILITY \
55 }
56 #define NGM_UNI_DEBUG_INFO \
57 { \
58 { "level", &ng_uni_debuglevel_type }, \
59 { NULL } \
60 }
61
62 #define NGM_UNI_CONFIG_INFO \
63 { \
64 { "proto", &ng_parse_uint32_type }, \
65 { "popt", &ng_parse_uint32_type }, \
66 { "option", &ng_parse_uint32_type }, \
67 { "timer301", &ng_parse_uint32_type }, \
68 { "timer303", &ng_parse_uint32_type }, \
69 { "init303", &ng_parse_uint32_type }, \
70 { "timer308", &ng_parse_uint32_type }, \
71 { "init308", &ng_parse_uint32_type }, \
72 { "timer309", &ng_parse_uint32_type }, \
73 { "timer310", &ng_parse_uint32_type }, \
74 { "timer313", &ng_parse_uint32_type }, \
75 { "timer316", &ng_parse_uint32_type }, \
76 { "init316", &ng_parse_uint32_type }, \
77 { "timer317", &ng_parse_uint32_type }, \
78 { "timer322", &ng_parse_uint32_type }, \
79 { "init322", &ng_parse_uint32_type }, \
80 { "timer397", &ng_parse_uint32_type }, \
81 { "timer398", &ng_parse_uint32_type }, \
82 { "timer399", &ng_parse_uint32_type }, \
83 { NULL } \
84 }
85
86 struct ngm_uni_config_mask {
87 uint32_t mask;
88 uint32_t popt_mask;
89 uint32_t option_mask;
90 };
91 #define NGM_UNI_CONFIG_MASK_INFO \
92 { \
93 { "mask", &ng_parse_hint32_type }, \
94 { "popt_mask", &ng_parse_hint32_type }, \
95 { "option_mask", &ng_parse_hint32_type }, \
96 { NULL } \
97 }
98
99 struct ngm_uni_set_config {
100 struct uni_config config;
101 struct ngm_uni_config_mask mask;
102 };
103 #define NGM_UNI_SET_CONFIG_INFO \
104 { \
105 { "config", &ng_uni_config_type }, \
106 { "mask", &ng_uni_config_mask_type }, \
107 { NULL } \
108 }
109
110 /*
111 * API message
112 */
113 struct uni_arg {
114 uint32_t sig;
115 uint32_t cookie;
116 u_char data[];
117 };
118
119 #endif
Cache object: 8c0016f9c1a6798f6be73a579ce77763
|