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