01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DIAL (3C) DIAL(3C)<br />

NAME<br />

dial - establish an out-going terminal line connection<br />

SYNOPSIS<br />

#include < dial.h ><br />

int dial (call)<br />

CALL call;<br />

void undial (fd)<br />

int fd;<br />

DESCRIPTION<br />

Dial returns a file-descriptor for a terminal line open for<br />

read/write. The argument to dial is a CALL structure (defined in<br />

the < dial.h > header file.<br />

When finished with the terminal line, the calling program must<br />

invoke undial to release the semaphore that has been set during<br />

the allocation of the terminal device.<br />

The CALL typedef in the header file is:<br />

typedef struct {<br />

struct termio *attr; /* pointer to termio * /<br />

/* attribute struct * /<br />

int baud; /* transmission data rate * /<br />

int speed; /* 212A modem: low=300, * /<br />

/* high= 12oo * 1<br />

char *line; /* device name for * /<br />

/* out-going line * /<br />

char *telno; /* pointer to tel-no * /<br />

/* digits string * /<br />

int modem; /* specify modem control * /<br />

/* for direct lines * /<br />

} CALL;<br />

The CALL element speed is intended only for use with an outgoing<br />

dialed call, in which case its value should be either 300 or 1200 to<br />

identify the 113A modem, or the high or low speed setting on the<br />

212A modem. The CALL element baud is for the desired transmission<br />

baud rate. For example, one might set baud to 110 and<br />

speed to 300 (or 1200).<br />

If the desired terminal line is a direct line, a string pointer to its<br />

device-name should be placed in the line element in the CALL<br />

structure. Legal values for such terminal device names are kept in<br />

the L-devices file. In this case, the value of the baud element<br />

need not be specified as it will be determined from the L-devices<br />

file.<br />

The telno element is for a pointer to a character string representing<br />

the telephone number to be dialed. Such numbers may consist<br />

only of symbols described in phone(7). The termination symbol<br />

will be supplied by the dial function, and should not be included<br />

in the telno string passed to dial in the CALL structure.<br />

The CALL element modem is used to specify modem control for<br />

direct lines. This element should be non-zero if modem control is<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!