GNUnet  0.16.x
Data Structures | Functions
testing_dhtu_cmd_send.c File Reference
#include "platform.h"
#include "gnunet_testing_ng_lib.h"
#include "gnunet_testing_netjail_lib.h"
Include dependency graph for testing_dhtu_cmd_send.c:

Go to the source code of this file.

Data Structures

struct  SendState
 State for the 'send' command. More...


static void send_cleanup (void *cls)
static enum GNUNET_GenericReturnValue send_traits (void *cls, const void **ret, const char *trait, unsigned int index)
 Return trains of the send command. More...
static void send_run (void *cls, struct GNUNET_TESTING_Interpreter *is)
 Run the 'send' command. More...
struct GNUNET_TESTING_Command GNUNET_TESTING_DHTU_cmd_send (const char *label)

Function Documentation

◆ send_cleanup()

static void send_cleanup ( void *  cls)
clsa struct SendState

Definition at line 51 of file testing_dhtu_cmd_send.c.

52 {
53  struct SendState *ss = cls;
55  GNUNET_free (ss);
56 }
#define GNUNET_free(ptr)
Wrapper around free.
State for the 'send' command.

References GNUNET_free.

◆ send_traits()

static enum GNUNET_GenericReturnValue send_traits ( void *  cls,
const void **  ret,
const char *  trait,
unsigned int  index 

Return trains of the send command.

traitname of the trait.
indexindex number of the object to offer.
GNUNET_OK on success. GNUNET_NO if no trait was found

Definition at line 51 of file testing_dhtu_cmd_send.c.

74 {
75  return GNUNET_NO;
76 }
Definition: gnunet_common.h:94

◆ send_run()

static void send_run ( void *  cls,
struct GNUNET_TESTING_Interpreter is 

Run the 'send' command.

isinterpreter state.

Definition at line 86 of file testing_dhtu_cmd_send.c.

88 {
89  struct SendState *ss = cls;
91 #if 0
92  other_cmd = GNUNET_TESTING_interpreter_lookup_command (ss->other_label);
93  GNUNET_TESTING_get_trait_XXX (other_cmd,
94  &data);
95 #endif
97 }
uint32_t data
The data value.
void GNUNET_TESTING_async_finish(struct GNUNET_TESTING_AsyncContext *ac)
The asynchronous command of ac has finished.
const struct GNUNET_TESTING_Command * GNUNET_TESTING_interpreter_lookup_command(struct GNUNET_TESTING_Interpreter *is, const char *label)
Lookup command by label.
struct GNUNET_TESTING_AsyncContext ac
Mandatory context for async commands.


struct GNUNET_TESTING_Command GNUNET_TESTING_DHTU_cmd_send ( const char *  label)

Definition at line 86 of file testing_dhtu_cmd_send.c.

102 {
103  struct SendState *ss;
105  ss = GNUNET_new (struct SendState);
107  {
108  struct GNUNET_TESTING_Command cmd = {
109  .cls = ss,
110  .label = label,
111  .run = &send_run,
112  .ac = &ss->ac,
113  .cleanup = &send_cleanup,
114  .traits = &send_traits
115  };
117  return cmd;
118  }
119 }
#define GNUNET_new(type)
Allocate a struct or union of the given type.
A command to be run by the interpreter.
const char * label
Label for the command.
void * cls
Closure for all commands with command-specific context information.
static void send_cleanup(void *cls)
static void send_run(void *cls, struct GNUNET_TESTING_Interpreter *is)
Run the 'send' command.
static enum GNUNET_GenericReturnValue send_traits(void *cls, const void **ret, const char *trait, unsigned int index)
Return trains of the send command.