Commit 16128ad8 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by David S. Miller

docs: networking: convert generic-hdlc.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- adjust identation, whitespaces and blank lines;
- add to networking/index.rst.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b0d74b5
.. SPDX-License-Identifier: GPL-2.0
==================
Generic HDLC layer Generic HDLC layer
==================
Krzysztof Halasa <khc@pm.waw.pl> Krzysztof Halasa <khc@pm.waw.pl>
Generic HDLC layer currently supports: Generic HDLC layer currently supports:
1. Frame Relay (ANSI, CCITT, Cisco and no LMI) 1. Frame Relay (ANSI, CCITT, Cisco and no LMI)
- Normal (routed) and Ethernet-bridged (Ethernet device emulation) - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
interfaces can share a single PVC. interfaces can share a single PVC.
- ARP support (no InARP support in the kernel - there is an - ARP support (no InARP support in the kernel - there is an
experimental InARP user-space daemon available on: experimental InARP user-space daemon available on:
http://www.kernel.org/pub/linux/utils/net/hdlc/). http://www.kernel.org/pub/linux/utils/net/hdlc/).
2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation 2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation
3. Cisco HDLC 3. Cisco HDLC
4. PPP 4. PPP
...@@ -24,19 +32,24 @@ with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). ...@@ -24,19 +32,24 @@ with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
Make sure the hdlc.o and the hardware driver are loaded. It should Make sure the hdlc.o and the hardware driver are loaded. It should
create a number of "hdlc" (hdlc0 etc) network devices, one for each create a number of "hdlc" (hdlc0 etc) network devices, one for each
WAN port. You'll need the "sethdlc" utility, get it from: WAN port. You'll need the "sethdlc" utility, get it from:
http://www.kernel.org/pub/linux/utils/net/hdlc/ http://www.kernel.org/pub/linux/utils/net/hdlc/
Compile sethdlc.c utility: Compile sethdlc.c utility::
gcc -O2 -Wall -o sethdlc sethdlc.c gcc -O2 -Wall -o sethdlc sethdlc.c
Make sure you're using a correct version of sethdlc for your kernel. Make sure you're using a correct version of sethdlc for your kernel.
Use sethdlc to set physical interface, clock rate, HDLC mode used, Use sethdlc to set physical interface, clock rate, HDLC mode used,
and add any required PVCs if using Frame Relay. and add any required PVCs if using Frame Relay.
Usually you want something like: Usually you want something like::
sethdlc hdlc0 clock int rate 128000 sethdlc hdlc0 clock int rate 128000
sethdlc hdlc0 cisco interval 10 timeout 25 sethdlc hdlc0 cisco interval 10 timeout 25
or
or::
sethdlc hdlc0 rs232 clock ext sethdlc hdlc0 rs232 clock ext
sethdlc hdlc0 fr lmi ansi sethdlc hdlc0 fr lmi ansi
sethdlc hdlc0 create 99 sethdlc hdlc0 create 99
...@@ -49,46 +62,63 @@ any IP address to it) before using pvc devices. ...@@ -49,46 +62,63 @@ any IP address to it) before using pvc devices.
Setting interface: Setting interface:
* v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port * v35 | rs232 | x21 | t1 | e1
if the card has software-selectable interfaces - sets physical interface for a given port
loopback - activate hardware loopback (for testing only) if the card has software-selectable interfaces
* clock ext - both RX clock and TX clock external loopback
* clock int - both RX clock and TX clock internal - activate hardware loopback (for testing only)
* clock txint - RX clock external, TX clock internal * clock ext
* clock txfromrx - RX clock external, TX clock derived from RX clock - both RX clock and TX clock external
* rate - sets clock rate in bps (for "int" or "txint" clock only) * clock int
- both RX clock and TX clock internal
* clock txint
- RX clock external, TX clock internal
* clock txfromrx
- RX clock external, TX clock derived from RX clock
* rate
- sets clock rate in bps (for "int" or "txint" clock only)
Setting protocol: Setting protocol:
* hdlc - sets raw HDLC (IP-only) mode * hdlc - sets raw HDLC (IP-only) mode
nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
* hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding * hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding
as above. as above.
* cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported) * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
interval - time in seconds between keepalive packets interval - time in seconds between keepalive packets
timeout - time in seconds after last received keepalive packet before timeout - time in seconds after last received keepalive packet before
we assume the link is down we assume the link is down
* ppp - sets synchronous PPP mode * ppp - sets synchronous PPP mode
* x25 - sets X.25 mode * x25 - sets X.25 mode
* fr - Frame Relay mode * fr - Frame Relay mode
lmi ansi / ccitt / cisco / none - LMI (link management) type lmi ansi / ccitt / cisco / none - LMI (link management) type
dce - Frame Relay DCE (network) side LMI instead of default DTE (user). dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
It has nothing to do with clocks! It has nothing to do with clocks!
t391 - link integrity verification polling timer (in seconds) - user
t392 - polling verification timer (in seconds) - network - t391 - link integrity verification polling timer (in seconds) - user
n391 - full status polling counter - user - t392 - polling verification timer (in seconds) - network
n392 - error threshold - both user and network - n391 - full status polling counter - user
n393 - monitored events count - both user and network - n392 - error threshold - both user and network
- n393 - monitored events count - both user and network
Frame-Relay only: Frame-Relay only:
* create n | delete n - adds / deletes PVC interface with DLCI #n. * create n | delete n - adds / deletes PVC interface with DLCI #n.
Newly created interface will be named pvc0, pvc1 etc. Newly created interface will be named pvc0, pvc1 etc.
...@@ -101,26 +131,34 @@ Frame-Relay only: ...@@ -101,26 +131,34 @@ Frame-Relay only:
Board-specific issues Board-specific issues
--------------------- ---------------------
n2.o and c101.o need parameters to work: n2.o and c101.o need parameters to work::
insmod n2 hw=io,irq,ram,ports[:io,irq,...] insmod n2 hw=io,irq,ram,ports[:io,irq,...]
example:
example::
insmod n2 hw=0x300,10,0xD0000,01 insmod n2 hw=0x300,10,0xD0000,01
or or::
insmod c101 hw=irq,ram[:irq,...] insmod c101 hw=irq,ram[:irq,...]
example:
example::
insmod c101 hw=9,0xdc000 insmod c101 hw=9,0xdc000
If built into the kernel, these drivers need kernel (command line) parameters: If built into the kernel, these drivers need kernel (command line) parameters::
n2.hw=io,irq,ram,ports:... n2.hw=io,irq,ram,ports:...
or
or::
c101.hw=irq,ram:... c101.hw=irq,ram:...
If you have a problem with N2, C101 or PLX200SYN card, you can issue the If you have a problem with N2, C101 or PLX200SYN card, you can issue the
"private" command to see port's packet descriptor rings (in kernel logs): "private" command to see port's packet descriptor rings (in kernel logs)::
sethdlc hdlc0 private sethdlc hdlc0 private
......
...@@ -59,6 +59,7 @@ Contents: ...@@ -59,6 +59,7 @@ Contents:
filter filter
fore200e fore200e
framerelay framerelay
generic-hdlc
.. only:: subproject and html .. only:: subproject and html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment