diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-17 14:59:10 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-07-17 14:59:10 +0000 |
commit | eb3f4006fc74ef71296e53d83b1d4b6990b639d1 (patch) | |
tree | 39704da526a6107925ebec9684d6a1e7d65f6e4e /src/testbed/testbed_api_hosts.h | |
parent | 90b5375e31986484f5007ec62c57f455bb8178dc (diff) | |
download | gnunet-eb3f4006fc74ef71296e53d83b1d4b6990b639d1.tar.gz gnunet-eb3f4006fc74ef71296e53d83b1d4b6990b639d1.zip |
helper integration to GNUNET_TESTBED_host_run_()
todo: add controller start callback
with the configuration with which the controller is started
Diffstat (limited to 'src/testbed/testbed_api_hosts.h')
-rw-r--r-- | src/testbed/testbed_api_hosts.h | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/src/testbed/testbed_api_hosts.h b/src/testbed/testbed_api_hosts.h index cc88d78a3..21e9520e2 100644 --- a/src/testbed/testbed_api_hosts.h +++ b/src/testbed/testbed_api_hosts.h | |||
@@ -39,17 +39,12 @@ struct GNUNET_TESTBED_HelperHandle | |||
39 | /** | 39 | /** |
40 | * The process handle | 40 | * The process handle |
41 | */ | 41 | */ |
42 | struct GNUNET_OS_Process *process; | 42 | struct GNUNET_HELPER_Handle *helper; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Pipe connecting to stdin of the process. | 45 | * The send handle for the helper |
46 | */ | 46 | */ |
47 | struct GNUNET_DISK_PipeHandle *cpipe_in; | 47 | struct GNUNET_HELPER_SendHandle *helper_shandle; |
48 | |||
49 | /** | ||
50 | * Pipe from the stdout of the process. | ||
51 | */ | ||
52 | struct GNUNET_DISK_PipeHandle *cpipe_out; | ||
53 | 48 | ||
54 | /** | 49 | /** |
55 | * The port number for ssh; used for helpers starting ssh | 50 | * The port number for ssh; used for helpers starting ssh |
@@ -59,7 +54,22 @@ struct GNUNET_TESTBED_HelperHandle | |||
59 | /** | 54 | /** |
60 | * The ssh destination string; used for helpers starting ssh | 55 | * The ssh destination string; used for helpers starting ssh |
61 | */ | 56 | */ |
62 | char *dst; | 57 | char *dst; |
58 | |||
59 | /** | ||
60 | * The helper exception callback | ||
61 | */ | ||
62 | GNUNET_HELPER_ExceptionCallback exp_cb; | ||
63 | |||
64 | /** | ||
65 | * The closure for exp_cb | ||
66 | */ | ||
67 | void *exp_cb_cls; | ||
68 | |||
69 | /** | ||
70 | * Is the helper stopped? | ||
71 | */ | ||
72 | int is_stopped; | ||
63 | }; | 73 | }; |
64 | 74 | ||
65 | 75 | ||
@@ -140,13 +150,25 @@ struct GNUNET_TESTBED_HelperHandle; | |||
140 | * Runs the process via 'ssh' at the specified host, or locally. | 150 | * Runs the process via 'ssh' at the specified host, or locally. |
141 | * Essentially an SSH-wrapper around the 'gnunet_helper_lib.h' API. | 151 | * Essentially an SSH-wrapper around the 'gnunet_helper_lib.h' API. |
142 | * | 152 | * |
153 | * @param controller_ip the ip address of the controller. Will be set as TRUSTED | ||
154 | * host when starting testbed controller at host | ||
143 | * @param host host to use, use "NULL" for localhost | 155 | * @param host host to use, use "NULL" for localhost |
144 | * @param binary_argv binary name and command-line arguments to give to the binary | 156 | * @param binary_argv binary name and command-line arguments to give to the |
157 | * binary | ||
158 | * @param cfg template configuration to use for the remote controller; the | ||
159 | * remote controller will be started with a slightly modified | ||
160 | * configuration (port numbers, unix domain sockets and service home | ||
161 | * values are changed as per TESTING library on the remote host) | ||
162 | * @param cb the callback to run when helper process dies; cannot be NULL | ||
163 | * @param cb_cls the closure for the above callback | ||
145 | * @return handle to terminate the command, NULL on error | 164 | * @return handle to terminate the command, NULL on error |
146 | */ | 165 | */ |
147 | struct GNUNET_TESTBED_HelperHandle * | 166 | struct GNUNET_TESTBED_HelperHandle * |
148 | GNUNET_TESTBED_host_run_ (const struct GNUNET_TESTBED_Host *host, | 167 | GNUNET_TESTBED_host_run_ (const char *controller_ip, |
149 | char *const binary_argv[]); | 168 | const struct GNUNET_TESTBED_Host *host, |
169 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
170 | GNUNET_HELPER_ExceptionCallback cb, | ||
171 | void *cb_cls); | ||
150 | 172 | ||
151 | 173 | ||
152 | /** | 174 | /** |
@@ -193,7 +215,7 @@ GNUNET_TESTBED_is_host_registered_ (const struct GNUNET_TESTBED_Host *host, | |||
193 | */ | 215 | */ |
194 | struct GNUNET_TESTBED_HelperInit * | 216 | struct GNUNET_TESTBED_HelperInit * |
195 | GNUNET_TESTBED_create_helper_init_msg_ (const char *cname, | 217 | GNUNET_TESTBED_create_helper_init_msg_ (const char *cname, |
196 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 218 | const struct GNUNET_CONFIGURATION_Handle *cfg); |
197 | 219 | ||
198 | 220 | ||
199 | 221 | ||