* Copyright (c) 1983 The Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* @(#)tip.h 5.5 (Berkeley) 6/1/90
* tip - terminal interface program
char *DV
; /* UNIX device(s) to open */
char *EL
; /* chars marking an EOL */
char *CM
; /* initial connection message */
char *IE
; /* EOT to expect on input */
char *OE
; /* EOT to send to complete FT */
char *CU
; /* call unit if making a phone call */
char *PN
; /* phone number(s) */
char *DI
; /* disconnect string */
char *PA
; /* parity to be generated */
char *PH
; /* phone number file */
char *RM
; /* remote file name */
char *HO
; /* host name */
int BR
; /* line speed for conversation */
int FS
; /* frame size for transfers */
char DU
; /* this host is dialed up */
char HW
; /* this device is hardwired, see hunt.c */
char *ES
; /* escape character */
char *EX
; /* exceptions */
char *FO
; /* force (literal next) char*/
char *RC
; /* raise character */
char *RE
; /* script record file */
char *PR
; /* remote prompt */
int DL
; /* line delay for file transfers to remote */
int CL
; /* char delay for file transfers to remote */
int ET
; /* echocheck timeout */
char HD
; /* this host is half duplex - do local echo */
char *v_name
; /* whose name is it */
char v_type
; /* for interpreting set's */
char v_access
; /* protection of touchy ones */
char *v_abrev
; /* possible abreviation */
char *v_value
; /* casted to a union later */
#define STRING 01 /* string valued */
#define BOOL 02 /* true-false value */
#define NUMBER 04 /* numeric value */
#define CHAR 010 /* character value */
#define WRITE 01 /* write access to variable */
#define READ 02 /* read access */
#define CHANGED 01 /* low bit is used to show modification */
#define PUBLIC 1 /* public access rights */
#define PRIVATE 03 /* private to definer */
#define ROOT 05 /* root defined */
#define ENVIRON 020 /* initialize out of the environment */
#define IREMOTE 040 /* initialize out of remote structure */
#define INIT 0100 /* static data space used for initialization */
* Definition of ACU line description
#define equal(a, b) (strcmp(a,b)==0)/* A nice function to string compare */
* variable manipulation stuff --
* if we defined the value entry in value_t, then we couldn't
* initialize it in vars.c, so we cast it as needed to keep lint
#define value(v) vtable[v].v_value
#define number(v) ((((zzhack *)(&(v))))->zz_number)
#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[0])
#define character(v) ((((zzhack *)(&(v))))->zz_character[0])
#define boolean(v) ((((zzhack *)(&(v))))->zz_boolean[1])
#define character(v) ((((zzhack *)(&(v))))->zz_character[3])
#define address(v) ((((zzhack *)(&(v))))->zz_address)
* Escape command table definitions --
* lookup in this table is performed when ``escapec'' is recognized
* at the begining of a line (as defined by the eolmarks variable).
char e_char
; /* char to match on */
char e_flags
; /* experimental, priviledged */
char *e_help
; /* help string */
int (*e_func
)(); /* command */
#define NORM 00 /* normal protection, execute anyone */
#define EXP 01 /* experimental, mark it with a `*' on help */
#define PRIV 02 /* priviledged, root execute only */
extern int vflag
; /* verbose during reading of .tiprc file */
extern value_t vtable
[]; /* variable table */
#define logent(a, b, c, d)
* Definition of indices into variable table so
* value(DEFINE) turns into a static address.
#define NOVAL ((value_t *)NULL)
#define NOACU ((acu_t *)NULL)
#define NOSTR ((char *)NULL)
#define NOFILE ((FILE *)NULL)
#define NOPWD ((struct passwd *)0)
struct sgttyb arg
; /* current mode of local terminal */
struct sgttyb defarg
; /* initial mode of local terminal */
struct tchars tchars
; /* current state of terminal */
struct tchars defchars
; /* initial state of terminal */
struct ltchars ltchars
; /* current local characters of terminal */
struct ltchars deflchars
; /* initial local characters of terminal */
FILE *fscript
; /* FILE for scripting */
int fildes
[2]; /* file transfer synchronization channel */
int repdes
[2]; /* read process sychronization channel */
int FD
; /* open file descriptor to remote host */
int AC
; /* open file descriptor to dialer (v831 only) */
int vflag
; /* print .tiprc initialization sequence */
int sfd
; /* for ~< operation */
int pid
; /* pid of tipout */
uid_t uid
, euid
; /* real and effective user id's */
gid_t gid
, egid
; /* real and effective group id's */
int stop
; /* stop transfer session flag */
int quit
; /* same; but on other end */
int intflag
; /* recognized interrupt */
int stoprompt
; /* for interrupting a prompt session */
int timedout
; /* ~> transfer timedout */
int cumode
; /* simulating the "cu" program */
char fname
[80]; /* file name buffer for ~< */
char copyname
[80]; /* file name buffer for ~> */
char ccc
; /* synchronization character */
char ch
; /* for tipout */
char *uucplock
; /* name of lock file for uucp's */
int odisc
; /* initial tty line discipline */
extern int disc
; /* current tty discpline */
extern struct passwd
*getpwuid();