Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cycx_x25.h
Go to the documentation of this file.
1 #ifndef _CYCX_X25_H
2 #define _CYCX_X25_H
3 /*
4 * cycx_x25.h Cyclom X.25 firmware API definitions.
5 *
6 * Author: Arnaldo Carvalho de Melo <[email protected]>
7 *
8 * Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
9 *
10 * Based on sdla_x25.h by Gene Kozin <[email protected]>
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
16 * ============================================================================
17 * 2000/04/02 acme dprintk and cycx_debug
18 * 1999/01/03 acme judicious use of data types
19 * 1999/01/02 acme #define X25_ACK_N3 0x4411
20 * 1998/12/28 acme cleanup: lot'o'things removed
21 * commands listed,
22 * TX25Cmd & TX25Config structs
23 * typedef'ed
24 */
25 #ifndef PACKED
26 #define PACKED __attribute__((packed))
27 #endif
28 
29 /* X.25 shared memory layout. */
30 #define X25_MBOX_OFFS 0x300 /* general mailbox block */
31 #define X25_RXMBOX_OFFS 0x340 /* receive mailbox */
32 
33 /* Debug */
34 #define dprintk(level, format, a...) if (cycx_debug >= level) printk(format, ##a)
35 
36 extern unsigned int cycx_debug;
37 
38 /* Data Structures */
39 /* X.25 Command Block. */
40 struct cycx_x25_cmd {
42  u16 link; /* values: 0 or 1 */
43  u16 len; /* values: 0 thru 0x205 (517) */
45 } PACKED;
46 
47 /* Defines for the 'command' field. */
48 #define X25_CONNECT_REQUEST 0x4401
49 #define X25_CONNECT_RESPONSE 0x4402
50 #define X25_DISCONNECT_REQUEST 0x4403
51 #define X25_DISCONNECT_RESPONSE 0x4404
52 #define X25_DATA_REQUEST 0x4405
53 #define X25_ACK_TO_VC 0x4406
54 #define X25_INTERRUPT_RESPONSE 0x4407
55 #define X25_CONFIG 0x4408
56 #define X25_CONNECT_INDICATION 0x4409
57 #define X25_CONNECT_CONFIRM 0x440A
58 #define X25_DISCONNECT_INDICATION 0x440B
59 #define X25_DISCONNECT_CONFIRM 0x440C
60 #define X25_DATA_INDICATION 0x440E
61 #define X25_INTERRUPT_INDICATION 0x440F
62 #define X25_ACK_FROM_VC 0x4410
63 #define X25_ACK_N3 0x4411
64 #define X25_CONNECT_COLLISION 0x4413
65 #define X25_N3WIN 0x4414
66 #define X25_LINE_ON 0x4415
67 #define X25_LINE_OFF 0x4416
68 #define X25_RESET_REQUEST 0x4417
69 #define X25_LOG 0x4500
70 #define X25_STATISTIC 0x4600
71 #define X25_TRACE 0x4700
72 #define X25_N2TRACEXC 0x4702
73 #define X25_N3TRACEXC 0x4703
74 
98  u8 n2;
111 } PACKED;
112 
124 } PACKED;
125 #endif /* _CYCX_X25_H */