|
|
HP-UX Reference Volume 4 of 5 > ddial(3C) |
|
NAMEdial(), undial() — establish an outgoing terminal line connection DESCRIPTIONThe dial() function returns a file descriptor for a terminal line open for read/write. The argument to dial() is a CALL structure (defined in the <dial.h> header file). 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. The definition of CALL in the <dial.h> header file is: typedef struct { 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; /* Will hold the name of the device used to make a connection */ int dev_len; /* The length of the device used to make connection */ } CALL; CALL elements are as follows:
APPLICATION USAGEdial() and undial() are thread-safe. These interfaces are not cancel-safe. A cancellation point may occur when a thread is executing dial() or undial(). RETURN VALUEOn failure, a negative value indicating the reason for the failure is returned. Mnemonics for these negative indices as listed here are defined in the <dial.h> header file. INTRPT -1 /* interrupt occurred */ D_HUNG -2 /* dialer hung (no return from write) */ NO_ANS -3 /* no answer within 10 seconds */ ILL_BD -4 /* illegal baud-rate */ A_PROB -5 /* automatic call unit (acu) problem (open() failure) */ L_PROB -6 /* line problem (open() failure) */ NO_Ldv -7 /* can't open LDEVS file */ DV_NT_A -8 /* requested device not available */ DV_NT_K -9 /* requested device not known */ NO_BD_A -10 /* no device available at requested baud */ NO_BD_K -11 /* no device known at requested baud */ WARNINGSIncluding the <dial.h> header file automatically includes the <termio.h> header file. The above routine uses <stdio.h>, which causes unexpected increases in the size of programs that otherwise do not use standard I/O. The dial() function will modify the values of some of the fields of the the CALL structure so if dial(), is reinvoked, reinitialize the values of the CALL structure. |
|