[PATCH] g_file_storage: fix obscure race condition
[linux/fpc-iii.git] / drivers / isdn / hisax / l3ni1.h
blob4066da2fe5a221c6348a35c056eb8efa326335b7
1 /* $Id: l3ni1.h,v 2.3.6.2 2001/09/23 22:24:50 kai Exp $
3 * NI1 D-channel protocol
5 * Author Matt Henderson & Guy Ellis
6 * Copyright by Traverse Technologies Pty Ltd, www.travers.com.au
7 *
8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
11 * 2000.6.6 Initial implementation of routines for US NI1
12 * Layer 3 protocol based on the EURO/DSS1 D-channel protocol
13 * driver written by Karsten Keil et al. Thanks also for the
14 * code provided by Ragnar Paulson.
18 #ifndef l3ni1_process
20 #define T302 15000
21 #define T303 4000
22 #define T304 30000
23 #define T305 30000
24 #define T308 4000
25 /* for layer 1 certification T309 < layer1 T3 (e.g. 4000) */
26 /* This makes some tests easier and quicker */
27 #define T309 40000
28 #define T310 30000
29 #define T313 4000
30 #define T318 4000
31 #define T319 4000
32 #define TSPID 5000 /* was 2000 - Guy Ellis */
35 * Message-Types
38 #define MT_ALERTING 0x01
39 #define MT_CALL_PROCEEDING 0x02
40 #define MT_CONNECT 0x07
41 #define MT_CONNECT_ACKNOWLEDGE 0x0f
42 #define MT_PROGRESS 0x03
43 #define MT_SETUP 0x05
44 #define MT_SETUP_ACKNOWLEDGE 0x0d
45 #define MT_RESUME 0x26
46 #define MT_RESUME_ACKNOWLEDGE 0x2e
47 #define MT_RESUME_REJECT 0x22
48 #define MT_SUSPEND 0x25
49 #define MT_SUSPEND_ACKNOWLEDGE 0x2d
50 #define MT_SUSPEND_REJECT 0x21
51 #define MT_USER_INFORMATION 0x20
52 #define MT_DISCONNECT 0x45
53 #define MT_RELEASE 0x4d
54 #define MT_RELEASE_COMPLETE 0x5a
55 #define MT_RESTART 0x46
56 #define MT_RESTART_ACKNOWLEDGE 0x4e
57 #define MT_SEGMENT 0x60
58 #define MT_CONGESTION_CONTROL 0x79
59 #define MT_INFORMATION 0x7b
60 #define MT_FACILITY 0x62
61 #define MT_NOTIFY 0x6e
62 #define MT_STATUS 0x7d
63 #define MT_STATUS_ENQUIRY 0x75
64 #define MT_DL_ESTABLISHED 0xfe
66 #define IE_SEGMENT 0x00
67 #define IE_BEARER 0x04
68 #define IE_CAUSE 0x08
69 #define IE_CALL_ID 0x10
70 #define IE_CALL_STATE 0x14
71 #define IE_CHANNEL_ID 0x18
72 #define IE_FACILITY 0x1c
73 #define IE_PROGRESS 0x1e
74 #define IE_NET_FAC 0x20
75 #define IE_NOTIFY 0x27
76 #define IE_DISPLAY 0x28
77 #define IE_DATE 0x29
78 #define IE_KEYPAD 0x2c
79 #define IE_SIGNAL 0x34
80 #define IE_SPID 0x3a
81 #define IE_ENDPOINT_ID 0x3b
82 #define IE_INFORATE 0x40
83 #define IE_E2E_TDELAY 0x42
84 #define IE_TDELAY_SEL 0x43
85 #define IE_PACK_BINPARA 0x44
86 #define IE_PACK_WINSIZE 0x45
87 #define IE_PACK_SIZE 0x46
88 #define IE_CUG 0x47
89 #define IE_REV_CHARGE 0x4a
90 #define IE_CONNECT_PN 0x4c
91 #define IE_CONNECT_SUB 0x4d
92 #define IE_CALLING_PN 0x6c
93 #define IE_CALLING_SUB 0x6d
94 #define IE_CALLED_PN 0x70
95 #define IE_CALLED_SUB 0x71
96 #define IE_REDIR_NR 0x74
97 #define IE_TRANS_SEL 0x78
98 #define IE_RESTART_IND 0x79
99 #define IE_LLC 0x7c
100 #define IE_HLC 0x7d
101 #define IE_USER_USER 0x7e
102 #define IE_ESCAPE 0x7f
103 #define IE_SHIFT 0x90
104 #define IE_MORE_DATA 0xa0
105 #define IE_COMPLETE 0xa1
106 #define IE_CONGESTION 0xb0
107 #define IE_REPEAT 0xd0
109 #define IE_MANDATORY 0x0100
110 /* mandatory not in every case */
111 #define IE_MANDATORY_1 0x0200
113 #define ERR_IE_COMPREHENSION 1
114 #define ERR_IE_UNRECOGNIZED -1
115 #define ERR_IE_LENGTH -2
116 #define ERR_IE_SEQUENCE -3
118 #else /* only l3ni1_process */
120 /* l3ni1 specific data in l3 process */
121 typedef struct
122 { unsigned char invoke_id; /* used invoke id in remote ops, 0 = not active */
123 ulong ll_id; /* remebered ll id */
124 u8 remote_operation; /* handled remote operation, 0 = not active */
125 int proc; /* rememered procedure */
126 ulong remote_result; /* result of remote operation for statcallb */
127 char uus1_data[35]; /* data send during alerting or disconnect */
128 } ni1_proc_priv;
130 /* l3dni1 specific data in protocol stack */
131 typedef struct
132 { unsigned char last_invoke_id; /* last used value for invoking */
133 unsigned char invoke_used[32]; /* 256 bits for 256 values */
134 } ni1_stk_priv;
136 #endif /* only l3dni1_process */