73 for (
unsigned int i = 0; NULL != traits[i].
trait_name; i++)
75 if ( (0 == strcmp (trait, traits[i].
trait_name)) &&
78 *
ret = (
void *) traits[i].
ptr;
83 "Trait %s/%u not found.\n",
static int ret
Return value of the commandline.
static int end
Set if we are to shutdown all services (including ARM).
#define GNUNET_TESTING_SIMPLE_NETJAIL_TRAITS(op)
Call op on all simple traits.
#define GNUNET_TESTING_INDEXED_TRAITS(op)
Call op on all indexed traits.
#define GNUNET_TESTING_SIMPLE_TRAITS(op)
Call op on all simple traits.
#define GNUNET_TESTING_MAKE_IMPL_SIMPLE_TRAIT(name, type)
Create C implementation for a trait with name name for statically allocated data of type type.
#define GNUNET_TESTING_MAKE_IMPL_INDEXED_TRAIT(name, type)
Create C implementation for a trait with name name for statically allocated data of type type.
#define GNUNET_log(kind,...)
GNUNET_GenericReturnValue
Named constants for return values.
A struct GNUNET_TESTING_Trait can be used to exchange data between cmds.
const void * ptr
Pointer to the piece of data to offer.
unsigned int index
Index number associated with the trait.
const char * trait_name
Trait type, for example "reserve-pub" or "coin-priv".
enum GNUNET_GenericReturnValue GNUNET_TESTING_get_trait(const struct GNUNET_TESTING_Trait *traits, const void **ret, const char *trait, unsigned int index)
Pick the chosen trait from the traits array.
struct GNUNET_TESTING_Trait GNUNET_TESTING_trait_end()
End a trait array.