2 * Copyright (c) 1996-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * Author: Hartmut Brandt <harti@freebsd.org>
29 * $Begemot: libunimsg/netnatm/saal/sscfu.h,v 1.4 2004/07/08 08:22:15 brandt Exp $
31 * Public include file for UNI SSCF
33 #ifndef _NETNATM_SAAL_SSCFU_H_
34 #define _NETNATM_SAAL_SSCFU_H_
36 #include <sys/types.h>
37 #include <netnatm/saal/sscopdef.h>
38 #include <netnatm/saal/sscfudef.h>
41 * Define how a buffer looks like.
45 #define SSCFU_MBUF_T mbuf
48 #define SSCFU_MBUF_T uni_msg
54 /* functions to be supplied by the SSCOP user */
56 /* upper (SAAL) interface output */
57 void (*send_upper)(struct sscfu *, void *, enum saal_sig,
58 struct SSCFU_MBUF_T *);
60 /* lower (SSCOP) interface output */
61 void (*send_lower)(struct sscfu *, void *, enum sscop_aasig,
62 struct SSCFU_MBUF_T *, u_int);
64 /* function to move the SSCOP window */
65 void (*window)(struct sscfu *, void *, u_int);
67 /* debugging function */
68 void (*verbose)(struct sscfu *, void *, const char *, ...)
72 /* Function defined by the SSCF-UNI code */
74 /* allocate and initialize a new SSCF instance */
75 struct sscfu *sscfu_create(void *, const struct sscfu_funcs *);
77 /* destroy an SSCF instance and free all resources */
78 void sscfu_destroy(struct sscfu *);
80 /* reset the SSCF to the released state */
81 void sscfu_reset(struct sscfu *);
83 /* lower input interface (SSCOP signals) */
84 void sscfu_input(struct sscfu *, enum sscop_aasig, struct SSCFU_MBUF_T *, u_int);
86 /* upper input interface (SAAL) */
87 int sscfu_saalsig(struct sscfu *, enum saal_sig, struct SSCFU_MBUF_T *);
89 /* retrieve the current state */
90 enum sscfu_state sscfu_getstate(const struct sscfu *);
92 /* char'ify signals and states */
93 const char *sscfu_signame(enum saal_sig);
94 const char *sscfu_statename(enum sscfu_state);
96 /* retrieve the default set of parameters for SSCOP */
97 u_int sscfu_getdefparam(struct sscop_param *);
99 /* get/set debugging flags */
100 void sscfu_setdebug(struct sscfu *, u_int);
101 u_int sscfu_getdebug(const struct sscfu *);