xref: /titanic_50/usr/src/cmd/bnu/dial.h (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
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 #ident	"%Z%%M%	%I%	%E% SMI"	/* from SVR4 bnu:dial.h 1.1 */
27 
28 #ifndef _DIAL_H
29 #define _DIAL_H
30 
31 #ifndef IUCLC
32 #ifndef  _SYS_TERMIO_H
33 #include <sys/termio.h>
34 #endif
35 #endif
36 
37 /* uucico routines need these */
38 #define DIAL
39 
40 /* The following are no longer used by dial() and may be out of date.	*/
41 /* They are included here only to maintain source compatibility.	*/
42 #define STANDALONE
43 #define DEVDIR	"/dev/"				/* device path		*/
44 #define LOCK	"/usr/spool/uucp/LCK.."		/* lock file semaphore	*/
45 #define DVC_LEN	80	/* max NO of chars in TTY-device path name	*/
46 /* End of unused definitions						*/
47 
48 		/* error mnemonics */
49 
50 #define	TRUE	1
51 #define FALSE	0
52 #define INTRPT	(-1)	/* interrupt occured */
53 #define D_HUNG	(-2)	/* dialer hung (no return from write) */
54 #define NO_ANS	(-3)	/* no answer (caller script failed) */
55 #define ILL_BD	(-4)	/* illegal baud-rate */
56 #define A_PROB	(-5)	/* acu problem (open() failure) */
57 #define L_PROB	(-6)	/* line problem (open() failure) */
58 #define NO_Ldv	(-7)	/* can't open Devices file */
59 #define DV_NT_A	(-8)	/* requested device not available */
60 #define DV_NT_K	(-9)	/* requested device not known */
61 #define NO_BD_A	(-10)	/* no device available at requested baud */
62 #define NO_BD_K	(-11)	/* no device known at requested baud */
63 #define DV_NT_E (-12)	/* requested speed does not match */
64 #define BAD_SYS (-13)	/* system not in Systems file */
65 
66 typedef struct {
67 	struct termio *attr;	/* ptr to termio attribute struct */
68 	int	baud;		/* unused */
69 	int	speed;		/* 212A modem: low=300, high=1200 */
70 	char	*line;		/* device name for out-going line */
71 	char	*telno;		/* ptr to tel-no/system name string */
72 	int	modem;		/* unused */
73 	char	*device;	/* unused */
74 	int	dev_len;	/* unused */
75 } CALL;
76 
77 #if defined(__STDC__)
78 
79 extern int dial(CALL);
80 extern void undial(int);
81 
82 #else
83 
84 extern int dial();
85 extern void undial();
86 
87 #endif
88 
89 #endif 	/* _DIAL_H */
90