extern.h revision 1.14
11556Srgrimes/*	$OpenBSD: extern.h,v 1.14 2004/11/28 18:49:29 henning Exp $	*/
21556Srgrimes/*	$NetBSD: extern.h,v 1.2 1995/04/11 02:44:49 cgd Exp $	*/
31556Srgrimes
41556Srgrimes/*
51556Srgrimes * Copyright (C) 1997 and 1998 WIDE Project.
61556Srgrimes * All rights reserved.
71556Srgrimes *
81556Srgrimes * Redistribution and use in source and binary forms, with or without
91556Srgrimes * modification, are permitted provided that the following conditions
101556Srgrimes * are met:
111556Srgrimes * 1. Redistributions of source code must retain the above copyright
121556Srgrimes *    notice, this list of conditions and the following disclaimer.
131556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141556Srgrimes *    notice, this list of conditions and the following disclaimer in the
151556Srgrimes *    documentation and/or other materials provided with the distribution.
161556Srgrimes * 3. Neither the name of the project nor the names of its contributors
171556Srgrimes *    may be used to endorse or promote products derived from this software
181556Srgrimes *    without specific prior written permission.
191556Srgrimes *
201556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
211556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231556Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
241556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301556Srgrimes * SUCH DAMAGE.
311556Srgrimes */
321556Srgrimes
331556Srgrimes/*-
341556Srgrimes * Copyright (c) 1992, 1993
351556Srgrimes *	The Regents of the University of California.  All rights reserved.
361556Srgrimes *
371556Srgrimes * Redistribution and use in source and binary forms, with or without
3836150Scharnier * modification, are permitted provided that the following conditions
3936150Scharnier * are met:
4036150Scharnier * 1. Redistributions of source code must retain the above copyright
4136150Scharnier *    notice, this list of conditions and the following disclaimer.
4250471Speter * 2. Redistributions in binary form must reproduce the above copyright
431556Srgrimes *    notice, this list of conditions and the following disclaimer in the
441556Srgrimes *    documentation and/or other materials provided with the distribution.
4517987Speter * 3. Neither the name of the University nor the names of its contributors
4617987Speter *    may be used to endorse or promote products derived from this software
4717987Speter *    without specific prior written permission.
481556Srgrimes *
491556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
501556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
511556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5217525Sache * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5317525Sache * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
541556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
551556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
561556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
571556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
581556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
591556Srgrimes * SUCH DAMAGE.
601556Srgrimes *
611556Srgrimes *	@(#)extern.h	8.2 (Berkeley) 4/4/94
621556Srgrimes */
631556Srgrimes
641556Srgrimesvoid	blkfree(char **);
651556Srgrimeschar  **copyblk(char **);
661556Srgrimesvoid	cwd(char *);
6720425Sstevevoid	delete(char *);
6817987Spetervoid	dologout(int);
6917987Spetervoid	fatal(char *);
7017987Speterint	ftpd_pclose(FILE *);
711556SrgrimesFILE   *ftpd_popen(char *, char *);
721556Srgrimeschar   *getline(char *, int, FILE *);
731556Srgrimesvoid	ftpdlogwtmp(char *, char *, char *);
741556Srgrimesvoid	lreply(int, const char *, ...);
751556Srgrimesvoid	makedir(char *);
761556Srgrimesvoid	nack(char *);
771556Srgrimesenum auth_ret
781556Srgrimes	pass(char *);
791556Srgrimesvoid	passive(void);
8090111Simpint	lpsvproto2af(int);
811556Srgrimesint	af2lpsvproto(int);
821556Srgrimesint	epsvproto2af(int);
831556Srgrimesint	af2epsvproto(int);
841556Srgrimesvoid	long_passive(char *, int);
851556Srgrimesint	extended_port(const char *);
861556Srgrimesvoid	epsv_protounsupp(const char *);
8717987Spetervoid	perror_reply(int, char *);
881556Srgrimesvoid	pwd(void);
8917987Spetervoid	removedir(char *);
901556Srgrimesvoid	renamecmd(char *, char *);
911556Srgrimeschar   *renamefrom(char *);
921556Srgrimesvoid	reply(int, const char *, ...);
931556Srgrimesvoid	retrieve(char *, char *);
9497689Stjrvoid	send_file_list(char *);
951556Srgrimesvoid	setproctitle(const char *, ...);
961556Srgrimesvoid	statcmd(void);
971556Srgrimesvoid	statfilecmd(char *);
981556Srgrimesvoid	store(char *, char *, int);
991556Srgrimesvoid	upper(char *);
1001556Srgrimesvoid	user(char *);
10120425Sstevevoid	yyerror(char *);
1021556Srgrimesvoid	toolong(int);
1031556Srgrimes
1041556Srgrimesstruct utmp;
10520425Sstevevoid	ftpd_login(struct utmp *ut);
10620425Ssteveint	ftpd_logout(char *);
1071556Srgrimes
10817987Speterint	yyparse(void);
10920425Ssteve
11020425Ssteveunion sockunion {
11117987Speter	struct sockinet {
11220425Ssteve		u_int8_t si_len;
11320425Ssteve		sa_family_t si_family;
11420425Ssteve		in_port_t si_port;
11520425Ssteve	} su_si;
11620425Ssteve	struct sockaddr_in  su_sin;
11720425Ssteve	struct sockaddr_in6 su_sin6;
11820425Ssteve};
11920425Ssteve#define su_len		su_si.si_len
12097689Stjr#define su_family	su_si.si_family
12197689Stjr#define su_port		su_si.si_port
1228855Srgrimes