1 /*- 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Author: Harti 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: stable/10/sys/netgraph/atm/ng_sscop.h 139823 2005-01-07 01:45:51Z imp $ 30 * 31 * Netgraph module for Q.2110 SSCOP 32 */ 33 #ifndef _NETGRAPH_ATM_NG_SSCOP_H_ 34 #define _NETGRAPH_ATM_NG_SSCOP_H_ 35 36 #define NG_SSCOP_NODE_TYPE "sscop" 37 #define NGM_SSCOP_COOKIE 980175044 38 39 /* Netgraph control messages */ 40 enum { 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 */ 48 }; 49 50 /* This must be in-sync with the definition in sscopdef.h */ 51 #define NG_SSCOP_PARAM_INFO \ 52 { \ 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 }, \ 65 { NULL } \ 66 } 67 68 69 struct ng_sscop_setparam { 70 uint32_t mask; 71 struct sscop_param param; 72 }; 73 #define NG_SSCOP_SETPARAM_INFO \ 74 { \ 75 { "mask", &ng_parse_uint32_type }, \ 76 { "param", &ng_sscop_param_type }, \ 77 { NULL } \ 78 } 79 80 struct ng_sscop_setparam_resp { 81 uint32_t mask; 82 int32_t error; 83 }; 84 #define NG_SSCOP_SETPARAM_RESP_INFO \ 85 { \ 86 { "mask", &ng_parse_uint32_type }, \ 87 { "error", &ng_parse_int32_type }, \ 88 { NULL } \ 89 } 90 91 /* 92 * Upper interface 93 */ 94 struct sscop_arg { 95 uint32_t sig; 96 uint32_t arg; /* opt. sequence number or clear-buff */ 97 u_char data[]; 98 }; 99 100 struct sscop_marg { 101 uint32_t sig; 102 u_char data[]; 103 }; 104 struct sscop_merr { 105 uint32_t sig; 106 uint32_t err; /* error code */ 107 uint32_t cnt; /* error count */ 108 }; 109 110 #endif 111