1*d7780723SDavid Howells #ifndef __HDLC_IOCTL_H__ 2*d7780723SDavid Howells #define __HDLC_IOCTL_H__ 3*d7780723SDavid Howells 4*d7780723SDavid Howells 5*d7780723SDavid Howells #define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */ 6*d7780723SDavid Howells 7*d7780723SDavid Howells #define CLOCK_DEFAULT 0 /* Default setting */ 8*d7780723SDavid Howells #define CLOCK_EXT 1 /* External TX and RX clock - DTE */ 9*d7780723SDavid Howells #define CLOCK_INT 2 /* Internal TX and RX clock - DCE */ 10*d7780723SDavid Howells #define CLOCK_TXINT 3 /* Internal TX and external RX clock */ 11*d7780723SDavid Howells #define CLOCK_TXFROMRX 4 /* TX clock derived from external RX clock */ 12*d7780723SDavid Howells 13*d7780723SDavid Howells 14*d7780723SDavid Howells #define ENCODING_DEFAULT 0 /* Default setting */ 15*d7780723SDavid Howells #define ENCODING_NRZ 1 16*d7780723SDavid Howells #define ENCODING_NRZI 2 17*d7780723SDavid Howells #define ENCODING_FM_MARK 3 18*d7780723SDavid Howells #define ENCODING_FM_SPACE 4 19*d7780723SDavid Howells #define ENCODING_MANCHESTER 5 20*d7780723SDavid Howells 21*d7780723SDavid Howells 22*d7780723SDavid Howells #define PARITY_DEFAULT 0 /* Default setting */ 23*d7780723SDavid Howells #define PARITY_NONE 1 /* No parity */ 24*d7780723SDavid Howells #define PARITY_CRC16_PR0 2 /* CRC16, initial value 0x0000 */ 25*d7780723SDavid Howells #define PARITY_CRC16_PR1 3 /* CRC16, initial value 0xFFFF */ 26*d7780723SDavid Howells #define PARITY_CRC16_PR0_CCITT 4 /* CRC16, initial 0x0000, ITU-T version */ 27*d7780723SDavid Howells #define PARITY_CRC16_PR1_CCITT 5 /* CRC16, initial 0xFFFF, ITU-T version */ 28*d7780723SDavid Howells #define PARITY_CRC32_PR0_CCITT 6 /* CRC32, initial value 0x00000000 */ 29*d7780723SDavid Howells #define PARITY_CRC32_PR1_CCITT 7 /* CRC32, initial value 0xFFFFFFFF */ 30*d7780723SDavid Howells 31*d7780723SDavid Howells #define LMI_DEFAULT 0 /* Default setting */ 32*d7780723SDavid Howells #define LMI_NONE 1 /* No LMI, all PVCs are static */ 33*d7780723SDavid Howells #define LMI_ANSI 2 /* ANSI Annex D */ 34*d7780723SDavid Howells #define LMI_CCITT 3 /* ITU-T Annex A */ 35*d7780723SDavid Howells #define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */ 36*d7780723SDavid Howells 37*d7780723SDavid Howells typedef struct { 38*d7780723SDavid Howells unsigned int clock_rate; /* bits per second */ 39*d7780723SDavid Howells unsigned int clock_type; /* internal, external, TX-internal etc. */ 40*d7780723SDavid Howells unsigned short loopback; 41*d7780723SDavid Howells } sync_serial_settings; /* V.35, V.24, X.21 */ 42*d7780723SDavid Howells 43*d7780723SDavid Howells typedef struct { 44*d7780723SDavid Howells unsigned int clock_rate; /* bits per second */ 45*d7780723SDavid Howells unsigned int clock_type; /* internal, external, TX-internal etc. */ 46*d7780723SDavid Howells unsigned short loopback; 47*d7780723SDavid Howells unsigned int slot_map; 48*d7780723SDavid Howells } te1_settings; /* T1, E1 */ 49*d7780723SDavid Howells 50*d7780723SDavid Howells typedef struct { 51*d7780723SDavid Howells unsigned short encoding; 52*d7780723SDavid Howells unsigned short parity; 53*d7780723SDavid Howells } raw_hdlc_proto; 54*d7780723SDavid Howells 55*d7780723SDavid Howells typedef struct { 56*d7780723SDavid Howells unsigned int t391; 57*d7780723SDavid Howells unsigned int t392; 58*d7780723SDavid Howells unsigned int n391; 59*d7780723SDavid Howells unsigned int n392; 60*d7780723SDavid Howells unsigned int n393; 61*d7780723SDavid Howells unsigned short lmi; 62*d7780723SDavid Howells unsigned short dce; /* 1 for DCE (network side) operation */ 63*d7780723SDavid Howells } fr_proto; 64*d7780723SDavid Howells 65*d7780723SDavid Howells typedef struct { 66*d7780723SDavid Howells unsigned int dlci; 67*d7780723SDavid Howells } fr_proto_pvc; /* for creating/deleting FR PVCs */ 68*d7780723SDavid Howells 69*d7780723SDavid Howells typedef struct { 70*d7780723SDavid Howells unsigned int dlci; 71*d7780723SDavid Howells char master[IFNAMSIZ]; /* Name of master FRAD device */ 72*d7780723SDavid Howells }fr_proto_pvc_info; /* for returning PVC information only */ 73*d7780723SDavid Howells 74*d7780723SDavid Howells typedef struct { 75*d7780723SDavid Howells unsigned int interval; 76*d7780723SDavid Howells unsigned int timeout; 77*d7780723SDavid Howells } cisco_proto; 78*d7780723SDavid Howells 79*d7780723SDavid Howells /* PPP doesn't need any info now - supply length = 0 to ioctl */ 80*d7780723SDavid Howells 81*d7780723SDavid Howells #endif /* __HDLC_IOCTL_H__ */ 82