Returns configuration information about a virtual circuit.
X.25 Communications Library (libx25s.a)
struct cb_circuit_info_struct *x25_circuit_query(conn_id) int conn_id;
The x25_circuit_query subroutine returns the current information about the specified virtual circuit in cb_circuit_info_struct.
conn_id | Connection identifier of the call currently using the virtual circuit. |
If successful, the x25_circuit_query subroutine returns a pointer to cb_circuit_info_struct, the structure containing the information. Storage for this structure is allocated by the API; it is the responsibility of the application to free it. If an error occurs, the x25_circuit_query subroutine returns a NULL value 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 values:
If the x25_errno global variable is set to the X25SYSERR value, the errno global variable is set to ENOMEM.
The following code structure prints current information for the virtual circuit identified by conn_id:
struct cb_circuit_info_struct *cct_ptr; cct_ptr = x25_circuit_query(conn_id); if (cct_ptr == NULL) (void)printf("Error %d from x25_circuit_query.",x25_errno); else
{ if (cct_ptr -> flags & X25FLG_LCN) (void)printf("Logical Channel Number (LCN) : %d\n",cct_ptr -> lcn); if (cct_ptr -> flags & X25FLG_INCOMING_PACKET_SIZE) (void)printf("Incoming Packet Size : %d\n", cct_ptr -> incoming_packet_size); if (cct_ptr -> flags & X25FLG_OUTGOING_PACKET_SIZE) (void)printf("Outgoing Packet Size : %d\n", cct_ptr -> outgoing_packet_size); if (cct_ptr -> flags & X25FLG_INCOMING_THROUGHPUT_CLASS) (void)printf("Incoming throughput class : %d\n", cct_ptr -> incoming_throughput_class); if (cct_ptr -> flags & X25FLG_OUTGOING_THROUGHPUT_CLASS) (void)printf("Outgoing throughput class : %d\n", cct_ptr -> outgoing_throughput_class); if (cct_ptr -> flags & X25FLG_INCOMING_WINDOW_SIZE) (void)printf("Incoming window size : %d\n", cct_ptr -> incoming_window_size); if (cct_ptr -> flags & X25FLG_OUTGOING_WINDOW_SIZE) (void)printf("Outgoing window size : %d\n", cct_ptr -> outgoing_window_size); free(cct_ptr); }
This subroutine is part of X.25 Application in Base Operating System (BOS) Extensions 2.
The x25_device_query subroutine, the x25_link_query subroutine.
Processing Calls with the X.25 API, Using the X.25 Structures and Flags, in AIX Version 4.3 Communications Programming Concepts.