6100 ADCCP Programming Manual
ADCCP Programming Example Using C
C–2 069225 Tandem Computers Incorporated
unsigned short FLAGIDLE : 1;
unsigned short L2RETRY : 1;
unsigned short L1RETRY : 1;
unsigned short THRESHOLD : 2;
unsigned short XFERTIMER : 2;
unsigned short T1TIMER : 2;
unsigned short IDLETIMER : 2;
unsigned short DSRTIMER : 2;
unsigned short ADDRESS : 4;
unsigned short ABMSUPPON : 1;
unsigned short ABMIPON : 1;
unsigned short TESTFRAME : 1;
unsigned short SUPPRESSRR : 1;
unsigned short reserved : 1;
unsigned short OPTIONA : 1;
unsigned short OPTIONB : 1;
};
main()
{
short refnum;
char line_name[127];
char *xfname;
short status_code;
/*
* Get the name of the line then open it.
* Make a (1) SET CONFIGURATION request
* then print out a message based on the status
* code returned by the response.
*/
printf("Enter line name: ");
xfname = gets(line_name);
refnum = Open_line(xfname);
status_code = Set_config(refnum);
Status_codes(status_code);
Close_line(refnum,xfname);
}
/*
*-----------------------------------------------------------------
*
* Set_config
*
* Makes a (1) SET CONFIGURATION request by calling the Receive
* function.
*
* Results:
*
* Returns the status code of the response.
*
* Side effects:
*
* None.
*
*-----------------------------------------------------------------
*/
short Set_config(rfnum)
short rfnum; /* IN - The file number that OPEN
* assigned to the line.
*/