11592Srgrimes/*-
21592Srgrimes * Copyright (c) 1992, 1993
31592Srgrimes *	The Regents of the University of California.  All rights reserved.
41592Srgrimes *
51592Srgrimes * Redistribution and use in source and binary forms, with or without
61592Srgrimes * modification, are permitted provided that the following conditions
71592Srgrimes * are met:
81592Srgrimes * 1. Redistributions of source code must retain the above copyright
91592Srgrimes *    notice, this list of conditions and the following disclaimer.
101592Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111592Srgrimes *    notice, this list of conditions and the following disclaimer in the
121592Srgrimes *    documentation and/or other materials provided with the distribution.
13262435Sbrueffer * 3. Neither the name of the University nor the names of its contributors
141592Srgrimes *    may be used to endorse or promote products derived from this software
151592Srgrimes *    without specific prior written permission.
161592Srgrimes *
171592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201592Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271592Srgrimes * SUCH DAMAGE.
281592Srgrimes *
291592Srgrimes *	@(#)extern.h	8.2 (Berkeley) 4/4/94
3050476Speter * $FreeBSD$
311592Srgrimes */
321592Srgrimes
3389920Sume#include <sys/types.h>
3489920Sume#include <sys/socket.h>
3589920Sume
3690148Simpvoid	blkfree(char **);
3790148Simpchar  **copyblk(char **);
3890148Simpvoid	cwd(char *);
3990148Simpvoid	delete(char *);
4090148Simpvoid	dologout(int);
4190148Simpvoid	fatalerror(char *);
4290148Simpvoid    ftpd_logwtmp(char *, char *, struct sockaddr *addr);
4390148Simpint	ftpd_pclose(FILE *);
4490148SimpFILE   *ftpd_popen(char *, char *);
45186405Scpercivaint	getline(char *, int, FILE *);
4690158Skrisvoid	lreply(int, const char *, ...) __printflike(2, 3);
4790148Simpvoid	makedir(char *);
4890148Simpvoid	nack(char *);
4990148Simpvoid	pass(char *);
5090148Simpvoid	passive(void);
5190148Simpvoid	long_passive(char *, int);
5290148Simpvoid	perror_reply(int, char *);
5390148Simpvoid	pwd(void);
5490148Simpvoid	removedir(char *);
5590148Simpvoid	renamecmd(char *, char *);
5690148Simpchar   *renamefrom(char *);
5790158Skrisvoid	reply(int, const char *, ...) __printflike(2, 3);
5890148Simpvoid	retrieve(char *, char *);
5990148Simpvoid	send_file_list(char *);
6013139Speter#ifdef OLD_SETPROCTITLE
6190148Simpvoid	setproctitle(const char *, ...);
6213139Speter#endif
6390148Simpvoid	statcmd(void);
6490148Simpvoid	statfilecmd(char *);
6590148Simpvoid	store(char *, char *, int);
6690148Simpvoid	upper(char *);
6790148Simpvoid	user(char *);
6890148Simpvoid	yyerror(char *);
6990148Simpint	yyparse(void);
7090148Simpint	ls_main(int, char **);
7156668Sshin
72190828Sobrienextern	int assumeutf8;
73190828Sobrienextern	char cbuf[];
74190828Sobrienextern	union sockunion data_dest;
75190828Sobrienextern	int epsvall;
76190828Sobrienextern	int form;
77190828Sobrienextern	int ftpdebug;
78190828Sobrienextern	int guest;
79190828Sobrienextern	union sockunion his_addr;
80190828Sobrienextern	char *homedir;
81190828Sobrienextern	int hostinfo;
82190828Sobrienextern	char *hostname;
83190828Sobrienextern	int maxtimeout;
84190828Sobrienextern	int logged_in;
85190828Sobrienextern	int logging;
86190828Sobrienextern	int noepsv;
87190828Sobrienextern	int noguestretr;
88190828Sobrienextern	int noretr;
89190828Sobrienextern	int paranoid;
90190828Sobrienextern	struct passwd *pw;
91190828Sobrienextern	int pdata;
92190828Sobrienextern	char proctitle[];
93190828Sobrienextern	int readonly;
94190828Sobrienextern	off_t restart_point;
95190828Sobrienextern	int timeout;
96190828Sobrienextern  char tmpline[];
97190828Sobrienextern	int type;
98190828Sobrienextern	char *typenames[]; /* defined in <arpa/ftp.h> included from ftpd.c */
99190828Sobrienextern	int usedefault;
100190828Sobrien
10156668Sshinstruct sockaddr_in;
10256668Sshinstruct sockaddr_in6;
10356668Sshinunion sockunion {
10456668Sshin	struct sockinet {
10556668Sshin		u_char	si_len;
10656668Sshin		u_char	si_family;
10756668Sshin		u_short	si_port;
10856668Sshin	} su_si;
10956668Sshin	struct	sockaddr_in  su_sin;
11056668Sshin	struct	sockaddr_in6 su_sin6;
11156668Sshin};
11256668Sshin#define	su_len		su_si.si_len
11356668Sshin#define	su_family	su_si.si_family
11456668Sshin#define	su_port		su_si.si_port
115