GNUnet 0.22.0
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...
 

Functions

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)
static
Parameters
clsa struct SendState

Definition at line 51 of file testing_dhtu_cmd_send.c.

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

References GNUNET_free.

Referenced by GNUNET_TESTING_DHTU_cmd_send().

Here is the caller graph for this function:

◆ send_traits()

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

Return trains of the send command.

Parameters
clsclosure.
[out]retresult
traitname of the trait.
indexindex number of the object to offer.
Returns
GNUNET_OK on success. GNUNET_NO if no trait was found

Definition at line 70 of file testing_dhtu_cmd_send.c.

74{
75 return GNUNET_NO;
76}
@ GNUNET_NO

References GNUNET_NO.

Referenced by GNUNET_TESTING_DHTU_cmd_send().

Here is the caller graph for this function:

◆ send_run()

static void send_run ( void *  cls,
struct GNUNET_TESTING_Interpreter is 
)
static

Run the 'send' command.

Parameters
clsclosure.
isinterpreter state.

Definition at line 86 of file testing_dhtu_cmd_send.c.

88{
89 struct SendState *ss = cls;
90
92}
void GNUNET_TESTING_async_finish(struct GNUNET_TESTING_AsyncContext *ac)
The asynchronous command of ac has finished.
struct GNUNET_TESTING_AsyncContext ac
Mandatory context for async commands.

References SendState::ac, and GNUNET_TESTING_async_finish().

Referenced by GNUNET_TESTING_DHTU_cmd_send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GNUNET_TESTING_DHTU_cmd_send()

struct GNUNET_TESTING_Command GNUNET_TESTING_DHTU_cmd_send ( const char *  label)

Definition at line 96 of file testing_dhtu_cmd_send.c.

97{
98 struct SendState *ss;
99
100 ss = GNUNET_new (struct SendState);
101
102 {
103 struct GNUNET_TESTING_Command cmd = {
104 .cls = ss,
105 .run = &send_run,
106 .ac = &ss->ac,
107 .cleanup = &send_cleanup,
108 .traits = &send_traits
109 };
110
112 label);
113 return cmd;
114 }
115}
void GNUNET_TESTING_set_label(struct GNUNET_TESTING_CommandLabel *label, const char *value)
Set label to value.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel 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.

References SendState::ac, GNUNET_TESTING_Command::cls, GNUNET_new, GNUNET_TESTING_set_label(), GNUNET_TESTING_Command::label, send_cleanup(), send_run(), and send_traits().

Here is the call graph for this function: