GNUnet  0.11.x
Data Structures | Macros | Functions
testbed_api_cmd_netjail_start_testbed.c File Reference
#include "platform.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testbed_ng_service.h"
#include "testbed_api.h"
#include "testbed_api_hosts.h"
#include "testbed_helper.h"
Include dependency graph for testbed_api_cmd_netjail_start_testbed.c:

Go to the source code of this file.

Data Structures

struct  HelperMessage
 
struct  NetJailState
 
struct  TestbedCount
 

Macros

#define NETJAIL_EXEC_SCRIPT   "./../testbed/netjail_exec.sh"
 

Functions

static void netjail_exec_cleanup (void *cls, const struct GNUNET_TESTING_Command *cmd)
 
static int netjail_exec_traits (void *cls, const void **ret, const char *trait, unsigned int index)
 
int GNUNET_TESTBED_get_trait_helper_handles (const struct GNUNET_TESTING_Command *cmd, struct GNUNET_HELPER_Handle ***helper)
 Offer handles to testbed helper from trait. More...
 
int GNUNET_TESTBED_get_trait_helper_messages (const struct GNUNET_TESTING_Command *cmd, struct HelperMessage ***hp_messages_head)
 Offer handles to testbed helper from trait. More...
 
static void clear_msg (void *cls, int result)
 Continuation function from GNUNET_HELPER_send() More...
 
static int helper_mst (void *cls, const struct GNUNET_MessageHeader *message)
 Functions with this signature are called whenever a complete message is received by the tokenizer. More...
 
static void exp_cb (void *cls)
 
static struct GNUNET_CMDS_HelperInitcreate_helper_init_msg_ (char *m_char, char *n_char, const char *plugin_name)
 
static void start_testbed (struct NetJailState *ns, struct GNUNET_CONFIGURATION_Handle *config, char *m_char, char *n_char)
 
static void netjail_exec_run (void *cls, const struct GNUNET_TESTING_Command *cmd, struct GNUNET_TESTING_Interpreter *is)
 Run the "hello world" CMD. More...
 
static int netjail_start_finish (void *cls, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
 
struct GNUNET_TESTING_Command GNUNET_TESTBED_cmd_netjail_start_testbed (const char *label, char *local_m, char *global_n, char *plugin_name)
 Create command. More...
 

Macro Definition Documentation

◆ NETJAIL_EXEC_SCRIPT

#define NETJAIL_EXEC_SCRIPT   "./../testbed/netjail_exec.sh"

Definition at line 33 of file testbed_api_cmd_netjail_start_testbed.c.

Referenced by start_testbed().

Function Documentation

◆ netjail_exec_cleanup()

static void netjail_exec_cleanup ( void *  cls,
const struct GNUNET_TESTING_Command cmd 
)
static
Parameters
clsclosure
cmdcurrent CMD being cleaned up.

Definition at line 118 of file testbed_api_cmd_netjail_start_testbed.c.

References NetJailState::binary_name, GNUNET_free, and ns.

Referenced by GNUNET_TESTBED_cmd_netjail_start_testbed().

120 {
121  struct NetJailState *ns = cls;
122 
123  GNUNET_free (ns->binary_name);
124 }
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
#define GNUNET_free(ptr)
Wrapper around free.
Here is the caller graph for this function:

◆ netjail_exec_traits()

static int netjail_exec_traits ( void *  cls,
const void **  ret,
const char *  trait,
unsigned int  index 
)
static
Parameters
clsclosure.
[out]retresult
traitname of the trait.
indexindex number of the object to offer.
Returns
GNUNET_OK on success.

Definition at line 137 of file testbed_api_cmd_netjail_start_testbed.c.

References GNUNET_TESTING_get_trait(), GNUNET_TESTING_trait_end(), NetJailState::helper, NetJailState::hp_messages_head, GNUNET_TESTING_Trait::index, and ns.

Referenced by GNUNET_TESTBED_cmd_netjail_start_testbed().

141 {
142  struct NetJailState *ns = cls;
143  struct GNUNET_HELPER_Handle **helper = ns->helper;
144  struct HelperMessage *hp_messages_head = ns->hp_messages_head;
145 
146 
147  struct GNUNET_TESTING_Trait traits[] = {
148  {
149  .index = 0,
150  .trait_name = "helper_handles",
151  .ptr = (const void *) helper,
152  },
153  {
154  .index = 1,
155  .trait_name = "hp_msgs_head",
156  .ptr = (const void *) hp_messages_head,
157  },
159  };
160 
161  return GNUNET_TESTING_get_trait (traits,
162  ret,
163  trait,
164  index);
165 }
The handle to a helper process.
Definition: helper.c:78
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
struct GNUNET_HELPER_Handle ** helper
The process handle.
unsigned int index
Index number associated with the trait.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
int GNUNET_TESTING_get_trait(const struct GNUNET_TESTING_Trait *traits, const void **ret, const char *trait, unsigned int index)
Extract a trait.
struct HelperMessage * hp_messages_head
struct GNUNET_TESTING_Trait GNUNET_TESTING_trait_end(void)
"end" trait.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_TESTBED_get_trait_helper_messages()

int GNUNET_TESTBED_get_trait_helper_messages ( const struct GNUNET_TESTING_Command cmd,
struct HelperMessage ***  hp_messages_head 
)

Offer handles to testbed helper from trait.

Parameters
cmdcommand to extract the message from.
ptpointer to message.
Returns
GNUNET_OK on success.

Definition at line 194 of file testbed_api_cmd_netjail_start_testbed.c.

References GNUNET_TESTING_Command::cls, and GNUNET_TESTING_Command::traits.

198 {
199  return cmd->traits (cmd->cls,
200  (const void **) hp_messages_head,
201  "hp_msgs_head",
202  (unsigned int) 1);
203 }
int(* traits)(void *cls, const void **ret, const char *trait, unsigned int index)
Extract information from a command that is useful for other commands.
void * cls
Closure for all commands with command-specific context information.

◆ clear_msg()

static void clear_msg ( void *  cls,
int  result 
)
static

Continuation function from GNUNET_HELPER_send()

Parameters
clsclosure
resultGNUNET_OK on success, GNUNET_NO if helper process died GNUNET_SYSERR during GNUNET_HELPER_stop

Definition at line 215 of file testbed_api_cmd_netjail_start_testbed.c.

References TestbedCount::count, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, NetJailState::msg, ns, TestbedCount::ns, and NetJailState::shandle.

Referenced by netjail_start_finish(), and start_testbed().

216 {
217  struct TestbedCount *tbc = cls;
218  struct NetJailState *ns = tbc->ns;
219 
221  "clear_msg tbc->count: %d\n",
222  tbc->count);
223  GNUNET_assert (NULL != ns->shandle[tbc->count - 1]);
224  ns->shandle[tbc->count - 1] = NULL;
225  GNUNET_free (ns->msg[tbc->count - 1]);
226  ns->msg[tbc->count - 1] = NULL;
227 }
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
struct GNUNET_HELPER_SendHandle ** shandle
The send handle for the helper.
struct GNUNET_MessageHeader ** msg
The message corresponding to send handle.
#define GNUNET_log(kind,...)
#define GNUNET_free(ptr)
Wrapper around free.
Here is the caller graph for this function:

◆ helper_mst()

static int helper_mst ( void *  cls,
const struct GNUNET_MessageHeader message 
)
static

Functions with this signature are called whenever a complete message is received by the tokenizer.

Do not call GNUNET_SERVER_mst_destroy in callback

Parameters
clsclosure
clientidentification of the client
messagethe actual message
Returns
GNUNET_OK on success, GNUNET_SYSERR to stop further processing

Definition at line 243 of file testbed_api_cmd_netjail_start_testbed.c.

References HelperMessage::bytes_msg, TestbedCount::count, GNUNET_CONTAINER_DLL_insert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED, GNUNET_MESSAGE_TYPE_CMDS_HELPER_PEER_STARTED, GNUNET_MESSAGE_TYPE_CMDS_HELPER_REPLY, GNUNET_new, GNUNET_OK, NetJailState::hp_messages_head, NetJailState::hp_messages_tail, ns, TestbedCount::ns, NetJailState::number_of_local_test_finished, NetJailState::number_of_peers_started, NetJailState::number_of_testbeds_started, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.

Referenced by start_testbed().

244 {
245  struct TestbedCount *tbc = cls;
246  struct NetJailState *ns = tbc->ns;
247  struct HelperMessage *hp_msg;
248 
249  if (GNUNET_MESSAGE_TYPE_CMDS_HELPER_REPLY == ntohs (message->type))
250  {
252  "helper_mst tbc->count: %d\n",
253  tbc->count);
254  // GNUNET_TESTBED_extract_cfg (host, message);
256  "Received message from helper.\n");
258  }
260  message->type))
261  {
264  "number_of_peers_started: %d\n",
266  }
268  message->type))
269  {
271  }
272  else
273  {
274  hp_msg = GNUNET_new (struct HelperMessage);
275  hp_msg->bytes_msg = message->size;
276  memcpy (&hp_msg[1], message, message->size);
278  hp_msg);
279  }
280 
281  return GNUNET_OK;
282 }
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_PEER_STARTED
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_REPLY
The reply message from gnunet-cmds-helper.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
struct HelperMessage * hp_messages_tail
uint16_t bytes_msg
Size of the original message.
struct HelperMessage * hp_messages_head
#define GNUNET_log(kind,...)
Here is the caller graph for this function:

◆ exp_cb()

static void exp_cb ( void *  cls)
static

Definition at line 286 of file testbed_api_cmd_netjail_start_testbed.c.

References GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, and GNUNET_TESTING_interpreter_fail().

Referenced by GNUNET_HELPER_start(), and start_testbed().

287 {
288  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called exp_cb.\n");
290 }
void GNUNET_TESTING_interpreter_fail()
Current command failed, clean up and fail the test case.
#define GNUNET_log(kind,...)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_helper_init_msg_()

static struct GNUNET_CMDS_HelperInit* create_helper_init_msg_ ( char *  m_char,
char *  n_char,
const char *  plugin_name 
)
static

Definition at line 294 of file testbed_api_cmd_netjail_start_testbed.c.

References GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT, GNUNET_CMDS_HelperInit::header, msg, GNUNET_CMDS_HelperInit::plugin_name_size, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.

Referenced by start_testbed().

297 {
298  struct GNUNET_CMDS_HelperInit *msg;
299  uint16_t plugin_name_len;
300  uint16_t msg_size;
301 
302  GNUNET_assert (NULL != plugin_name);
303  plugin_name_len = strlen (plugin_name);
304  msg_size = sizeof(struct GNUNET_CMDS_HelperInit) + plugin_name_len;
306  "msg_size: %d \n",
307  msg_size);
308  msg = GNUNET_malloc (msg_size);
309  msg->header.size = htons (msg_size);
311  msg->plugin_name_size = htons (plugin_name_len);
312  GNUNET_memcpy ((char *) &msg[1],
313  plugin_name,
314  plugin_name_len);
315  return msg;
316 }
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
Initialization message for gnunet-cmds-testbed to start cmd binary.
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT
The initialization message towards gnunet-cmds-helper.
#define GNUNET_log(kind,...)
static char * plugin_name
Name of our plugin.
#define GNUNET_malloc(size)
Wrapper around malloc.
Here is the caller graph for this function:

◆ start_testbed()

static void start_testbed ( struct NetJailState ns,
struct GNUNET_CONFIGURATION_Handle config,
char *  m_char,
char *  n_char 
)
static

Definition at line 320 of file testbed_api_cmd_netjail_start_testbed.c.

References clear_msg(), TestbedCount::count, create_helper_init_msg_(), exp_cb(), NetJailState::global_n, GNUNET_array_append, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_HELPER_send(), GNUNET_HELPER_start(), GNUNET_log, GNUNET_new, GNUNET_NO, GNUNET_TESTING_interpreter_fail(), GNUNET_YES, GNUNET_CMDS_HelperInit::header, NetJailState::helper, HELPER_CMDS_BINARY, helper_mst(), NetJailState::local_m, m, msg, NetJailState::msg, NetJailState::n_helper, NetJailState::n_msg, NetJailState::n_shandle, NETJAIL_EXEC_SCRIPT, ns, TestbedCount::ns, NetJailState::plugin_name, and NetJailState::shandle.

Referenced by netjail_exec_run().

324 {
325  // struct GNUNET_CONFIGURATION_Handle *cfg;
326  struct GNUNET_CMDS_HelperInit *msg;
327  struct TestbedCount *tbc;
328  char *const script_argv[] = {NETJAIL_EXEC_SCRIPT,
329  m_char,
330  n_char,
332  ns->global_n,
333  ns->local_m,
334  NULL};
335  unsigned int m = atoi (m_char);
336  unsigned int n = atoi (n_char);
337 
339  "m: %d n: %d\n",
340  m,
341  n);
342 
343  tbc = GNUNET_new (struct TestbedCount);
344  tbc->ns = ns;
345  tbc->count = (n - 1) * atoi (ns->local_m) + m;
346 
347  // cfg = GNUNET_CONFIGURATION_dup (config);
348 
349  // TODO We do not need this?
350  /*GNUNET_array_append (ns->host, ns->n_host,
351  GNUNET_TESTBED_host_create_with_id (tbc->count - 1,
352  NULL,
353  NULL,
354  cfg,
355  0));*/
356 
357  /*if ((GNUNET_YES != GNUNET_DISK_file_test ("test_testbed_api.conf")) ||
358  (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (config,
359  "test_testbed_api.conf")))
360  {
361  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
362  _ (
363  "Unreadable or malformed configuration file `%s', exit ...\n"),
364  "test_testbed_api.conf");
365  }*/
366 
368  GNUNET_YES,
370  script_argv,
371  &helper_mst,
372  &exp_cb,
373  tbc));
374 
376  "First using helper %d %d\n",
377  tbc->count - 1,
378  ns->n_helper);
379  struct GNUNET_HELPER_Handle *helper = ns->helper[tbc->count - 1];
380 
382  "First using helper %d %d %p\n",
383  tbc->count - 1,
384  ns->n_helper,
385  helper);
386 
387  msg = create_helper_init_msg_ (m_char,
388  n_char,
389  ns->plugin_name);
390  GNUNET_array_append (ns->msg, ns->n_msg, &msg->header);
391 
393  helper,
394  &msg->header,
395  GNUNET_NO,
396  &clear_msg,
397  tbc));
398 
400  "Message %d send!\n",
401  tbc->count);
402 
403  if (NULL == ns->shandle[tbc->count - 1])
404  {
406  "Send handle is NULL!\n");
407  GNUNET_free (msg);
409  }
410 }
void GNUNET_TESTING_interpreter_fail()
Current command failed, clean up and fail the test case.
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
static void exp_cb(void *cls)
The handle to a helper process.
Definition: helper.c:78
struct GNUNET_HELPER_Handle * GNUNET_HELPER_start(int with_control_pipe, const char *binary_name, char *const binary_argv[], GNUNET_MessageTokenizerCallback cb, GNUNET_HELPER_ExceptionCallback exp_cb, void *cb_cls)
Starts a helper and begins reading from it.
Definition: helper.c:491
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_INIT.
#define HELPER_CMDS_BINARY
Cmds Helper binary name.
Definition: testbed_api.h:43
#define GNUNET_new(type)
Allocate a struct or union of the given type.
static int helper_mst(void *cls, const struct GNUNET_MessageHeader *message)
Functions with this signature are called whenever a complete message is received by the tokenizer...
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
Definition: gnunet-arm.c:104
Initialization message for gnunet-cmds-testbed to start cmd binary.
struct GNUNET_HELPER_Handle ** helper
The process handle.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
struct GNUNET_HELPER_SendHandle ** shandle
The send handle for the helper.
struct GNUNET_MessageHeader ** msg
The message corresponding to send handle.
static void clear_msg(void *cls, int result)
Continuation function from GNUNET_HELPER_send()
static struct GNUNET_CMDS_HelperInit * create_helper_init_msg_(char *m_char, char *n_char, const char *plugin_name)
struct GNUNET_HELPER_SendHandle * GNUNET_HELPER_send(struct GNUNET_HELPER_Handle *h, const struct GNUNET_MessageHeader *msg, int can_drop, GNUNET_HELPER_Continuation cont, void *cont_cls)
Send an message to the helper.
Definition: helper.c:657
#define GNUNET_log(kind,...)
#define GNUNET_free(ptr)
Wrapper around free.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netjail_exec_run()

static void netjail_exec_run ( void *  cls,
const struct GNUNET_TESTING_Command cmd,
struct GNUNET_TESTING_Interpreter is 
)
static

Run the "hello world" CMD.

Parameters
clsclosure.
cmdCMD being run.
isinterpreter state.

Definition at line 421 of file testbed_api_cmd_netjail_start_testbed.c.

References config, NetJailState::global_n, GNUNET_CONFIGURATION_create(), NetJailState::local_m, ns, and start_testbed().

Referenced by GNUNET_TESTBED_cmd_netjail_start_testbed().

424 {
425  char str_m[12];
426  char str_n[12];
427  struct NetJailState *ns = cls;
430 
431  for (int i = 1; i <= atoi (ns->global_n); i++) {
432  for (int j = 1; j <= atoi (ns->local_m); j++)
433  {
434  sprintf (str_n, "%d", i);
435  sprintf (str_m, "%d", j);
436  start_testbed (ns, config,
437  str_m,
438  str_n);
439  }
440  }
441 }
struct GNUNET_CONFIGURATION_Handle * GNUNET_CONFIGURATION_create(void)
Create a new configuration object.
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
static const struct GNUNET_CONFIGURATION_Handle * config
static void start_testbed(struct NetJailState *ns, struct GNUNET_CONFIGURATION_Handle *config, char *m_char, char *n_char)
configuration data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netjail_start_finish()

static int netjail_start_finish ( void *  cls,
GNUNET_SCHEDULER_TaskCallback  cont,
void *  cont_cls 
)
static

Definition at line 445 of file testbed_api_cmd_netjail_start_testbed.c.

References clear_msg(), TestbedCount::count, NetJailState::global_n, GNUNET_array_append, GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELPER_send(), GNUNET_log, GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED, GNUNET_new, GNUNET_NO, GNUNET_YES, GNUNET_CMDS_ALL_PEERS_STARTED::header, NetJailState::helper, NetJailState::local_m, NetJailState::msg, NetJailState::n_msg, NetJailState::n_shandle, ns, TestbedCount::ns, NetJailState::number_of_local_test_finished, NetJailState::number_of_peers_started, NetJailState::number_of_testbeds_started, ret, sh, NetJailState::shandle, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.

Referenced by GNUNET_TESTBED_cmd_netjail_start_testbed().

448 {
449  unsigned int ret = GNUNET_NO;
450  struct NetJailState *ns = cls;
451  unsigned int total_number = atoi (ns->local_m) * atoi (ns->global_n);
452  struct GNUNET_CMDS_ALL_PEERS_STARTED *reply;
453  size_t msg_length;
454  struct GNUNET_HELPER_Handle *helper;
455  struct TestbedCount *tbc;
456 
457  if (ns->number_of_local_test_finished == total_number)
458  {
459  ret = GNUNET_YES;
460  cont (cont_cls);
461  }
462 
463  if (ns->number_of_testbeds_started == total_number)
464  {
466  "All helpers started!\n");
468  }
469 
470  if (ns->number_of_peers_started == total_number)
471  {
473  "All peers started!\n");
474 
475  for (int i = 1; i <= atoi (ns->global_n); i++) {
476  for (int j = 1; j <= atoi (ns->local_m); j++)
477  {
478  tbc = GNUNET_new (struct TestbedCount);
479  tbc->ns = ns;
480  // TODO This needs to be more generic. As we send more messages back and forth, we can not grow the arrays again and again, because this is to error prone.
481  tbc->count = (i - 1) * atoi (ns->local_m) + j + total_number;
483  "Second using helper %d %d %d\n",
484  tbc->count - 1 - total_number,
485  i,
486  j);
487  helper = ns->helper[tbc->count - 1 - total_number];
488  msg_length = sizeof(struct GNUNET_CMDS_ALL_PEERS_STARTED);
489  reply = GNUNET_new (struct GNUNET_CMDS_ALL_PEERS_STARTED);
490  reply->header.type = htons (
492  reply->header.size = htons ((uint16_t) msg_length);
493 
494  GNUNET_array_append (ns->msg, ns->n_msg, &reply->header);
495 
497  helper,
498  &reply->header,
499  GNUNET_NO,
500  &clear_msg,
501  tbc);
502 
503  GNUNET_array_append (ns->shandle, ns->n_shandle, sh);
504 
506  "All peers started message %d send!\n",
507  tbc->count);
508  }
509  }
510  ns->number_of_peers_started = 0;
511  }
512  return ret;
513 }
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
The handle to a helper process.
Definition: helper.c:78
Entry in the queue of messages we need to transmit to the helper.
Definition: helper.c:36
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
#define GNUNET_new(type)
Allocate a struct or union of the given type.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format...
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
struct GNUNET_HELPER_Handle ** helper
The process handle.
static struct SolverHandle * sh
static struct GNUNET_NAMESTORE_Handle * ns
Handle to the namestore.
Definition: gnunet-abd.c:41
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED.
struct GNUNET_HELPER_SendHandle ** shandle
The send handle for the helper.
struct GNUNET_MessageHeader ** msg
The message corresponding to send handle.
static void clear_msg(void *cls, int result)
Continuation function from GNUNET_HELPER_send()
struct GNUNET_HELPER_SendHandle * GNUNET_HELPER_send(struct GNUNET_HELPER_Handle *h, const struct GNUNET_MessageHeader *msg, int can_drop, GNUNET_HELPER_Continuation cont, void *cont_cls)
Send an message to the helper.
Definition: helper.c:657
#define GNUNET_log(kind,...)
#define GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED
Here is the call graph for this function:
Here is the caller graph for this function: