1122679Sume/* $KAME: faithd.h,v 1.9 2002/05/09 09:41:24 itojun Exp $ */ 262655Skris 356668Sshin/* 456668Sshin * Copyright (C) 1997 and 1998 WIDE Project. 556668Sshin * All rights reserved. 662655Skris * 756668Sshin * Redistribution and use in source and binary forms, with or without 856668Sshin * modification, are permitted provided that the following conditions 956668Sshin * are met: 1056668Sshin * 1. Redistributions of source code must retain the above copyright 1156668Sshin * notice, this list of conditions and the following disclaimer. 1256668Sshin * 2. Redistributions in binary form must reproduce the above copyright 1356668Sshin * notice, this list of conditions and the following disclaimer in the 1456668Sshin * documentation and/or other materials provided with the distribution. 1556668Sshin * 3. Neither the name of the project nor the names of its contributors 1656668Sshin * may be used to endorse or promote products derived from this software 1756668Sshin * without specific prior written permission. 1862655Skris * 1956668Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 2056668Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2156668Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2256668Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2356668Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2456668Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2556668Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2656668Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2756668Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2856668Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2956668Sshin * SUCH DAMAGE. 3056668Sshin * 3156668Sshin * $FreeBSD: releng/10.2/usr.sbin/faithd/faithd.h 173412 2007-11-07 10:53:41Z kevlo $ 3256668Sshin */ 3356668Sshin 3456668Sshinextern char logname[]; 3556668Sshinextern int dflag; 3656668Sshin 37173412Skevloextern void tcp_relay(int, int, const char *); 38173412Skevloextern void ftp_relay(int, int); 39173412Skevloextern int ftp_active(int, int, int *, int *); 40173412Skevloextern int ftp_passive(int, int, int *, int *); 41173412Skevloextern void exit_success(const char *, ...) 4278064Sume __attribute__((__format__(__printf__, 1, 2))); 43173412Skevloextern void exit_failure(const char *, ...) 4478064Sume __attribute__((__format__(__printf__, 1, 2))); 4556668Sshin 4656668Sshin#define DEFAULT_PORT_NAME "telnet" 4778064Sume#define DEFAULT_DIR "/usr/libexec" 4856668Sshin#define DEFAULT_NAME "telnetd" 4962655Skris#define DEFAULT_PATH (DEFAULT_DIR "/" DEFAULT_NAME) 5056668Sshin 5156668Sshin#define FTP_PORT 21 5256668Sshin#define RLOGIN_PORT 513 5356668Sshin#define RSH_PORT 514 5456668Sshin 5556668Sshin#define RETURN_SUCCESS 0 5656668Sshin#define RETURN_FAILURE 1 5756668Sshin 5856668Sshin#define YES 1 5956668Sshin#define NO 0 6056668Sshin 6156668Sshin#define MSS 2048 6256668Sshin#define MAXARGV 20 6356668Sshin 6456668Sshin#define NUMPRT 0 6556668Sshin#define NUMPRG 1 6656668Sshin#define NUMARG 2 6756668Sshin 6856668Sshin#define UC(b) (((int)b)&0xff) 6956668Sshin 7056668Sshin#define FAITH_TIMEOUT (30 * 60) /*second*/ 71