FreeBSD kernel netgraph code
ng_sscop.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2001-2003
5 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
6 * All rights reserved.
7 *
8 * Author: Harti Brandt <harti@freebsd.org>
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
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.
18 *
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
29 * SUCH DAMAGE.
30 *
31 * $FreeBSD$
32 *
33 * Netgraph module for Q.2110 SSCOP
34 */
35#ifndef _NETGRAPH_ATM_NG_SSCOP_H_
36#define _NETGRAPH_ATM_NG_SSCOP_H_
37
38#define NG_SSCOP_NODE_TYPE "sscop"
39#define NGM_SSCOP_COOKIE 980175044
40
41/* Netgraph control messages */
42enum {
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 */
50};
51
52/* This must be in-sync with the definition in sscopdef.h */
53#define NG_SSCOP_PARAM_INFO \
54 { \
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 }, \
67 { NULL } \
68 }
69
71 uint32_t mask;
72 struct sscop_param param;
73};
74#define NG_SSCOP_SETPARAM_INFO \
75 { \
76 { "mask", &ng_parse_uint32_type }, \
77 { "param", &ng_sscop_param_type }, \
78 { NULL } \
79 }
80
82 uint32_t mask;
83 int32_t error;
84};
85#define NG_SSCOP_SETPARAM_RESP_INFO \
86 { \
87 { "mask", &ng_parse_uint32_type }, \
88 { "error", &ng_parse_int32_type }, \
89 { NULL } \
90 }
91
92/*
93 * Upper interface
94 */
95struct sscop_arg {
96 uint32_t sig;
97 uint32_t arg; /* opt. sequence number or clear-buff */
98 u_char data[];
99};
100
102 uint32_t sig;
103 u_char data[];
104};
106 uint32_t sig;
107 uint32_t err; /* error code */
108 uint32_t cnt; /* error count */
109};
110
111#endif
@ NGM_SSCOP_GETDEBUG
Definition: ng_sscop.h:47
@ NGM_SSCOP_SETDEBUG
Definition: ng_sscop.h:48
@ NGM_SSCOP_DISABLE
Definition: ng_sscop.h:46
@ NGM_SSCOP_ENABLE
Definition: ng_sscop.h:45
@ NGM_SSCOP_GETSTATE
Definition: ng_sscop.h:49
@ NGM_SSCOP_SETPARAM
Definition: ng_sscop.h:44
@ NGM_SSCOP_GETPARAM
Definition: ng_sscop.h:43
uint32_t mask
Definition: ng_sscop.h:71
struct sscop_param param
Definition: ng_sscop.h:72
uint32_t arg
Definition: ng_sscop.h:97
uint32_t sig
Definition: ng_sscop.h:96
u_char data[]
Definition: ng_sscop.h:98
u_char data[]
Definition: ng_sscop.h:103
uint32_t sig
Definition: ng_sscop.h:102
uint32_t sig
Definition: ng_sscop.h:106
uint32_t err
Definition: ng_sscop.h:107
uint32_t cnt
Definition: ng_sscop.h:108