ftp_var.h revision 0b6880ccdcd9dcd62a25f7600853d3880075ab68
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _FTP_VAR_H
#define _FTP_VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/resource.h>
#include <setjmp.h>
#include <libintl.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <widec.h>
#include <signal.h>
#include <netdb.h>
#include <pwd.h>
#include <locale.h>
#include <limits.h>
#include <fnmatch.h>
#include <dirent.h>
#include <termios.h>
#include <stdarg.h>
#include <unistd.h>
#include <malloc.h>
#include <strings.h>
#include <errno.h>
#include <ctype.h>
#include <gssapi/gssapi_ext.h>
#define longjmp(e, v) siglongjmp(e, v)
#define jmp_buf sigjmp_buf
/*
* FTP global variables.
*/
#ifndef EXTERN
#define EXTERN extern
#endif
#define DEFAULTFTPFILE "/etc/default/ftp"
/*
* Options and other state info.
*/
#define MECH_SZ 40
#define FTP_DEF_MECH "kerberos_v5"
/*
* BUFSIZE includes
* - (MAXPATHLEN)*2 to accomodate 2 paths (remote and local file names).
* - MAXCMDLEN to accomodate the longest command listed in cmdtab[]
* (defined in cmdtab.c) as this is stuffed into the buffer along
* with the remote and local file names.
* - The 4 bytes are for the 2 blank separators, a carriage-return
* and a NULL terminator.
*
* NOTE : The arguments may not be always pathnames (they can be commands
* too). But, here we have considered the worst case of two pathnames.
*/
/*
* Format of command table.
*/
struct cmd {
char *c_name; /* name of command */
char *c_help; /* help string */
char c_bell; /* give bell when command completes */
char c_conn; /* must be connected to use command */
char c_proxy; /* proxy server may execute */
};
struct macel {
char *mac_start; /* start of macro in macbuf */
char *mac_end; /* end of macro in macbuf */
};
extern int do_auth(void);
extern char *radix_error(int);
char *errstr);
extern int secure_flush(int);
extern int secure_getc(FILE *);
extern int secure_putc(int, FILE *);
int allowpipe);
extern void makeargv(void);
extern char **glob(char *v);
extern void blkfree(char **);
extern void stop_timer(void);
extern void reset_timer(void);
extern int getpagesize(void);
#ifdef __cplusplus
}
#endif
#endif /* _FTP_VAR_H */