Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / netproto / atm / uni / sscf_uni_var.h
1 /*
2  *
3  * ===================================
4  * HARP  |  Host ATM Research Platform
5  * ===================================
6  *
7  *
8  * This Host ATM Research Platform ("HARP") file (the "Software") is
9  * made available by Network Computing Services, Inc. ("NetworkCS")
10  * "AS IS".  NetworkCS does not provide maintenance, improvements or
11  * support of any kind.
12  *
13  * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14  * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15  * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16  * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17  * In no event shall NetworkCS be responsible for any damages, including
18  * but not limited to consequential damages, arising from or relating to
19  * any use of the Software or related support.
20  *
21  * Copyright 1994-1998 Network Computing Services, Inc.
22  *
23  * Copies of this Software may be made, however, the above copyright
24  * notice must be reproduced on all copies.
25  *
26  *      @(#) $FreeBSD: src/sys/netatm/uni/sscf_uni_var.h,v 1.2 1999/08/28 00:48:58 peter Exp $
27  *
28  */
29
30 /*
31  * ATM Forum UNI Support
32  * ---------------------
33  *
34  * SSCF UNI protocol control blocks
35  *
36  */
37
38 #ifndef _UNI_SSCF_UNI_VAR_H
39 #define _UNI_SSCF_UNI_VAR_H
40
41 /*
42  * Structure containing information for each SSCF UNI connection.
43  */
44 struct univcc {
45         u_char          uv_ustate;      /* SSCF-User state (see below) */
46         u_char          uv_lstate;      /* SSCF-SSCOP state (see below) */
47         u_short         uv_flags;       /* Connection flags (see below) */
48         enum uni_vers   uv_vers;        /* UNI version */
49
50         /* Stack variables */
51         Atm_connvc      *uv_connvc;     /* Connection vcc for this stack */
52         void            *uv_toku;       /* Stack upper layer's token */
53         void            *uv_tokl;       /* Stack lower layer's token */
54         void            (*uv_upper)     /* Stack upper layer's interface */
55                                 __P((int, void *, int, int));
56         void            (*uv_lower)     /* Stack lower layer's interface */
57                                 __P((int, void *, int, int));
58 };
59
60 /*
61  * SSCF to SAAL User (Q.2931) Interface States
62  */
63 #define UVU_INST        0               /* Instantiated, waiting for INIT */
64 #define UVU_RELEASED    1               /* Connection released */
65 #define UVU_PACTIVE     2               /* Awaiting connection establishment */
66 #define UVU_PRELEASE    3               /* Awaiting connection release */
67 #define UVU_ACTIVE      4               /* Connection established */
68 #define UVU_TERM        5               /* Waiting for TERM */
69
70 /*
71  * SSCF to SSCOP Interface States
72  */
73 #define UVL_INST        0               /* Instantiated, waiting for INIT */
74 #define UVL_IDLE        1               /* Idle */
75 #define UVL_OUTCONN     2               /* Outgoing connection pending */
76 #define UVL_INCONN      3               /* Incoming connection pending */
77 #define UVL_OUTDISC     4               /* Outgoing disconnection pending */
78 #define UVL_OUTRESYN    5               /* Outgoing resynchronization pending */
79 #define UVL_INRESYN     6               /* Incoming resynchornization pending */
80 #define UVL_RECOVERY    8               /* Recovery pending */
81 #define UVL_READY       10              /* Data transfer ready */
82 #define UVL_TERM        11              /* Waiting for TERM */
83
84 /*
85  * Connection Flags
86  */
87 #define UVF_NOESTIND    0x0001          /* Don't process ESTABLISH_IND */
88
89
90 #ifdef ATM_KERNEL
91 /*
92  * Global function declarations
93  */
94         /* sscf_uni.c */
95 int             sscf_uni_start __P((void));
96 int             sscf_uni_stop __P((void));
97 void            sscf_uni_abort __P((struct univcc *, char *));
98 void            sscf_uni_pdu_print __P((struct univcc *, KBuffer *,
99                         char *));
100
101         /* sscf_uni_lower.c */
102 void            sscf_uni_lower __P((int, void *, int, int));
103
104         /* sscf_uni_upper.c */
105 void            sscf_uni_upper __P((int, void *, int, int));
106
107
108 /*
109  * External variables
110  */
111 extern int              sscf_uni_vccnt;
112
113 #endif  /* ATM_KERNEL */
114
115 #endif  /* _UNI_SSCF_UNI_VAR_H */