Makes an X.25 call by setting up a switched virtual circuit (SVC).
X.25 Communications Library (libx25s.a)
int x25_call(cb_call, ctr_id) struct cb_call_struct *cb_call, int ctr_id;
The x25_call subroutine sets up a switched virtual circuit (SVC) for the X.25 port specified in cb_call_struct for an X.25 call between the calling address and called address, also specified in the cb_call_struct structure.
Control is returned to the application as soon as the call-request packet has been transmitted, but the SVC is not established until a call-connected packet is received (using the x25_receive subroutine).
Optional facilities, such as fast-select calls, can be requested by entering the correct values in the cb_fac_struct structure. If the facilities requested are not allowed by the network, the call is cleared and an appropriate error code is made available in the cb_clear_struct structure, which can be received using the x25_receive subroutine.
cb_call | Pointer to the cb_call_struct structure. |
ctr_id | Identifier of a counter allocated by a previous x25_ctr_get subroutine. |
If successful, the x25_call subroutine returns the connection identifier to be used by other subroutines for the duration of the call. If an error occurs, or the call is cleared, the x25_call subroutine returns a value of -1 and sets the x25_errno global variable to one of the error codes shown below.
On failure, the x25_errno global variable is set to one of the following:
If x25_errno is set to X25SYSERR, errno is set to one of the following values:
Make a call: example program svcxmit.
This subroutine is part of X.25 Application in Base Operating System (BOS) Extensions 2.
The x25_call_accept subroutine, x25_call_clear subroutine, x25_ctr_get subroutine, x25_receive subroutine.
Processing Calls with the X.25 API, Using the X.25 Structures and Flags in AIX Version 4.3 Communications Programming Concepts.