Having played with AX.25 20 years ago (Amateur Radio kludged version...) what are the differences?
And HDLC - Hmmm memories of T.30 fax, and Class 1 Modems!
Computer Networks / Andrew S. Tanenbaum gives a summary of X.25.
http://webdocs.numaq.ibm.com/docs/x25oaa01/ch_2.htm covers X.25 User Facilities
Host is called DTE (Data Terminal Equipment) (VDU or PC).
Carrier's equipment which interacts with the DTE is called DCE (Data Circuit-terminating Equipment). X.25 defines the DTE/DCE interface.
Data indicate. (Connection oriented, guarantees delivery)
Clear Confirm. (Note the 4-way clearing as well)
There used to be an explicit gizmo called the PAD (Packet Assembly and Disassembly) which waited for 128 bytes from the terminal before it sent off a packet, and likewise, broke the packet up at the receiver side to give the illusion of a stream.
Nowadays, the PAD's functionality is performed at the DTE.
Note, that the actual DTE/DCE interface is usually a modem.
A cause code indicates an event that triggered an X.25 packet. The cause code can only appear in entries for CLEAR REQUEST, REGISTRATION CONFIRMATION, RESET REQUEST, and RESTART packets. Possible values for the cause code can vary, depending on the type of packet.
00 xx, DTE Clearing
01 xx, Number busy
03 xx, Invalid call (invalid facility request)
05 xx, Network congestion
09 xx, Out of order
0B xx, Access barred
0D xx, Not obtainable
11 xx, Remote procedure error
13 xx, Local procedure error
15 xx, RPOA out of order (Recognized Private Operating Authority)
19 xx, Reverse charging not subscribed to
21 xx, DTE incompatible call
29 xx, Fast select not subscribed to
39 xx, Ship absent
00 xx, DTE originated
01 xx, Out of order
03 xx, Remote procedure error
05 xx, Local procedure error
07 xx, Network congestion
09 xx, Remote DTE operational
0F xx, Network operational
11 xx, Incompatible destination
1D xx, Network out of order
00 xx, DTE restarting
01 xx, Local procedure error
03 xx, Network congestion
07 xx, Network operational
7F xx, Registration/cancellation confirmed
The X.25 diagnostic code provides an additional hint as to what went wrong. This code can only appear in entries for CLEAR REQUEST, DIAGNOSTIC, RESET REQUEST, and RESTART packets. Unlike the cause codes, the diag codes do not vary depending upon the type of packet.
Note These codes can be produced by any equipment handling a given virtual circuit. Thus, receipt of a diagnostic code may not indicate a problem with your DCE.
xx 00,No additional information
xx 01,Invalid P(S) (Packet Send sequence number)
xx 02,Invalid P(R) (Packet Receive sequence number)
xx 10,Packet type invalid
xx 11,Packet type invalid for state R1 (Packet level ready)
xx 12,Packet type invalid for state R2 (DTE restart request)
xx 13,Packet type invalid for state R3 (DCE restart indication)
xx 14,Packet type invalid for state P1 (Ready)
xx 15,Packet type invalid for state P2 (DTE Waiting)
xx 16,Packet type invalid for state P3 (DCE Waiting)
xx 17,Packet type invalid for state P4 (Data Transfer)
xx 18,Packet type invalid for state P5 (Call Collision)
xx 19,Packet type invalid for state P6 (DTE clear request)
xx 1A,Packet type invalid for state P7 (DCE clear indication)
xx 1B,Packet type invalid for state D1 (Flow control ready)
xx 1C,Packet type invalid for state D2 (DTE reset ready)
xx 1D,Packet type invalid for state D3 (DCE reset indication)
xx 20,Packet not allowed
xx 21,Unidentifiable Packet
xx 22,Call on one way logical channel
xx 23,Invalid packet type on a permanent virtual circuit
xx 24,Packet on unassigned LCN (Logical Channel Number)
xx 25,Reject not subscribed to
xx 26,Packet too short
xx 27,Packet too long
xx 28,Invalid GFI (General Format Indicator)
xx 29,Restart with non-zero in bits 1-4 of octet 1, or bits 1-8 of octet 2 (Non zero LCI)
xx 2A,Packet type not compatible with facility
xx 2B,Unauthorised interrupt confirmation
xx 2C,Unauthorised interrupt
xx 2D,Unauthorised reject
xx 30,Timer Expired
xx 31,Timer expired for incoming call
xx 32,Timer expired for clear indication
xx 33,Timer expired for reset indication
xx 34,Timer expired for restart indication
xx 40,Call set up, clearing or registration problem
xx 41,Facility code not allowed
xx 42,Facility parameter not allowed
xx 43,Invalid called address
xx 44,Invalid calling address
xx 45,Invalid facility length
xx 46,Incoming call barred
xx 47,No logical channel available
xx 48,Call collision
xx 49,Duplicate facility requested
xx 4A,Non zero address length
xx 4B,Non zero facility length
xx 4C,Facility not provided when expected
xx 4D,Invalid ITU-T specified DTE facility
xx 4E,Maximum number of call redirections or deflections exceeded
xx 51,Improper cause code for DTE
xx 52,Octet not aligned
xx 53,Inconsistent Q bit setting
xx 54,NUI (Network User Identification) problem
xx 70,International problem
xx 71,Remote network problem
xx 72,International protocol problem
xx 73,International link out of order
xx 74,International link busy
xx 75,Transit network facility problem
xx 76,Remote network facility problem
xx 77,International routing problem
xx 78,Temporary routing problem
xx 79,Unknown called DNIC (Data Network Identification Code)
xx 7A,Maintenance action (clear x25 vc command issued)
X.25 CLEAR DIAGNOSTIC CODES
D1 Flow control ready. (The normal ready state.)
D2 Data terminal equipment (DTE) reset request.
D3 Data circuit-terminating equipment (DCE) reset indication.
P2 DTE waiting for DCE to connect call.
P3 DCE waiting for DTE to accept call.
P4 Data transfer.
P5 Call collision.
P6 DTE clear request.
P7 DCE clear indication.
R1 Packet level ready.
R2 DTE restart request.
R3 DCE restart indication.
X1 Non-standard state for a virtual circuit in hold-down.
IBM have a PTX X.25 library. Here's the documentation for it: