1 Generic HDLC layer for Linux kernel 2.4/2.5
2 Krzysztof Halasa <khc@pm.waw.pl>
6 Generic HDLC layer currently supports:
7 - Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP),
8 - raw HDLC (IPv4 only),
10 - PPP (uses syncppp.c),
11 - X.25 (uses X.25 routines).
13 There are hardware drivers for the following cards:
14 - C101 by Moxa Technologies Co., Ltd.
15 - RISCom/N2 by SDL Communications Inc.
16 - and others, some not in the official kernel.
18 Make sure the hdlc.o and the hardware driver are loaded. It should
19 create a number of "hdlc" (hdlc0 etc) network devices, one for each
20 WAN port. You'll need the "sethdlc" utility, get it from:
21 http://hq.pm.waw.pl/hdlc/
23 Compile sethdlc.c utility:
24 gcc -O2 -Wall -o sethdlc sethdlc.c
25 Make sure you're using a correct version of sethdlc for your kernel.
27 Use sethdlc to set physical interface, clock rate, HDLC mode used,
28 and add any required PVCs if using Frame Relay.
29 Usually you want something like:
31 sethdlc hdlc0 clock int rate 128000
32 sethdlc hdlc0 cisco interval 10 timeout 25
34 sethdlc hdlc0 rs232 clock ext
38 In Frame Relay mode, ifconfig master hdlc device up (without assigning
39 any IP address to it) before using pvc devices.
44 * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port
45 if the card has software-selectable interfaces
46 loopback - activate hardware loopback (for testing only)
47 * clock ext - external clock (uses DTE RX and TX clock)
48 * clock int - internal clock (provides clock signal on DCE clock output)
49 * clock txint - TX internal, RX external (provides TX clock on DCE output)
50 * clock txfromrx - TX clock derived from RX clock (TX clock on DCE output)
51 * rate - sets clock rate in bps (not required for external clock or
56 * hdlc - sets raw HDLC (IP-only) mode
57 nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
58 no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
59 crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
61 * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
62 interval - time in seconds between keepalive packets
63 timeout - time in seconds after last received keepalive packet before
64 we assume the link is down
66 * ppp - sets synchronous PPP mode
68 * x25 - sets X.25 mode
70 * fr - Frame Relay mode
71 lmi ansi / ccitt / none - LMI (link management) type
72 dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
73 It has nothing to do with clocks!
74 t391 - link integrity verification polling timer (in seconds) - user
75 t392 - polling verification timer (in seconds) - network
76 n391 - full status polling counter - user
77 n392 - error threshold - both user and network
78 n393 - monitored events count - both user and network
80 * create | delete n - FR only - adds / deletes PVC interface with DLCI #n.
88 n2.o and c101.o need parameters to work (note double quotes):
90 insmod n2 hw='"io,irq,ram,ports[:io,irq,...]"'
92 insmod n2 hw='"0x300,10,0xD0000,01"'
95 insmod c101 hw='"irq,ram[:irq,...]"
97 insmod c101 hw='"9,0xdc000"'
99 If built into the kernel, these drivers need kernel (command line) parameters:
100 n2=io,irq,ram,ports:...
106 If you have a problem with N2 or C101 card, you can issue the "private"
107 command to see port's packet descriptor rings:
109 sethdlc hdlc0 private
111 The hardware driver have to be build with CONFIG_HDLC_DEBUG_RINGS.
112 Attaching this info to bug reports would be helpful. Anyway, let me know
113 if you have problems using this.
115 For patches and other info look at http://hq.pm.waw.pl/hdlc/