2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
6 * Author: Harti Brandt <harti@freebsd.org>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
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.
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
31 * Netgraph module for Q.2110 SSCOP
33 #ifndef _NETGRAPH_ATM_NG_SSCOP_H_
34 #define _NETGRAPH_ATM_NG_SSCOP_H_
36 #define NG_SSCOP_NODE_TYPE "sscop"
37 #define NGM_SSCOP_COOKIE 980175044
39 /* Netgraph control messages */
41 NGM_SSCOP_GETPARAM = 1, /* get parameters */
42 NGM_SSCOP_SETPARAM, /* set parameters */
43 NGM_SSCOP_ENABLE, /* enable processing */
44 NGM_SSCOP_DISABLE, /* disable and reset */
45 NGM_SSCOP_GETDEBUG, /* get debugging flags */
46 NGM_SSCOP_SETDEBUG, /* set debugging flags */
47 NGM_SSCOP_GETSTATE, /* get current SSCOP state */
50 /* This must be in-sync with the definition in sscopdef.h */
51 #define NG_SSCOP_PARAM_INFO \
53 { "timer_cc", &ng_parse_uint32_type }, \
54 { "timer_poll", &ng_parse_uint32_type }, \
55 { "timer_keep_alive", &ng_parse_uint32_type }, \
56 { "timer_no_response",&ng_parse_uint32_type }, \
57 { "timer_idle", &ng_parse_uint32_type }, \
58 { "maxk", &ng_parse_uint32_type }, \
59 { "maxj", &ng_parse_uint32_type }, \
60 { "maxcc", &ng_parse_uint32_type }, \
61 { "maxpd", &ng_parse_uint32_type }, \
62 { "maxstat", &ng_parse_uint32_type }, \
63 { "mr", &ng_parse_uint32_type }, \
64 { "flags", &ng_parse_uint32_type }, \
69 struct ng_sscop_setparam {
71 struct sscop_param param;
73 #define NG_SSCOP_SETPARAM_INFO \
75 { "mask", &ng_parse_uint32_type }, \
76 { "param", &ng_sscop_param_type }, \
80 struct ng_sscop_setparam_resp {
84 #define NG_SSCOP_SETPARAM_RESP_INFO \
86 { "mask", &ng_parse_uint32_type }, \
87 { "error", &ng_parse_int32_type }, \
96 uint32_t arg; /* opt. sequence number or clear-buff */
106 uint32_t err; /* error code */
107 uint32_t cnt; /* error count */