/*****************************************************************************\
* Copyright (c) 2002 Pelle Johansson. *
* All rights reserved. *
* *
* This file is part of the moftpd package. Use and distribution of *
* this software is governed by the terms in the file LICENCE, which *
* should have come with this package. *
\*****************************************************************************/
/* $moftpd: commands.h 1251 2005-03-06 22:24:29Z morth $ */
#ifndef _COMMANDS_H
#define _COMMANDS_H
#include "connection.h"
typedef struct command
{
const char *name;
int (*handler)(connection_t *conn, const char *arg, int expected);
int unauthed, whileWorking;
const char *help;
} command_t;
int handle_command(connection_t *conn, char *line);
time_t get_timeval (char *timestr);
#ifdef HAVE_LIBPAM
int conv_fun (int num_msg, PAM_CONST struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr);
#endif
int command_user(connection_t *conn, const char *arg, int expected);
int command_pass(connection_t *conn, const char *arg, int expected);
int command_acct(connection_t *conn, const char *arg, int expected);
int command_rein(connection_t *conn, const char *arg, int expected);
int command_quit(connection_t *conn, const char *arg, int expected);
int command_cwd(connection_t *conn, const char *arg, int expected);
int command_cdup(connection_t *conn, const char *arg, int expected);
int command_smnt(connection_t *conn, const char *arg, int expected);
int command_port(connection_t *conn, const char *arg, int expected);
int command_lprt(connection_t *conn, const char *arg, int expected);
int command_eprt(connection_t *conn, const char *arg, int expected);
int command_pasv(connection_t *conn, const char *arg, int expected);
int command_lpsv(connection_t *conn, const char *arg, int expected);
int command_epsv(connection_t *conn, const char *arg, int expected);
int command_mode(connection_t *conn, const char *arg, int expected);
int command_type(connection_t *conn, const char *arg, int expected);
int command_stru(connection_t *conn, const char *arg, int expected);
int command_allo(connection_t *conn, const char *arg, int expected);
int command_rest(connection_t *conn, const char *arg, int expected);
int command_stor(connection_t *conn, const char *arg, int expected);
int command_stou(connection_t *conn, const char *arg, int expected);
int command_retr(connection_t *conn, const char *arg, int expected);
int command_list(connection_t *conn, const char *arg, int expected);
int command_nlst(connection_t *conn, const char *arg, int expected);
int command_mlst(connection_t *conn, const char *arg, int expected);
int command_mlsd(connection_t *conn, const char *arg, int expected);
int command_appe(connection_t *conn, const char *arg, int expected);
int command_rnfr(connection_t *conn, const char *arg, int expected);
int command_rnto(connection_t *conn, const char *arg, int expected);
int command_dele(connection_t *conn, const char *arg, int expected);
int command_rmd(connection_t *conn, const char *arg, int expected);
int command_mkd(connection_t *conn, const char *arg, int expected);
int command_pwd(connection_t *conn, const char *arg, int expected);
int command_abor(connection_t *conn, const char *arg, int expected);
int command_syst(connection_t *conn, const char *arg, int expected);
int command_stat(connection_t *conn, const char *arg, int expected);
int command_size(connection_t *conn, const char *arg, int expected);
int command_mdtm(connection_t *conn, const char *arg, int expected);
int command_help(connection_t *conn, const char *arg, int expected);
int command_feat(connection_t *conn, const char *arg, int expected);
int command_opts(connection_t *conn, const char *arg, int expected);
int command_lang(connection_t *conn, const char *arg, int expected);
int command_site(connection_t *conn, const char *arg, int expected);
int command_noop(connection_t *conn, const char *arg, int expected);
int command_auth(connection_t *conn, const char *arg, int expected);
int command_adat(connection_t *conn, const char *arg, int expected);
int command_prot(connection_t *conn, const char *arg, int expected);
int command_pbsz(connection_t *conn, const char *arg, int expected);
int command_ccc(connection_t *conn, const char *arg, int expected);
int command_mic(connection_t *conn, const char *arg, int expected);
int command_conf(connection_t *conn, const char *arg, int expected);
int command_enc(connection_t *conn, const char *arg, int expected);
int command_host (connection_t *conn, const char *arg, int expected);
int command_mfmt (connection_t *conn, const char *arg, int expected);
int command_end (connection_t *conn, const char *arg, int expected);
int sitecommand_help (connection_t *conn, const char *arg, int expected);
int sitecommand_ftpd (connection_t *conn, const char *arg, int expected);
int sitecommand_chmod (connection_t *conn, const char *arg, int expected);
int sitecommand_admin (connection_t *conn, const char *arg, int expected);
#endif /*_COMMANDS_H*/
syntax highlighted by Code2HTML, v. 0.9.1