xref: /illumos-gate/usr/src/head/dial.h (revision b4203d757c7c247e39c94c09a94021a3a8121062)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
22*ba3594baSGarrett D'Amore /*
23*ba3594baSGarrett D'Amore  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24*ba3594baSGarrett D'Amore  */
257c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
267c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #ifndef _DIAL_H
297c478bd9Sstevel@tonic-gate #define	_DIAL_H
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifndef IUCLC
327c478bd9Sstevel@tonic-gate #include <sys/termio.h>
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
367c478bd9Sstevel@tonic-gate extern "C" {
377c478bd9Sstevel@tonic-gate #endif
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate /* uucico routines need these */
407c478bd9Sstevel@tonic-gate #define	DIAL
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /* The following are no longer used by dial() and may be out of date.	*/
437c478bd9Sstevel@tonic-gate /* They are included here only to maintain source compatibility.	*/
447c478bd9Sstevel@tonic-gate #define	STANDALONE
457c478bd9Sstevel@tonic-gate #define	DEVDIR	"/dev/"				/* device path		*/
467c478bd9Sstevel@tonic-gate #define	LOCK	"/usr/spool/uucp/LCK.."		/* lock file semaphore	*/
477c478bd9Sstevel@tonic-gate #define	DVC_LEN	80	/* max NO of chars in TTY-device path name	*/
487c478bd9Sstevel@tonic-gate /* End of unused definitions						*/
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate 		/* error mnemonics */
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate #define	TRUE	1
537c478bd9Sstevel@tonic-gate #define	FALSE	0
547c478bd9Sstevel@tonic-gate #define	INTRPT	(-1)	/* interrupt occured */
557c478bd9Sstevel@tonic-gate #define	D_HUNG	(-2)	/* dialer hung (no return from write) */
567c478bd9Sstevel@tonic-gate #define	NO_ANS	(-3)	/* no answer (caller script failed) */
577c478bd9Sstevel@tonic-gate #define	ILL_BD	(-4)	/* illegal baud-rate */
587c478bd9Sstevel@tonic-gate #define	A_PROB	(-5)	/* acu problem (open() failure) */
597c478bd9Sstevel@tonic-gate #define	L_PROB	(-6)	/* line problem (open() failure) */
607c478bd9Sstevel@tonic-gate #define	NO_Ldv	(-7)	/* can't open Devices file */
617c478bd9Sstevel@tonic-gate #define	DV_NT_A	(-8)	/* requested device not available */
627c478bd9Sstevel@tonic-gate #define	DV_NT_K	(-9)	/* requested device not known */
637c478bd9Sstevel@tonic-gate #define	NO_BD_A	(-10)	/* no device available at requested baud */
647c478bd9Sstevel@tonic-gate #define	NO_BD_K	(-11)	/* no device known at requested baud */
657c478bd9Sstevel@tonic-gate #define	DV_NT_E (-12)	/* requested speed does not match */
667c478bd9Sstevel@tonic-gate #define	BAD_SYS (-13)	/* system not in Systems file */
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate typedef struct {
697c478bd9Sstevel@tonic-gate 	struct termio *attr;	/* ptr to termio attribute struct */
707c478bd9Sstevel@tonic-gate 	int	baud;		/* unused */
717c478bd9Sstevel@tonic-gate 	int	speed;		/* 212A modem: low=300, high=1200 */
727c478bd9Sstevel@tonic-gate 	char	*line;		/* device name for out-going line */
737c478bd9Sstevel@tonic-gate 	char	*telno;		/* ptr to tel-no/system name string */
747c478bd9Sstevel@tonic-gate 	int	modem;		/* unused */
757c478bd9Sstevel@tonic-gate 	char	*device;	/* unused */
767c478bd9Sstevel@tonic-gate 	int	dev_len;	/* unused */
777c478bd9Sstevel@tonic-gate } CALL;
787c478bd9Sstevel@tonic-gate 
797c478bd9Sstevel@tonic-gate extern int dial(CALL);
807c478bd9Sstevel@tonic-gate extern void undial(int);
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
837c478bd9Sstevel@tonic-gate }
847c478bd9Sstevel@tonic-gate #endif
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate #endif	/* _DIAL_H */
87