extern.h revision 90148
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.
131592Srgrimes * 3. All advertising materials mentioning features or use of this software
141592Srgrimes *    must display the following acknowledgement:
151592Srgrimes *	This product includes software developed by the University of
161592Srgrimes *	California, Berkeley and its contributors.
171592Srgrimes * 4. Neither the name of the University nor the names of its contributors
181592Srgrimes *    may be used to endorse or promote products derived from this software
191592Srgrimes *    without specific prior written permission.
201592Srgrimes *
211592Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221592Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231592Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241592Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251592Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261592Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271592Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281592Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291592Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301592Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311592Srgrimes * SUCH DAMAGE.
321592Srgrimes *
331592Srgrimes *	@(#)extern.h	8.2 (Berkeley) 4/4/94
3450476Speter * $FreeBSD: head/libexec/ftpd/extern.h 90148 2002-02-03 15:53:02Z imp $
351592Srgrimes */
361592Srgrimes
3789920Sume#include <sys/types.h>
3889920Sume#include <sys/socket.h>
3989920Sume
4090148Simpvoid	blkfree(char **);
4190148Simpchar  **copyblk(char **);
4290148Simpvoid	cwd(char *);
4390148Simpvoid	delete(char *);
4490148Simpvoid	dologout(int);
4590148Simpvoid	fatalerror(char *);
4690148Simpvoid    ftpd_logwtmp(char *, char *, struct sockaddr *addr);
4790148Simpint	ftpd_pclose(FILE *);
4890148SimpFILE   *ftpd_popen(char *, char *);
4990148Simpchar   *getline(char *, int, FILE *);
5090148Simpvoid	lreply(int, const char *, ...);
5190148Simpvoid	makedir(char *);
5290148Simpvoid	nack(char *);
5390148Simpvoid	pass(char *);
5490148Simpvoid	passive(void);
5590148Simpvoid	long_passive(char *, int);
5690148Simpvoid	perror_reply(int, char *);
5790148Simpvoid	pwd(void);
5890148Simpvoid	removedir(char *);
5990148Simpvoid	renamecmd(char *, char *);
6090148Simpchar   *renamefrom(char *);
6190148Simpvoid	reply(int, const char *, ...);
6290148Simpvoid	retrieve(char *, char *);
6390148Simpvoid	send_file_list(char *);
6413139Speter#ifdef OLD_SETPROCTITLE
6590148Simpvoid	setproctitle(const char *, ...);
6613139Speter#endif
6790148Simpvoid	statcmd(void);
6890148Simpvoid	statfilecmd(char *);
6990148Simpvoid	store(char *, char *, int);
7090148Simpvoid	upper(char *);
7190148Simpvoid	user(char *);
7290148Simpvoid	yyerror(char *);
7390148Simpint	yyparse(void);
7490148Simpint	ls_main(int, char **);
7556668Sshin
7656668Sshinstruct sockaddr_in;
7756668Sshinstruct sockaddr_in6;
7856668Sshinunion sockunion {
7956668Sshin	struct sockinet {
8056668Sshin		u_char	si_len;
8156668Sshin		u_char	si_family;
8256668Sshin		u_short	si_port;
8356668Sshin	} su_si;
8456668Sshin	struct	sockaddr_in  su_sin;
8556668Sshin	struct	sockaddr_in6 su_sin6;
8656668Sshin};
8756668Sshin#define	su_len		su_si.si_len
8856668Sshin#define	su_family	su_si.si_family
8956668Sshin#define	su_port		su_si.si_port
90