xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.bin/ftp/ftp_var.h (revision 2321:cd490d070379)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*2321Ssp149894  * Common Development and Distribution License (the "License").
6*2321Ssp149894  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*2321Ssp149894  *	Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  *	Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*	Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T	*/
270Sstevel@tonic-gate /*	All Rights Reserved  	*/
280Sstevel@tonic-gate 
290Sstevel@tonic-gate /*
300Sstevel@tonic-gate  *	University Copyright- Copyright (c) 1982, 1986, 1988
310Sstevel@tonic-gate  *	The Regents of the University of California
320Sstevel@tonic-gate  *	All Rights Reserved
330Sstevel@tonic-gate  *
340Sstevel@tonic-gate  *	University Acknowledgment- Portions of this document are derived from
350Sstevel@tonic-gate  *	software developed by the University of California, Berkeley, and its
360Sstevel@tonic-gate  *	contributors.
370Sstevel@tonic-gate  */
380Sstevel@tonic-gate 
390Sstevel@tonic-gate #ifndef	_FTP_VAR_H
400Sstevel@tonic-gate #define	_FTP_VAR_H
410Sstevel@tonic-gate 
420Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #ifdef	__cplusplus
450Sstevel@tonic-gate extern "C" {
460Sstevel@tonic-gate #endif
470Sstevel@tonic-gate 
480Sstevel@tonic-gate #include <sys/param.h>
490Sstevel@tonic-gate #include <sys/types.h>
500Sstevel@tonic-gate #include <sys/socket.h>
510Sstevel@tonic-gate #include <sys/ioctl.h>
520Sstevel@tonic-gate #include <sys/stat.h>
530Sstevel@tonic-gate #include <sys/wait.h>
540Sstevel@tonic-gate #include <sys/resource.h>
550Sstevel@tonic-gate #include <sys/ttold.h>
560Sstevel@tonic-gate #include <sys/stropts.h>
570Sstevel@tonic-gate #include <sys/time.h>
580Sstevel@tonic-gate #include <netinet/in.h>
590Sstevel@tonic-gate #include <netinet/tcp.h>
600Sstevel@tonic-gate #include <arpa/ftp.h>
610Sstevel@tonic-gate #include <arpa/telnet.h>
620Sstevel@tonic-gate #include <arpa/inet.h>
630Sstevel@tonic-gate #include <setjmp.h>
640Sstevel@tonic-gate #include <libintl.h>
650Sstevel@tonic-gate #include <string.h>
660Sstevel@tonic-gate #include <fcntl.h>
670Sstevel@tonic-gate #include <stdlib.h>
680Sstevel@tonic-gate #include <stdio.h>
690Sstevel@tonic-gate #include <widec.h>
700Sstevel@tonic-gate #include <signal.h>
710Sstevel@tonic-gate #include <netdb.h>
720Sstevel@tonic-gate #include <pwd.h>
730Sstevel@tonic-gate #include <locale.h>
740Sstevel@tonic-gate #include <limits.h>
750Sstevel@tonic-gate #include <fnmatch.h>
760Sstevel@tonic-gate #include <dirent.h>
770Sstevel@tonic-gate #include <termios.h>
780Sstevel@tonic-gate #include <stdarg.h>
790Sstevel@tonic-gate #include <unistd.h>
800Sstevel@tonic-gate #include <malloc.h>
810Sstevel@tonic-gate #include <strings.h>
820Sstevel@tonic-gate #include <errno.h>
830Sstevel@tonic-gate #include <ctype.h>
840Sstevel@tonic-gate #include <gssapi/gssapi.h>
850Sstevel@tonic-gate #include <gssapi/gssapi_ext.h>
860Sstevel@tonic-gate 
870Sstevel@tonic-gate #define	signal(s, f)	sigset(s, f)
880Sstevel@tonic-gate #define	setjmp(e)	sigsetjmp(e, 1)
890Sstevel@tonic-gate #define	longjmp(e, v)	siglongjmp(e, v)
900Sstevel@tonic-gate #define	jmp_buf		sigjmp_buf
910Sstevel@tonic-gate 
920Sstevel@tonic-gate /*
930Sstevel@tonic-gate  * FTP global variables.
940Sstevel@tonic-gate  */
950Sstevel@tonic-gate #ifndef	EXTERN
960Sstevel@tonic-gate #define	EXTERN	extern
970Sstevel@tonic-gate #endif
980Sstevel@tonic-gate 
990Sstevel@tonic-gate #define	DEFAULTFTPFILE	"/etc/default/ftp"
1000Sstevel@tonic-gate 
1010Sstevel@tonic-gate /*
1020Sstevel@tonic-gate  * Options and other state info.
1030Sstevel@tonic-gate  */
1040Sstevel@tonic-gate EXTERN int	trace;		/* trace packets exchanged */
1050Sstevel@tonic-gate EXTERN int	hash;		/* print # for each buffer transferred */
1060Sstevel@tonic-gate EXTERN int	sendport;	/* use PORT cmd for each data connection */
1070Sstevel@tonic-gate EXTERN int	verbose;	/* print messages coming back from server */
1080Sstevel@tonic-gate EXTERN int	connected;	/* connected to server */
1090Sstevel@tonic-gate EXTERN int	fromatty;	/* input is from a terminal */
1100Sstevel@tonic-gate EXTERN int	interactive;	/* interactively prompt on m* cmds */
1110Sstevel@tonic-gate EXTERN int	debug;		/* debugging level */
1120Sstevel@tonic-gate EXTERN int	bell;		/* ring bell on cmd completion */
1130Sstevel@tonic-gate EXTERN int	doglob;		/* glob local file names */
1140Sstevel@tonic-gate EXTERN int	autologin;	/* establish user account on connection */
1150Sstevel@tonic-gate EXTERN int	proxy;		/* proxy server connection active */
1160Sstevel@tonic-gate EXTERN int	proxflag;	/* proxy connection exists */
1170Sstevel@tonic-gate EXTERN int	sunique;	/* store files on server with unique name */
1180Sstevel@tonic-gate EXTERN int	runique;	/* store local files with unique name */
1190Sstevel@tonic-gate EXTERN int	mcase;		/* map upper to lower case for mget names */
1200Sstevel@tonic-gate EXTERN int	ntflag;		/* use ntin ntout tables for name translation */
1210Sstevel@tonic-gate EXTERN int	mapflag;	/* use mapin mapout templates on file names */
1220Sstevel@tonic-gate EXTERN int	code;		/* return/reply code for ftp command */
1230Sstevel@tonic-gate EXTERN int	crflag;		/* if 1, strip car. rets. on ascii gets */
1240Sstevel@tonic-gate EXTERN char	pasv[64];	/* passive port for proxy data connection */
1250Sstevel@tonic-gate EXTERN char	*altarg;	/* argv[1] with no shell-like preprocessing  */
1260Sstevel@tonic-gate EXTERN char	ntin[17];	/* input translation table */
1270Sstevel@tonic-gate EXTERN char	ntout[17];	/* output translation table */
1280Sstevel@tonic-gate EXTERN char	mapin[MAXPATHLEN]; /* input map template */
1290Sstevel@tonic-gate EXTERN char	mapout[MAXPATHLEN]; /* output map template */
1300Sstevel@tonic-gate EXTERN char	typename[32];	/* name of file transfer type */
1310Sstevel@tonic-gate EXTERN int	type;		/* file transfer type */
1320Sstevel@tonic-gate EXTERN char	structname[32];	/* name of file transfer structure */
1330Sstevel@tonic-gate EXTERN int	stru;		/* file transfer structure */
1340Sstevel@tonic-gate EXTERN char	formname[32];	/* name of file transfer format */
1350Sstevel@tonic-gate EXTERN int	form;		/* file transfer format */
1360Sstevel@tonic-gate EXTERN char	modename[32];	/* name of file transfer mode */
1370Sstevel@tonic-gate EXTERN int	mode;		/* file transfer mode */
1380Sstevel@tonic-gate EXTERN char	bytename[32];	/* local byte size in ascii */
1390Sstevel@tonic-gate EXTERN int	bytesize;	/* local byte size in binary */
1400Sstevel@tonic-gate EXTERN int	passivemode;	/* passive transfer mode toggle */
1410Sstevel@tonic-gate EXTERN off_t	restart_point;	/* transfer restart offset */
1420Sstevel@tonic-gate EXTERN int	tcpwindowsize;	/* TCP window size for the data connection */
1430Sstevel@tonic-gate 
1440Sstevel@tonic-gate EXTERN boolean_t	ls_invokes_NLST;	/* behaviour of 'ls' */
1450Sstevel@tonic-gate EXTERN char		*hostname;		/* name of host connected to */
1460Sstevel@tonic-gate EXTERN char		*home;
1470Sstevel@tonic-gate EXTERN char		*globerr;
1480Sstevel@tonic-gate 
1490Sstevel@tonic-gate EXTERN struct	sockaddr_in6 myctladdr;		/* for channel bindings */
1500Sstevel@tonic-gate EXTERN struct	sockaddr_in6 remctladdr;	/* for channel bindings */
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate EXTERN int	clevel;		/* command channel protection level */
1530Sstevel@tonic-gate EXTERN int	dlevel;		/* data channel protection level */
1540Sstevel@tonic-gate 
1550Sstevel@tonic-gate EXTERN int	autoauth;	/* do authentication on connect */
1560Sstevel@tonic-gate EXTERN int	auth_type;	/* authentication type */
1570Sstevel@tonic-gate EXTERN int	auth_error;	/* one error code for all auth types */
1580Sstevel@tonic-gate EXTERN int	autoencrypt;	/* do encryption on connect */
1590Sstevel@tonic-gate EXTERN int	fflag;		/* forward credentials */
1600Sstevel@tonic-gate EXTERN boolean_t goteof;
1610Sstevel@tonic-gate 
162*2321Ssp149894 EXTERN int	skipsyst;	/* enable automatic sending of SYST command */
163*2321Ssp149894 
1640Sstevel@tonic-gate EXTERN uchar_t	*ucbuf;		/* clear text buffer */
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate #define	MECH_SZ		40
1670Sstevel@tonic-gate #define	FTP_DEF_MECH	"kerberos_v5"
1680Sstevel@tonic-gate EXTERN char	mechstr[MECH_SZ];	/* mechanism type */
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate EXTERN gss_OID	mechoid;	/* corresponding mechanism oid type */
1710Sstevel@tonic-gate EXTERN gss_ctx_id_t gcontext;	/* gss security context */
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate #define	FTPBUFSIZ	BUFSIZ*16
1740Sstevel@tonic-gate #define	HASHSIZ		BUFSIZ*8
1750Sstevel@tonic-gate 
1760Sstevel@tonic-gate EXTERN char *buf;		/* buffer for binary sends and gets */
1770Sstevel@tonic-gate 
1780Sstevel@tonic-gate EXTERN jmp_buf toplevel;	/* non-local goto stuff for cmd scanner */
1790Sstevel@tonic-gate 
1800Sstevel@tonic-gate /*
1810Sstevel@tonic-gate  * BUFSIZE includes
1820Sstevel@tonic-gate  *	- (MAXPATHLEN)*2 to  accomodate 2 paths (remote and local file names).
1830Sstevel@tonic-gate  *	- MAXCMDLEN to accomodate the longest command listed in cmdtab[]
1840Sstevel@tonic-gate  *	  (defined in cmdtab.c) as this is stuffed into the buffer along
1850Sstevel@tonic-gate  *	  with the remote and local file names.
1860Sstevel@tonic-gate  *	- The 4 bytes are for the 2 blank separators, a carriage-return
1870Sstevel@tonic-gate  *	  and a NULL terminator.
1880Sstevel@tonic-gate  *
1890Sstevel@tonic-gate  * NOTE : The arguments may not be always pathnames (they can be commands
1900Sstevel@tonic-gate  *	  too). But, here we have considered the worst case of two pathnames.
1910Sstevel@tonic-gate  */
1920Sstevel@tonic-gate #define	MAXCMDLEN	10	/* The length of longest command in cmdtab[] */
1930Sstevel@tonic-gate #define	BUFSIZE	((MAXPATHLEN)*2+MAXCMDLEN+4)
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate EXTERN char	line[BUFSIZE];	/* input line buffer */
1960Sstevel@tonic-gate EXTERN char	*stringbase;	/* current scan point in line buffer */
1970Sstevel@tonic-gate EXTERN char	argbuf[BUFSIZE]; /* argument storage buffer */
1980Sstevel@tonic-gate EXTERN char	*argbase;	/* current storage point in arg buffer */
1990Sstevel@tonic-gate EXTERN int	margc;		/* count of arguments on input line */
2000Sstevel@tonic-gate EXTERN char	**margv;	/* args parsed from input line */
2010Sstevel@tonic-gate EXTERN int	cpend;		/* flag: if != 0, then pending server reply */
2020Sstevel@tonic-gate EXTERN int	mflag;		/* flag: if != 0, then active multi command */
2030Sstevel@tonic-gate EXTERN FILE	*tmp_nlst;	/* tmp file; holds NLST results for mget, etc */
2040Sstevel@tonic-gate 
2050Sstevel@tonic-gate EXTERN char	*reply_parse;	/* for parsing replies to the ADAT command */
2060Sstevel@tonic-gate EXTERN char	reply_buf[FTPBUFSIZ];
2070Sstevel@tonic-gate EXTERN char	*reply_ptr;
2080Sstevel@tonic-gate 
2090Sstevel@tonic-gate EXTERN int	options;	/* used during socket creation */
2100Sstevel@tonic-gate 
2110Sstevel@tonic-gate EXTERN int	timeout;	/* connection timeout */
2120Sstevel@tonic-gate EXTERN int	timeoutms;	/* connection timeout in msec */
2130Sstevel@tonic-gate EXTERN jmp_buf	timeralarm;	/* to recover from global timeout */
2140Sstevel@tonic-gate 
2150Sstevel@tonic-gate 
2160Sstevel@tonic-gate /*
2170Sstevel@tonic-gate  * Format of command table.
2180Sstevel@tonic-gate  */
2190Sstevel@tonic-gate struct cmd {
2200Sstevel@tonic-gate 	char	*c_name;	/* name of command */
2210Sstevel@tonic-gate 	char	*c_help;	/* help string */
2220Sstevel@tonic-gate 	char	c_bell;		/* give bell when command completes */
2230Sstevel@tonic-gate 	char	c_conn;		/* must be connected to use command */
2240Sstevel@tonic-gate 	char	c_proxy;	/* proxy server may execute */
2250Sstevel@tonic-gate 	void	(*c_handler)(int argc, char *argv[]); /* function to call */
2260Sstevel@tonic-gate };
2270Sstevel@tonic-gate 
2280Sstevel@tonic-gate struct macel {
2290Sstevel@tonic-gate 	char mac_name[9];	/* macro name */
2300Sstevel@tonic-gate 	char *mac_start;	/* start of macro in macbuf */
2310Sstevel@tonic-gate 	char *mac_end;		/* end of macro in macbuf */
2320Sstevel@tonic-gate };
2330Sstevel@tonic-gate 
2340Sstevel@tonic-gate EXTERN int macnum;			/* number of defined macros */
2350Sstevel@tonic-gate EXTERN struct macel macros[16];
2360Sstevel@tonic-gate EXTERN char macbuf[4096];
2370Sstevel@tonic-gate 
2380Sstevel@tonic-gate extern void macdef(int argc, char *argv[]);
2390Sstevel@tonic-gate extern void doproxy(int argc, char *argv[]);
2400Sstevel@tonic-gate extern void setpeer(int argc, char *argv[]);
2410Sstevel@tonic-gate extern void rmthelp(int argc, char *argv[]);
2420Sstevel@tonic-gate extern void settype(int argc, char *argv[]);
2430Sstevel@tonic-gate extern void setbinary(int argc, char *argv[]);
2440Sstevel@tonic-gate extern void setascii(int argc, char *argv[]);
2450Sstevel@tonic-gate extern void settenex(int argc, char *argv[]);
2460Sstevel@tonic-gate extern void setebcdic(int argc, char *argv[]);
2470Sstevel@tonic-gate extern void setmode(int argc, char *argv[]);
2480Sstevel@tonic-gate extern void setform(int argc, char *argv[]);
2490Sstevel@tonic-gate extern void setstruct(int argc, char *argv[]);
2500Sstevel@tonic-gate extern void put(int argc, char *argv[]);
2510Sstevel@tonic-gate extern void mput(int argc, char *argv[]);
2520Sstevel@tonic-gate extern void get(int argc, char *argv[]);
2530Sstevel@tonic-gate extern void mget(int argc, char *argv[]);
2540Sstevel@tonic-gate extern void status(int argc, char *argv[]);
2550Sstevel@tonic-gate extern void setbell(int argc, char *argv[]);
2560Sstevel@tonic-gate extern void settrace(int argc, char *argv[]);
2570Sstevel@tonic-gate extern void sethash(int argc, char *argv[]);
2580Sstevel@tonic-gate extern void setverbose(int argc, char *argv[]);
2590Sstevel@tonic-gate extern void setport(int argc, char *argv[]);
2600Sstevel@tonic-gate extern void setprompt(int argc, char *argv[]);
2610Sstevel@tonic-gate extern void setglob(int argc, char *argv[]);
2620Sstevel@tonic-gate extern void setdebug(int argc, char *argv[]);
2630Sstevel@tonic-gate extern void cd(int argc, char *argv[]);
2640Sstevel@tonic-gate extern void lcd(int argc, char *argv[]);
2650Sstevel@tonic-gate extern void delete(int argc, char *argv[]);
2660Sstevel@tonic-gate extern void mdelete(int argc, char *argv[]);
2670Sstevel@tonic-gate extern void renamefile(int argc, char *argv[]);
2680Sstevel@tonic-gate extern void ls(int argc, char *argv[]);
2690Sstevel@tonic-gate extern void mls(int argc, char *argv[]);
2700Sstevel@tonic-gate extern void shell(int argc, char *argv[]);
2710Sstevel@tonic-gate extern void user(int argc, char *argv[]);
2720Sstevel@tonic-gate extern void pwd(int argc, char *argv[]);
2730Sstevel@tonic-gate extern void makedir(int argc, char *argv[]);
2740Sstevel@tonic-gate extern void removedir(int argc, char *argv[]);
2750Sstevel@tonic-gate extern void quote(int argc, char *argv[]);
2760Sstevel@tonic-gate extern void rmthelp(int argc, char *argv[]);
2770Sstevel@tonic-gate extern void quit(int argc, char *argv[]);
2780Sstevel@tonic-gate extern void disconnect(int argc, char *argv[]);
2790Sstevel@tonic-gate extern void account(int argc, char *argv[]);
2800Sstevel@tonic-gate extern void setcase(int argc, char *argv[]);
2810Sstevel@tonic-gate extern void setcr(int argc, char *argv[]);
2820Sstevel@tonic-gate extern void setntrans(int argc, char *argv[]);
2830Sstevel@tonic-gate extern void setnmap(int argc, char *argv[]);
2840Sstevel@tonic-gate extern void setsunique(int argc, char *argv[]);
2850Sstevel@tonic-gate extern void setrunique(int argc, char *argv[]);
2860Sstevel@tonic-gate extern void cdup(int argc, char *argv[]);
2870Sstevel@tonic-gate extern void domacro(int argc, char *argv[]);
2880Sstevel@tonic-gate extern void help(int argc, char *argv[]);
2890Sstevel@tonic-gate extern void reset(int argc, char *argv[]);
2900Sstevel@tonic-gate extern void reget(int argc, char *argv[]);
2910Sstevel@tonic-gate extern void restart(int argc, char *argv[]);
2920Sstevel@tonic-gate extern void setpassive(int argc, char *argv[]);
2930Sstevel@tonic-gate extern void settcpwindow(int argc, char *argv[]);
2940Sstevel@tonic-gate extern void site(int argc, char *argv[]);
2950Sstevel@tonic-gate 
2960Sstevel@tonic-gate extern void ccc(int argc, char *argv[]);
2970Sstevel@tonic-gate extern void setclear(int argc, char *argv[]);
2980Sstevel@tonic-gate extern void setclevel(int argc, char *argv[]);
2990Sstevel@tonic-gate extern void setdlevel(int argc, char *argv[]);
3000Sstevel@tonic-gate extern void setsafe(int argc, char *argv[]);
3010Sstevel@tonic-gate extern void setmech(int argc, char *argv[]);
3020Sstevel@tonic-gate 
3030Sstevel@tonic-gate extern int do_auth(void);
3040Sstevel@tonic-gate extern void setpbsz(uint_t size);
3050Sstevel@tonic-gate extern char *radix_error(int);
3060Sstevel@tonic-gate extern int radix_encode(uchar_t *, uchar_t *, size_t, int *, int);
3070Sstevel@tonic-gate extern void user_gss_error(OM_uint32 maj_stat, OM_uint32 min_stat,
3080Sstevel@tonic-gate 	char *errstr);
3090Sstevel@tonic-gate extern void setprivate(int argc, char *argv[]);
3100Sstevel@tonic-gate 
3110Sstevel@tonic-gate extern int secure_flush(int);
3120Sstevel@tonic-gate extern int secure_getc(FILE *);
3130Sstevel@tonic-gate extern int secure_putc(int, FILE *);
3140Sstevel@tonic-gate extern ssize_t secure_read(int, void *, size_t);
3150Sstevel@tonic-gate extern ssize_t secure_write(int, const void *, size_t);
3160Sstevel@tonic-gate 
3170Sstevel@tonic-gate extern void fatal(char *msg);
3180Sstevel@tonic-gate extern int getreply(int expecteof);
3190Sstevel@tonic-gate extern void call(void (*routine)(int argc, char *argv[]), ...);
3200Sstevel@tonic-gate extern void sendrequest(char *cmd, char *local, char *remote, int allowpipe);
3210Sstevel@tonic-gate extern void recvrequest(char *cmd, char *local, char *remote, char *mode,
3220Sstevel@tonic-gate     int allowpipe);
3230Sstevel@tonic-gate extern void makeargv(void);
3240Sstevel@tonic-gate extern int login(char *host);
3250Sstevel@tonic-gate extern int command(char *fmt, ...);
3260Sstevel@tonic-gate extern char **glob(char *v);
3270Sstevel@tonic-gate extern void blkfree(char **);
3280Sstevel@tonic-gate extern void pswitch(int flag);
3290Sstevel@tonic-gate 
3300Sstevel@tonic-gate extern char *hookup(char *host, char *);
3310Sstevel@tonic-gate extern char *mygetpass(char *prompt);
3320Sstevel@tonic-gate extern void lostpeer(int sig);
3330Sstevel@tonic-gate extern int ruserpass(char *host, char **aname, char **apass, char **aacct);
3340Sstevel@tonic-gate extern FILE *mypopen(char *cmd, char *mode);
3350Sstevel@tonic-gate extern int mypclose(FILE *ptr);
3360Sstevel@tonic-gate extern struct cmd *getcmd(char *name);
3370Sstevel@tonic-gate 
3380Sstevel@tonic-gate extern void stop_timer(void);
3390Sstevel@tonic-gate extern void reset_timer(void);
3400Sstevel@tonic-gate extern int getpagesize(void);
3410Sstevel@tonic-gate 
3420Sstevel@tonic-gate #define	ENCODELEN(l)	(((4 * (l)) / 3) + 4)
3430Sstevel@tonic-gate #define	DECODELEN(l)	(((3 * (l)) / 4) + 4)
3440Sstevel@tonic-gate 
3450Sstevel@tonic-gate #ifdef	__cplusplus
3460Sstevel@tonic-gate }
3470Sstevel@tonic-gate #endif
3480Sstevel@tonic-gate 
3490Sstevel@tonic-gate #endif	/* _FTP_VAR_H */
350