2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2001-2003
5 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
8 * Author: Harti Brandt <harti@freebsd.org>
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * Netgraph module for Q.2110 SSCOP
35 #ifndef _NETGRAPH_ATM_NG_SSCOP_H_
36 #define _NETGRAPH_ATM_NG_SSCOP_H_
38 #define NG_SSCOP_NODE_TYPE "sscop"
39 #define NGM_SSCOP_COOKIE 980175044
41 /* Netgraph control messages */
43 NGM_SSCOP_GETPARAM = 1, /* get parameters */
44 NGM_SSCOP_SETPARAM, /* set parameters */
45 NGM_SSCOP_ENABLE, /* enable processing */
46 NGM_SSCOP_DISABLE, /* disable and reset */
47 NGM_SSCOP_GETDEBUG, /* get debugging flags */
48 NGM_SSCOP_SETDEBUG, /* set debugging flags */
49 NGM_SSCOP_GETSTATE, /* get current SSCOP state */
52 /* This must be in-sync with the definition in sscopdef.h */
53 #define NG_SSCOP_PARAM_INFO \
55 { "timer_cc", &ng_parse_uint32_type }, \
56 { "timer_poll", &ng_parse_uint32_type }, \
57 { "timer_keep_alive", &ng_parse_uint32_type }, \
58 { "timer_no_response",&ng_parse_uint32_type }, \
59 { "timer_idle", &ng_parse_uint32_type }, \
60 { "maxk", &ng_parse_uint32_type }, \
61 { "maxj", &ng_parse_uint32_type }, \
62 { "maxcc", &ng_parse_uint32_type }, \
63 { "maxpd", &ng_parse_uint32_type }, \
64 { "maxstat", &ng_parse_uint32_type }, \
65 { "mr", &ng_parse_uint32_type }, \
66 { "flags", &ng_parse_uint32_type }, \
71 struct ng_sscop_setparam {
73 struct sscop_param param;
75 #define NG_SSCOP_SETPARAM_INFO \
77 { "mask", &ng_parse_uint32_type }, \
78 { "param", &ng_sscop_param_type }, \
82 struct ng_sscop_setparam_resp {
86 #define NG_SSCOP_SETPARAM_RESP_INFO \
88 { "mask", &ng_parse_uint32_type }, \
89 { "error", &ng_parse_int32_type }, \
98 uint32_t arg; /* opt. sequence number or clear-buff */
108 uint32_t err; /* error code */
109 uint32_t cnt; /* error count */