Linux X25 Stack » History » Version 1
laforge, 08/29/2023 06:55 PM
1 | 1 | laforge | h1. Linux X25 Stack |
---|---|---|---|
2 | |||
3 | The Linux kernel has had an (experimental?) X.25 implementation for ages. Surprisingly, this is still present even in 2023. |
||
4 | |||
5 | The kernel code appears to support |
||
6 | * X.25 over LAPB/Ethernet (DTE role; DCE requires kernel patch) |
||
7 | * X.25 over generic HDLC |
||
8 | ** this would work e.g. over DAHDI_NET devices, and hence over BRI/PRI cards supported by DAHDI |
||
9 | * X.25 over X.21 using a FarSite FarSync card |
||
10 | |||
11 | There also apparently was an async_x25 driver for running X.25 over asynchronous serial ports, but that appears to be gone from present-day Linux. |
||
12 | |||
13 | h2. x25-utils |
||
14 | |||
15 | The original code can be found at https://www.baty.hanse.de/linux-x25/ |
||
16 | |||
17 | The ancient userspace utility code has been imported into a git repo at https://gitea.osmocom.org/retronetworking/x25-utils |
||
18 | |||
19 | h2. X.25 over HDLC / DAHDI |
||
20 | |||
21 | @roox reported in April 2023 that he sucessfully tested AF_X25 socket connections between 2 Linux machines over the hdlcX interfaces you get with DAHDI/nethdlc (Linux generic HDLC layer) |
||
22 | |||
23 | * https://pmtu.de/.dump/af_x25_sockets_server.c |
||
24 | * https://pmtu.de/.dump/af_x25_sockets_client.c |
||
25 | * https://pmtu.de/.dump/x25-hacks.tar.gz (contains the above, plus also af_packet server/client) |
||
26 | |||
27 | h3. Example x25trace output |
||
28 | |||
29 | <pre> |
||
30 | # x25trace |
||
31 | --------------------------------------------------------------------- |
||
32 | Port: hdlc0 |
||
33 | X.25: LCI 001 : CALL ACCEPTED |
||
34 | Packet Size: 07 07 |
||
35 | Window Size: 2 2 |
||
36 | |||
37 | Port: hdlc0 |
||
38 | X.25: LCI 001 : CLEAR REQUEST - Cause DTE Originated - Diag 0 |
||
39 | |||
40 | Port: hdlc0 |
||
41 | X.25: LCI 001 : CLEAR CONFIRMATION |
||
42 | |||
43 | --------------------------------------------------------------------- |
||
44 | </pre> |