faithd.h revision 272461
138465Smsmith/*	$KAME: faithd.h,v 1.9 2002/05/09 09:41:24 itojun Exp $	*/
238465Smsmith
338465Smsmith/*
438465Smsmith * Copyright (C) 1997 and 1998 WIDE Project.
538465Smsmith * All rights reserved.
638465Smsmith *
738465Smsmith * Redistribution and use in source and binary forms, with or without
838465Smsmith * modification, are permitted provided that the following conditions
938465Smsmith * are met:
1038465Smsmith * 1. Redistributions of source code must retain the above copyright
1138465Smsmith *    notice, this list of conditions and the following disclaimer.
1238465Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1338465Smsmith *    notice, this list of conditions and the following disclaimer in the
1438465Smsmith *    documentation and/or other materials provided with the distribution.
1538465Smsmith * 3. Neither the name of the project nor the names of its contributors
1638465Smsmith *    may be used to endorse or promote products derived from this software
1738465Smsmith *    without specific prior written permission.
1838465Smsmith *
1938465Smsmith * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2038465Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2138465Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2238465Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2338465Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2438465Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2538465Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2644572Sdcs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2738465Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2838465Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2939902Smsmith * SUCH DAMAGE.
3039902Smsmith *
3138465Smsmith * $FreeBSD: releng/10.1/usr.sbin/faithd/faithd.h 173412 2007-11-07 10:53:41Z kevlo $
3240146Speter */
3339902Smsmith
3438465Smsmithextern char logname[];
3539902Smsmithextern int dflag;
3639902Smsmith
3738465Smsmithextern void tcp_relay(int, int, const char *);
3839902Smsmithextern void ftp_relay(int, int);
3938465Smsmithextern int ftp_active(int, int, int *, int *);
4038465Smsmithextern int ftp_passive(int, int, int *, int *);
4138465Smsmithextern void exit_success(const char *, ...)
4238465Smsmith	__attribute__((__format__(__printf__, 1, 2)));
4338465Smsmithextern void exit_failure(const char *, ...)
4438465Smsmith	__attribute__((__format__(__printf__, 1, 2)));
4538465Smsmith
4638465Smsmith#define DEFAULT_PORT_NAME	"telnet"
4738465Smsmith#define DEFAULT_DIR	"/usr/libexec"
4838465Smsmith#define DEFAULT_NAME	"telnetd"
4938465Smsmith#define DEFAULT_PATH	(DEFAULT_DIR "/" DEFAULT_NAME)
5038465Smsmith
5138465Smsmith#define FTP_PORT	21
5238465Smsmith#define RLOGIN_PORT	513
5338465Smsmith#define RSH_PORT	514
5438465Smsmith
5538465Smsmith#define RETURN_SUCCESS	0
5638465Smsmith#define RETURN_FAILURE	1
5738465Smsmith
5838465Smsmith#define YES	1
5938465Smsmith#define NO	0
6038465Smsmith
6138465Smsmith#define MSS	2048
6238465Smsmith#define MAXARGV	20
6338465Smsmith
6438465Smsmith#define NUMPRT	0
6538465Smsmith#define NUMPRG	1
6639178Smsmith#define NUMARG	2
6738465Smsmith
6838465Smsmith#define UC(b)	(((int)b)&0xff)
6938465Smsmith
7038465Smsmith#define FAITH_TIMEOUT	(30 * 60)	/*second*/
7138465Smsmith