X.25 Call Setup

Get Call Parameters


Get address, facilities and user data in a call request packet.

#include "call.h"

Diagnostic  call_GetCallParameters
        Facilities        facilities,
        CallBuffer        buffer,
        CallBufferSize    size,
        LBoolean          standard
facilitiesoutput for decoded data
bufferinput buffer containing call request packet
sizesize of buffer in bytes
standardTRUE for standard addressing mode

call_GetCallParameters() decodes the packet size and window size parameters of the optional facilities in a call request packet. The example code given below shows how to set up the data structures passed to call_GetCallParameters(). This function duplicates some of the functionality of call_DecodeCallRequest().

If the packet is successfully decoded, non-zero fields in the facilities structure are decoded values.

Return Values

If successful, call_GetCallParameters() returns dg_NONE. Otherwise, it returns a diagnostic value indicating the reason the decode failed. This code can be used in the diagnostic field of a clear request packet.

See Also


FacilitiesStruct    facilities;
Diagnostic          result;

result = call_GetCallParameters(&facilities,

if (result != dg_NONE)
    /* Error decoding */
    /* Encode clear request and reject the call */
    lgo_ConnectReject(cid, packet, packetSize);
    if ((facilities.sendWindowSize != 0 &&
         facilities.sendWindowSize < SEND_WINDOW_MIN) ||
        (facilities.recvWindowSize != 0 &&
         facilities.recvWindowSize < RECV_WINDOW_MIN))
         /* Window size not acceptable */
    if ((facilities.sendPacketSize != 0 &&
         facilities.sendPacketSize < SEND_PACKET_MIN) ||
        (facilities.recvPacketSize != 0 &&
         facilities.recvPacketSize < RECV_PACKET_MIN))
         /* Packet size not acceptable */