I should drink more coffee before starting committing. Revert the last change
[dragonfly.git] / sys / netgraph7 / atm / ng_sscop.h
blobb15ab93c01c16748ebd655989afee28cfcfb5ac1
1 /*-
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
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
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.
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.
29 * $FreeBSD: src/sys/netgraph/atm/ng_sscop.h,v 1.3 2005/01/07 01:45:40 imp Exp $
30 * $DragonFly: src/sys/netgraph7/atm/ng_sscop.h,v 1.2 2008/06/26 23:05:37 dillon Exp $
32 * Netgraph module for Q.2110 SSCOP
34 #ifndef _NETGRAPH_ATM_NG_SSCOP_H_
35 #define _NETGRAPH_ATM_NG_SSCOP_H_
37 #define NG_SSCOP_NODE_TYPE "sscop"
38 #define NGM_SSCOP_COOKIE 980175044
40 /* Netgraph control messages */
41 enum {
42 NGM_SSCOP_GETPARAM = 1, /* get parameters */
43 NGM_SSCOP_SETPARAM, /* set parameters */
44 NGM_SSCOP_ENABLE, /* enable processing */
45 NGM_SSCOP_DISABLE, /* disable and reset */
46 NGM_SSCOP_GETDEBUG, /* get debugging flags */
47 NGM_SSCOP_SETDEBUG, /* set debugging flags */
48 NGM_SSCOP_GETSTATE, /* get current SSCOP state */
51 /* This must be in-sync with the definition in sscopdef.h */
52 #define NG_SSCOP_PARAM_INFO \
53 { \
54 { "timer_cc", &ng_parse_uint32_type }, \
55 { "timer_poll", &ng_parse_uint32_type }, \
56 { "timer_keep_alive", &ng_parse_uint32_type }, \
57 { "timer_no_response",&ng_parse_uint32_type }, \
58 { "timer_idle", &ng_parse_uint32_type }, \
59 { "maxk", &ng_parse_uint32_type }, \
60 { "maxj", &ng_parse_uint32_type }, \
61 { "maxcc", &ng_parse_uint32_type }, \
62 { "maxpd", &ng_parse_uint32_type }, \
63 { "maxstat", &ng_parse_uint32_type }, \
64 { "mr", &ng_parse_uint32_type }, \
65 { "flags", &ng_parse_uint32_type }, \
66 { NULL } \
70 struct ng_sscop_setparam {
71 uint32_t mask;
72 struct sscop_param param;
74 #define NG_SSCOP_SETPARAM_INFO \
75 { \
76 { "mask", &ng_parse_uint32_type }, \
77 { "param", &ng_sscop_param_type }, \
78 { NULL } \
81 struct ng_sscop_setparam_resp {
82 uint32_t mask;
83 int32_t error;
85 #define NG_SSCOP_SETPARAM_RESP_INFO \
86 { \
87 { "mask", &ng_parse_uint32_type }, \
88 { "error", &ng_parse_int32_type }, \
89 { NULL } \
93 * Upper interface
95 struct sscop_arg {
96 uint32_t sig;
97 uint32_t arg; /* opt. sequence number or clear-buff */
98 u_char data[];
101 struct sscop_marg {
102 uint32_t sig;
103 u_char data[];
105 struct sscop_merr {
106 uint32_t sig;
107 uint32_t err; /* error code */
108 uint32_t cnt; /* error count */
111 #endif