2 * Copyright (C) 1997-2012 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file client.h Common client functions and exported symbols from client_common.c. */
9 /** The different states of a connection from the view of the client. */
11 /** TCP connection is established. */
13 /** Server sends the welcome message. */
15 /** Client sends the authentification request. */
17 /** Client solves the challenge and sends the result. */
19 /** Server accepts this authentication. */
21 /** Client sends the command. */
23 /** Server expects data. */
25 /** Client expects data. */
29 /** Data specific to a client task. */
31 /** The state of the connection. */
33 /** The file descriptor and the session keys. */
34 struct stream_cipher_context scc;
35 /** True if this connections uses the sideband API. */
37 /** The sideband context, ignored if \a use_sideband is false. */
38 struct sb_context *sbc;
39 /** The configuration (including the command). */
40 struct client_args_info conf;
41 /** The config file for client options. */
43 /** The RSA private key. */
45 /** Paraslash user name. */
47 /** The client task structure. */
49 /** The buffer tree node of the client task. */
50 struct btr_node *btrn;
51 /** List of features supported by the server. */
55 void client_disconnect(struct client_task *ct);
56 void client_close(struct client_task *ct);
57 int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr,
59 int client_connect(struct client_task *ct, struct sched *s,
60 struct btr_node *parent, struct btr_node *child);
61 int client_open(int argc, char *argv[], struct client_task **ct_ptr,
62 int *loglevel, struct btr_node *parent, struct btr_node *child,