In the ISO layered protocol model, a network layer allows for multiple virtual connections to be made on a single physical line. Virtual connections come in two kinds: Permanent Virtual Circuits (PVCs) and Switched Virtual Calls (SVCs). A PVC is set up at configuration time and is agreed upon by both ends. You know before hand who is on the other end of a PVC. SVCs, on the other hand, are set up as needed like a telephone call. Anyone could call you.
Function | Mapping |
---|---|
Connect Request | Sends a Restart Request. When this is confirmed, the major service enters data transfer xon state. |
ConnectAccept | Not used. |
ConnectReject | Not used. |
Listen | Awaits receipt of a Restart Indication. |
DisconnectRequest | Sends a restart request. When this is confirmed, the major service enters open state. |
DisconnectConfirm | Not used. |
Write | Not used. |
WriteSpecial | Not used. |
Xoff | Not used. |
Xon | Not used. |
ResetRequest | Sends a restart request. When this is confirmed, the major service enters data transfer xon state. |
Reopen | Reopen is not currently supported for the major device. |
Function | Mapping |
---|---|
Connect Request | Sends a Reset Request. When this is confirmed, the PVC enters data transfer xon state. |
Connect Accept | Not used. |
Connect Reject | Not used. |
Listen | Awaits a Data packet or Reset Indication. |
Disconnect Request | Sends a Reset Request with Cause. When this is confirmed, the PVC service enters open state. |
Disconnect Confirm | Not used. |
Write | Sends a data packet |
Write Special | Sends a data packet, with the D (delivery), M (more), and Q (qualifier) bits set as requested. |
Xoff | Sends an RNR packet. |
Xon | Sends an RR packet. |
Reset Request | Sends a Reset Request with Cause. When this is confirmed, the PVC service enters data transfer xon state. |
Reopen | Immediately returns the PVC to the open state. Sends a Reset Request packet, but does not wait for a response. |
Function | Mapping |
---|---|
Connect Request | Sends a Call Request. When this is confirmed with a Call Connected the SVC service enters data transfer xon state. |
Connect Accept | Sends a Call Accept Packet and enters data transfer xon state. |
Connect Reject | Sends a Clear Indication and enters the waiting for remote confirmation state. |
Listen | Awaits a Call Indication. |
Disconnect Request | Sends a Clear Indication. When this is confirmed, the SVC service enters open state. |
Disconnect Confirm | Sends a Clear Confirmation and enters the open state. |
Write | Sends a data packet. |
Write Special | Sends a data packet with the D (delivery), M (more), and Q (qualifier) bits set as requested. |
Xoff | Sends an RNR packet. |
Xon | Sends an RR packet. |
Reset Request | Sends a Reset Request. When this is confirmed, the SVC service enters data transfer xon state. |
Reopen | Immediately returns the SVC to the open state. Send a Clear Indication packet, but does not wait for a response. |
Parameter | Explanation |
---|---|
PVC Count | Number of PVCs to allow. |
SVC Count | Number of SVCs to allow. |
Modulus | Sequence number modulus (8 or 128). |
Restart Timeout | Timeout for connect, reset, and disconnect. |
Retries | Maximum number of times to retry after a timeout. |
DTE? | TRUE if this end acts
as the DTE. This affects the allocation of Logical
Channel Numbers for SVCs and arbitration of call
collisions in SVCs. |
Parameter | Explanation |
---|---|
Window Size | Send and receive window size. Usually 2 for modulo 8. |
Packet Size | Maximum size of the user data in a data packet for both sending and receiving. |
Use non-TOA/NPI addressing? | Non-TOA/NPI is the standard X.25 addressing mode. |
Use M-bit procedure? Use Q-bit procedure? Use D-bit procedure? |
Allow the special read and write functions to set and detect the M, Q and D bits. |
Auto-accept calls? | Automatically accept incoming calls. |
Auto-confirm disconnects? | Automatically confirm remote requests to disconnect. |
Auto-confirm interrupt packets? | Automatically confirm receipt of interrupt packets. |
Function | Explanation |
---|---|
Debug Write | Transparently transmits a block of bytes. Useful for introducing random packets into the data stream. |
Function | Explanation |
---|---|
Send Interrupt | Sends an interrupt packet with up to 128 bytes of user data attached. |
Send Interrupt Confirmation | Sends an interrupt confirmation packet. No user data is allowed. |
Interrupt and interrupt confirmation packets received from the remote site are delivered to the application as lgo_EVENT_PROTOCOL_MESSAGE events. Interrupt packets are delivered to the application even if the circuit is configured to automatically confirm the interrupt.
The LayGO library provides routines for encoding and decoding X.25 call setup packets. The C Language interface to these routines is found in diag.h, address.h, facility.h and call.h.
The routines in call.h should be used to encode address, facility and user data for use with:
If no data is provided with these calls, the X.25 layer will use minimal default data. These functions should also be used to decode data received with events:
As implemented, the X.25 layer passes address, facility and user data from call setup packets transparently to the user. The data is parsed only to determine if it contains window and packet size parameter negotiation. It is the application's responsibility to reject unacceptable call parameters, such as reverse charging.
The utility program edcall can be used to create encoded call setup packets that can be read from disk at run-time. See Using EDCALL for details on how to use this program.