/** \file command.h The structure of server and afs commands. */
+/** Per connection data available to command handlers. */
+struct command_context {
+ /** Network address of the peer. */
+ const char *peer;
+ /** The paraslash user that executes this command. */
+ struct user *u;
+ /** Argument count. */
+ int argc;
+ /** Argument vector. */
+ char **argv;
+ /** The command being executed. */
+ struct server_command *cmd;
+ /** File descriptor and crypto keys. */
+ struct stream_cipher_context scc;
+};
+
/**
* Defines one command of para_server.
*/
/** The name of the command. */
const char *name;
/** Pointer to the function that handles the command. */
- int (*handler)(struct rc4_context *, int, char * const * const);
+ int (*handler)(struct command_context *);
/** The privileges a user must have to execute this command. */
unsigned int perms;
/** One-line description of the command. */