| 1 |
/* |
| 2 |
* pkd_daemon.h -- tests use this interface to start, stop pkd |
| 3 |
* instances and get results |
| 4 |
* |
| 5 |
* (c) 2014 Jon Simons |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef __PKD_DAEMON_H__ |
| 9 |
#define __PKD_DAEMON_H__ |
| 10 |
|
| 11 |
#include "config.h" |
| 12 |
|
| 13 |
enum pkd_hostkey_type_e { |
| 14 |
PKD_RSA, |
| 15 |
PKD_ED25519, |
| 16 |
PKD_ECDSA |
| 17 |
}; |
| 18 |
|
| 19 |
struct pkd_daemon_args { |
| 20 |
enum pkd_hostkey_type_e type; |
| 21 |
const char *hostkeypath; |
| 22 |
|
| 23 |
struct { |
| 24 |
const uint8_t *buf; |
| 25 |
size_t len; |
| 26 |
} payload; |
| 27 |
|
| 28 |
uint64_t rekey_data_limit; |
| 29 |
|
| 30 |
int original_dir_fd; |
| 31 |
|
| 32 |
struct { |
| 33 |
int list; |
| 34 |
|
| 35 |
int log_stdout; |
| 36 |
int log_stderr; |
| 37 |
int libssh_log_level; |
| 38 |
|
| 39 |
const char *testname; |
| 40 |
const char *testmatch; |
| 41 |
unsigned int iterations; |
| 42 |
|
| 43 |
struct { |
| 44 |
const char *argv_mkdtemp_str; |
| 45 |
char *mkdtemp_str; |
| 46 |
} socket_wrapper; |
| 47 |
|
| 48 |
struct { |
| 49 |
const char *argv_mkdtemp_str; |
| 50 |
char *mkdtemp_str; |
| 51 |
} temp_dir; |
| 52 |
} opts; |
| 53 |
}; |
| 54 |
|
| 55 |
struct pkd_result { |
| 56 |
int ok; |
| 57 |
}; |
| 58 |
|
| 59 |
int pkd_start(struct pkd_daemon_args *args); |
| 60 |
void pkd_stop(struct pkd_result *out); |
| 61 |
|
| 62 |
#endif /* __PKD_DAEMON_H__ */ |