Solstice X.25 9.2 Developer's Guide

6.4.2 N_CC--Call Response/Confirmation

Synopsis
#include <stream.h>
 #include <netx25/x25_proto.h >

 struct strbuf ctlb;

 struct xccnff confirm;
 .
 .
 .
 ctlb.len = sizeof(struct xccnff);
 ctlb.buf = (char *)confirm;

 putmsg(x25_fd, &ctlb, NULL,0);
Description

N_CC is used when calls are being accepted. When used with putmsg, N_CC is a Call Response, when used with getmsg, it is a Call Confirmation. Example 6-1 shows how a getmsg can be constructed. When used with getmsg, ctlb.len is replaced by cltb.maxlen. The control part of the Call Request or Indication is defined by the xccnff structure. There is no data part.

The xccnff structure is shown below:

struct xccnff {
      unsigned char xl_type; /* Always XL_CTL */
      unsigned char xl_command; /* Always N_CC */
      int conn_id; /* The connection id quoted on the associated
                      indication. */
      unsigned char CONS_call; /* When set, indicates CONS call */
      unsigned char negotiate_qos; /* When set, negotiate
                                      facilities etc. else use
                                      indicated values */
      struct xaddrf responder; /* Responding address */
      struct qosformat rqos; /* Facilities and CONS qos: if
                                negotiate_qos is set */
 };

The members of the xccnff structure are:

Table 6-8 Call Response/Confirmation Message

Member 

Description 

conn_id

Connection identifier. conn_id must be returned in the Call Response so that listening operates properly. This must be the same connection identifier as was included in the Connection Request or Indication.

CONS_call

Indicates that OSI CONS procedures should be used for responses. If you are not using OSI CONS, this value should be 0. 

negotiate_qos

A non-zero value shows that facilities and quality of service (QOS) are being negotiated. A zero value means the initiator is requesting all default values. 

responder

The responding address. 

rqos

Selected facilities and OSI CONS QOS parameters to be passed to the initiator.