![]() |
GNUnet
0.11.x
|
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_signatures.h"
#include "gnunet_gns_service.h"
#include "gnunet_gnsrecord_lib.h"
#include "gnunet_dnsparser_lib.h"
#include "gnunet_testing_lib.h"
#include <inttypes.h>
Go to the source code of this file.
Macros | |
#define | TEST_RECORD_LABEL "test" |
#define | TEST_RECORD_A "1.2.3.4" |
#define | TEST_RRCOUNT 2 |
Functions | |
static void | print_bytes (void *buf, size_t buf_len, int fold) |
static void | print_record (const struct GNUNET_GNSRECORD_Data *rd) |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run. More... | |
int | main (int argc, char *const *argv) |
The main function of the test vector generation tool. More... | |
#define TEST_RECORD_LABEL "test" |
Definition at line 35 of file gnunet-gnsrecord-tvg.c.
Referenced by run().
#define TEST_RECORD_A "1.2.3.4" |
Definition at line 36 of file gnunet-gnsrecord-tvg.c.
Referenced by run().
#define TEST_RRCOUNT 2 |
Definition at line 37 of file gnunet-gnsrecord-tvg.c.
Referenced by run().
|
static |
Definition at line 40 of file gnunet-gnsrecord-tvg.c.
Referenced by print_record(), and run().
|
static |
Definition at line 57 of file gnunet-gnsrecord-tvg.c.
References GNUNET_GNSRECORD_Data::data, GNUNET_GNSRECORD_Data::data_size, GNUNET_GNSRECORD_Data::expiration_time, GNUNET_GNSRECORD_Data::flags, print_bytes(), and GNUNET_GNSRECORD_Data::record_type.
Referenced by run().
|
static |
Main function that will be run.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 84 of file gnunet-gnsrecord-tvg.c.
References GNUNET_TIME_Absolute::abs_value_us, data, GNUNET_GNSRECORD_Data::data, data_size, GNUNET_GNSRECORD_Data::data_size, GNUNET_GNSRECORD_Block::ecdsa_block, GNUNET_IDENTITY_PrivateKey::ecdsa_key, GNUNET_GNSRECORD_Data::expiration_time, GNUNET_GNSRECORD_Data::flags, GNUNET_assert, GNUNET_CRYPTO_ecdsa_key_create(), GNUNET_DNSPARSER_TYPE_A, GNUNET_GNSRECORD_block_create(), GNUNET_GNSRECORD_records_get_size(), GNUNET_GNSRECORD_records_serialize(), GNUNET_GNSRECORD_RF_PRIVATE, GNUNET_GNSRECORD_string_to_value(), GNUNET_GNSRECORD_TYPE_PKEY, GNUNET_IDENTITY_key_get_length(), GNUNET_IDENTITY_key_get_public(), GNUNET_malloc, GNUNET_OK, GNUNET_STRINGS_data_to_string(), GNUNET_TIME_absolute_get(), print_bytes(), print_record(), GNUNET_GNSRECORD_EcdsaBlock::purpose, GNUNET_GNSRECORD_Data::record_type, GNUNET_CRYPTO_EccSignaturePurpose::size, TEST_RECORD_A, TEST_RECORD_LABEL, TEST_RRCOUNT, and GNUNET_IDENTITY_PrivateKey::type.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function of the test vector generation tool.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 187 of file gnunet-gnsrecord-tvg.c.
References GNUNET_assert, GNUNET_GETOPT_OPTION_END, GNUNET_log_setup(), GNUNET_OK, GNUNET_PROGRAM_run(), and run().