1 /** \file command.h The structure of server and afs commands. */
3 /** Per connection data available to command handlers. */
4 struct command_context {
5 /** Network address of the peer. */
7 /** The paraslash user that executes this command. */
11 /** Argument vector. */
13 /** File descriptor and crypto keys. */
14 struct stream_cipher_context scc;
17 int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes,
18 int band, bool dont_free);
19 __printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band,
20 const char *fmt, ...);
21 int send_strerror(struct command_context *cc, int err);
22 int recv_sb(struct stream_cipher_context *scc,
23 enum sb_designator expected_band,
24 size_t max_size, struct iovec *result);