1
2#ifndef __HDLC_IOCTL_H__
3#define __HDLC_IOCTL_H__
4
5
6#define GENERIC_HDLC_VERSION 4
7
8#define CLOCK_DEFAULT 0
9#define CLOCK_EXT 1
10#define CLOCK_INT 2
11#define CLOCK_TXINT 3
12#define CLOCK_TXFROMRX 4
13
14
15#define ENCODING_DEFAULT 0
16#define ENCODING_NRZ 1
17#define ENCODING_NRZI 2
18#define ENCODING_FM_MARK 3
19#define ENCODING_FM_SPACE 4
20#define ENCODING_MANCHESTER 5
21
22
23#define PARITY_DEFAULT 0
24#define PARITY_NONE 1
25#define PARITY_CRC16_PR0 2
26#define PARITY_CRC16_PR1 3
27#define PARITY_CRC16_PR0_CCITT 4
28#define PARITY_CRC16_PR1_CCITT 5
29#define PARITY_CRC32_PR0_CCITT 6
30#define PARITY_CRC32_PR1_CCITT 7
31
32#define LMI_DEFAULT 0
33#define LMI_NONE 1
34#define LMI_ANSI 2
35#define LMI_CCITT 3
36#define LMI_CISCO 4
37
38#ifndef __ASSEMBLY__
39
40typedef struct {
41 unsigned int clock_rate;
42 unsigned int clock_type;
43 unsigned short loopback;
44} sync_serial_settings;
45
46typedef struct {
47 unsigned int clock_rate;
48 unsigned int clock_type;
49 unsigned short loopback;
50 unsigned int slot_map;
51} te1_settings;
52
53typedef struct {
54 unsigned short encoding;
55 unsigned short parity;
56} raw_hdlc_proto;
57
58typedef struct {
59 unsigned int t391;
60 unsigned int t392;
61 unsigned int n391;
62 unsigned int n392;
63 unsigned int n393;
64 unsigned short lmi;
65 unsigned short dce;
66} fr_proto;
67
68typedef struct {
69 unsigned int dlci;
70} fr_proto_pvc;
71
72typedef struct {
73 unsigned int dlci;
74 char master[IFNAMSIZ];
75}fr_proto_pvc_info;
76
77typedef struct {
78 unsigned int interval;
79 unsigned int timeout;
80} cisco_proto;
81
82typedef struct {
83 unsigned short dce;
84 unsigned int modulo;
85 unsigned int window;
86 unsigned int t1;
87 unsigned int t2;
88 unsigned int n2;
89} x25_hdlc_proto;
90
91
92
93#endif
94#endif
95