xref: /titanic_44/usr/src/head/dial.h (revision fb3fb4f3d76d55b64440afd0af72775dfad3bd1d)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ifndef _DIAL_H
27 #define	_DIAL_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.2	*/
30 
31 #ifndef IUCLC
32 #include <sys/termio.h>
33 #endif
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 /* uucico routines need these */
40 #define	DIAL
41 
42 /* The following are no longer used by dial() and may be out of date.	*/
43 /* They are included here only to maintain source compatibility.	*/
44 #define	STANDALONE
45 #define	DEVDIR	"/dev/"				/* device path		*/
46 #define	LOCK	"/usr/spool/uucp/LCK.."		/* lock file semaphore	*/
47 #define	DVC_LEN	80	/* max NO of chars in TTY-device path name	*/
48 /* End of unused definitions						*/
49 
50 		/* error mnemonics */
51 
52 #define	TRUE	1
53 #define	FALSE	0
54 #define	INTRPT	(-1)	/* interrupt occured */
55 #define	D_HUNG	(-2)	/* dialer hung (no return from write) */
56 #define	NO_ANS	(-3)	/* no answer (caller script failed) */
57 #define	ILL_BD	(-4)	/* illegal baud-rate */
58 #define	A_PROB	(-5)	/* acu problem (open() failure) */
59 #define	L_PROB	(-6)	/* line problem (open() failure) */
60 #define	NO_Ldv	(-7)	/* can't open Devices file */
61 #define	DV_NT_A	(-8)	/* requested device not available */
62 #define	DV_NT_K	(-9)	/* requested device not known */
63 #define	NO_BD_A	(-10)	/* no device available at requested baud */
64 #define	NO_BD_K	(-11)	/* no device known at requested baud */
65 #define	DV_NT_E (-12)	/* requested speed does not match */
66 #define	BAD_SYS (-13)	/* system not in Systems file */
67 
68 typedef struct {
69 	struct termio *attr;	/* ptr to termio attribute struct */
70 	int	baud;		/* unused */
71 	int	speed;		/* 212A modem: low=300, high=1200 */
72 	char	*line;		/* device name for out-going line */
73 	char	*telno;		/* ptr to tel-no/system name string */
74 	int	modem;		/* unused */
75 	char	*device;	/* unused */
76 	int	dev_len;	/* unused */
77 } CALL;
78 
79 #if defined(__STDC__)
80 
81 extern int dial(CALL);
82 extern void undial(int);
83 
84 #else
85 
86 extern int dial();
87 extern void undial();
88 
89 #endif
90 
91 #ifdef	__cplusplus
92 }
93 #endif
94 
95 #endif	/* _DIAL_H */
96