dial() returns a file-descriptor for a terminal line open for read/write. The argument to dial() is a CALL structure
(defined in the header <dial.h>).
When finished with the terminal line, the calling program must invoke undial() to release the semaphore that has been set during the allocation of the terminal device.
CALL is defined in the header <dial.h> and has the following members:
|
struct termio *attr; /* pointer to termio attribute struct */
int baud; /* transmission data rate */
int speed; /* 212A modem: low=300, high=1200 */
char *line; /* device name for out-going line */
char *telno; /* pointer to tel-no digits string */
int modem; /* specify modem control for direct lines */
char *device; /* unused */
int dev_len; /* unused */
|
The CALL element speed is intended only for use with an outgoing dialed call, in which case its value should be the desired transmission
baud rate. The CALL element baud is no longer used.
If the desired terminal line is a direct line, a string pointer to its device-name should be placed in the line element in the CALL structure.
Legal values for such terminal device names are kept in the Devices file. In this case, the value of the baud element should be set to -1. This value will cause dial to determine the correct value from the <Devices> file.
The telno element is for a pointer to a character string representing the telephone number to be dialed. Such numbers may consist only of these characters:
0-9 | dial 0-9 |
* | dail * |
# | dail # |
= | wait for secondary dial tone |
- | delay for
approximately 4 seconds |
The CALL element modem is used to specify modem control for direct lines. This element should be non-zero if modem control is required.
The CALL element attr is a pointer to a termio structure, as defined in the header <termio.h>. A NULL value for this pointer element may be passed to the dial function, but if such a structure is included, the elements specified in it will be set for the outgoing
terminal line before the connection is established. This setting is often important for certain attributes such as parity and baud-rate.
The CALL elements device and dev_len are no longer used. They are retained in the CALL structure for compatibility reasons.
|