e79f7c266c865db4444b679c67bc152747a7880f
[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  *      @(#) $DragonFly: src/sys/netproto/atm/uni/sscf_uni_var.h,v 1.2 2003/06/17 04:28:49 dillon Exp $
28  *
29  */
30
31 /*
32  * ATM Forum UNI Support
33  * ---------------------
34  *
35  * SSCF UNI protocol control blocks
36  *
37  */
38
39 #ifndef _UNI_SSCF_UNI_VAR_H
40 #define _UNI_SSCF_UNI_VAR_H
41
42 /*
43  * Structure containing information for each SSCF UNI connection.
44  */
45 struct univcc {
46         u_char          uv_ustate;      /* SSCF-User state (see below) */
47         u_char          uv_lstate;      /* SSCF-SSCOP state (see below) */
48         u_short         uv_flags;       /* Connection flags (see below) */
49         enum uni_vers   uv_vers;        /* UNI version */
50
51         /* Stack variables */
52         Atm_connvc      *uv_connvc;     /* Connection vcc for this stack */
53         void            *uv_toku;       /* Stack upper layer's token */
54         void            *uv_tokl;       /* Stack lower layer's token */
55         void            (*uv_upper)     /* Stack upper layer's interface */
56                                 __P((int, void *, int, int));
57         void            (*uv_lower)     /* Stack lower layer's interface */
58                                 __P((int, void *, int, int));
59 };
60
61 /*
62  * SSCF to SAAL User (Q.2931) Interface States
63  */
64 #define UVU_INST        0               /* Instantiated, waiting for INIT */
65 #define UVU_RELEASED    1               /* Connection released */
66 #define UVU_PACTIVE     2               /* Awaiting connection establishment */
67 #define UVU_PRELEASE    3               /* Awaiting connection release */
68 #define UVU_ACTIVE      4               /* Connection established */
69 #define UVU_TERM        5               /* Waiting for TERM */
70
71 /*
72  * SSCF to SSCOP Interface States
73  */
74 #define UVL_INST        0               /* Instantiated, waiting for INIT */
75 #define UVL_IDLE        1               /* Idle */
76 #define UVL_OUTCONN     2               /* Outgoing connection pending */
77 #define UVL_INCONN      3               /* Incoming connection pending */
78 #define UVL_OUTDISC     4               /* Outgoing disconnection pending */
79 #define UVL_OUTRESYN    5               /* Outgoing resynchronization pending */
80 #define UVL_INRESYN     6               /* Incoming resynchornization pending */
81 #define UVL_RECOVERY    8               /* Recovery pending */
82 #define UVL_READY       10              /* Data transfer ready */
83 #define UVL_TERM        11              /* Waiting for TERM */
84
85 /*
86  * Connection Flags
87  */
88 #define UVF_NOESTIND    0x0001          /* Don't process ESTABLISH_IND */
89
90
91 #ifdef ATM_KERNEL
92 /*
93  * Global function declarations
94  */
95         /* sscf_uni.c */
96 int             sscf_uni_start __P((void));
97 int             sscf_uni_stop __P((void));
98 void            sscf_uni_abort __P((struct univcc *, char *));
99 void            sscf_uni_pdu_print __P((struct univcc *, KBuffer *,
100                         char *));
101
102         /* sscf_uni_lower.c */
103 void            sscf_uni_lower __P((int, void *, int, int));
104
105         /* sscf_uni_upper.c */
106 void            sscf_uni_upper __P((int, void *, int, int));
107
108
109 /*
110  * External variables
111  */
112 extern int              sscf_uni_vccnt;
113
114 #endif  /* ATM_KERNEL */
115
116 #endif  /* _UNI_SSCF_UNI_VAR_H */