X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.h;h=e4159e6bda00131bf4a1ef6b5a46627c9f7d88b1;hp=05510cc08aa33d50a104f71a05d353ad3027e7d2;hb=d29fa64af5137ed4bb556b7a0f81897eac731b69;hpb=69b3a249fb8f0f4a01e26f7a414dbe79f480a78c diff --git a/command.h b/command.h index 05510cc0..e4159e6b 100644 --- a/command.h +++ b/command.h @@ -14,6 +14,8 @@ struct command_context { struct server_command *cmd; /** File descriptor and crypto keys. */ struct stream_cipher_context scc; + /** Whether to use the sideband API for this command. */ + bool use_sideband; }; /** @@ -33,3 +35,12 @@ struct server_command { /** The long help text. */ const char *help; }; + +int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes, + int band, bool dont_free); +__printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band, + const char *fmt, ...); +int send_strerror(struct command_context *cc, int err); +int recv_sb(struct stream_cipher_context *scc, + enum sb_designator expected_band, + size_t max_size, struct iovec *result);