GNUnet 0.22.1
gnunet-hello.c File Reference

Export/import/print HELLOs. More...

#include "gnunet_common.h"
#include "platform.h"
#include "gnunet_time_lib.h"
#include "gnunet_util_lib.h"
#include "gnunet_hello_uri_lib.h"
#include "gnunet_peerstore_service.h"
Include dependency graph for gnunet-hello.c:

Go to the source code of this file.

Functions

static void shutdown_task (void *cls)
 Task run in monitor mode when the user presses CTRL-C to abort. More...
 
static void print_hello_addrs (void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
 Callback function used to extract URIs from a builder. More...
 
static void hello_iter (void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
 
static void hello_store_success (void *cls, int success)
 
static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
 Main function that will be run by the scheduler. More...
 
int main (int argc, char *const *argv)
 The main function to obtain peer information from CORE. More...
 

Variables

static int ret
 Return code. More...
 
static struct GNUNET_PEERSTORE_Handlepeerstore_handle
 
static struct GNUNET_PEERSTORE_IterateContextiter_ctx
 PEERSTORE iteration context. More...
 
static struct GNUNET_PEERSTORE_StoreHelloContextshc
 HELLO store context handle. More...
 
static struct GNUNET_CRYPTO_EddsaPrivateKey my_private_key
 Peer private key. More...
 
static struct GNUNET_PeerIdentity my_full_id
 Peer identity. More...
 
static int export_own_hello
 HELLO export option -H. More...
 
static char * expirationstring
 Optional expiration string -E. More...
 
static struct GNUNET_TIME_Relative hello_validity
 Expiration time for exported hello. More...
 
static enum GNUNET_GenericReturnValue binary_output
 HELLO export/import format option. More...
 
static int print_hellos
 Hello list option -D. More...
 
static enum GNUNET_GenericReturnValue import_hello
 HELLO import option -I. More...
 

Detailed Description

Export/import/print HELLOs.

Author
Nathan Evans

Definition in file gnunet-hello.c.

Function Documentation

◆ shutdown_task()

static void shutdown_task ( void *  cls)
static

Task run in monitor mode when the user presses CTRL-C to abort.

Stops monitoring activity.

Parameters
clsNULL

Definition at line 101 of file gnunet-hello.c.

102{
103 (void) cls;
104 if (NULL != shc)
105 {
107 shc = NULL;
108 }
109 if (NULL != iter_ctx)
110 {
112 }
113 if (NULL != peerstore_handle)
114 {
116 peerstore_handle = NULL;
117 }
118}
static struct GNUNET_PEERSTORE_IterateContext * iter_ctx
PEERSTORE iteration context.
Definition: gnunet-hello.c:47
static struct GNUNET_PEERSTORE_Handle * peerstore_handle
Definition: gnunet-hello.c:42
static struct GNUNET_PEERSTORE_StoreHelloContext * shc
HELLO store context handle.
Definition: gnunet-hello.c:52
void GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h)
Disconnect from the PEERSTORE service.
void GNUNET_PEERSTORE_hello_add_cancel(struct GNUNET_PEERSTORE_StoreHelloContext *huc)
Cancel the request to add a hello.
void GNUNET_PEERSTORE_iteration_stop(struct GNUNET_PEERSTORE_IterateContext *ic)
Cancel an iteration.

References GNUNET_PEERSTORE_disconnect(), GNUNET_PEERSTORE_hello_add_cancel(), GNUNET_PEERSTORE_iteration_stop(), iter_ctx, peerstore_handle, and shc.

Referenced by run().

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

◆ print_hello_addrs()

static void print_hello_addrs ( void *  cls,
const struct GNUNET_PeerIdentity pid,
const char *  uri 
)
static

Callback function used to extract URIs from a builder.

Called when we should consider connecting to a peer.

Parameters
clsclosure pointing to a struct GNUNET_PeerIdentity *
urione of the URIs

Definition at line 129 of file gnunet-hello.c.

132{
133 (void) cls;
134
135
136 printf ("|- %s\n", uri);
137}
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...

References uri.

Referenced by hello_iter().

Here is the caller graph for this function:

◆ hello_iter()

static void hello_iter ( void *  cls,
const struct GNUNET_PEERSTORE_Record record,
const char *  emsg 
)
static

If we ever get here, we are newer than the existing record or the only/first record.

Definition at line 141 of file gnunet-hello.c.

143{
144 struct GNUNET_HELLO_Parser *hp;
145 struct GNUNET_TIME_Absolute hello_exp;
146 const struct GNUNET_PeerIdentity *pid;
147
148 if ((NULL == record) && (NULL == emsg))
149 {
153 iter_ctx = NULL;
155 return;
156 }
157 if (NULL != emsg)
158 {
159 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg);
161 return;
162 }
167 {
168 if (0 == GNUNET_memcmp (&my_full_id,
169 pid))
170 {
171 struct GNUNET_HELLO_Builder *hb;
172
175 {
176 char *url;
177 if (NULL != expirationstring)
178 {
182 }
183 else
184 {
186 }
187 printf ("%s\n", url);
188 GNUNET_free (url);
190 iter_ctx = NULL;
194 }
195 else
196 {
197 struct GNUNET_MQ_Envelope *env;
198 struct GNUNET_TIME_Relative validity_tmp;
199 const struct GNUNET_MessageHeader *msg;
200
201 if (NULL != expirationstring)
202 {
206 }
207 else
208 {
209 validity_tmp = GNUNET_TIME_absolute_get_duration (hello_exp);
212 validity_tmp);
213 }
215 fwrite (msg, 1, ntohs (msg->size), stdout);
218 iter_ctx = NULL;
222 }
223 return;
224 }
225 }
226 else if (print_hellos)
227 {
228 printf ("`%s' (expires: %s):\n", GNUNET_i2s (pid),
231 }
234}
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
static struct GNUNET_TIME_Relative hello_validity
Expiration time for exported hello.
Definition: gnunet-hello.c:77
static struct GNUNET_CRYPTO_EddsaPrivateKey my_private_key
Peer private key.
Definition: gnunet-hello.c:57
static struct GNUNET_PeerIdentity my_full_id
Peer identity.
Definition: gnunet-hello.c:62
static void print_hello_addrs(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
Callback function used to extract URIs from a builder.
Definition: gnunet-hello.c:129
static int export_own_hello
HELLO export option -H.
Definition: gnunet-hello.c:67
static int print_hellos
Hello list option -D.
Definition: gnunet-hello.c:87
static enum GNUNET_GenericReturnValue binary_output
HELLO export/import format option.
Definition: gnunet-hello.c:82
static char * expirationstring
Optional expiration string -E.
Definition: gnunet-hello.c:72
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
struct GNUNET_HELLO_Builder * GNUNET_HELLO_builder_from_parser(const struct GNUNET_HELLO_Parser *parser)
Allocate builder from parser.
Definition: hello-uri.c:419
void GNUNET_HELLO_parser_free(struct GNUNET_HELLO_Parser *parser)
Release resources of a builder.
Definition: hello-uri.c:435
struct GNUNET_HELLO_Parser * GNUNET_HELLO_parser_from_msg(const struct GNUNET_MessageHeader *msg)
Parse msg.
Definition: hello-uri.c:471
void GNUNET_HELLO_builder_free(struct GNUNET_HELLO_Builder *builder)
Release resources of a builder.
Definition: hello-uri.c:453
const struct GNUNET_PeerIdentity * GNUNET_HELLO_parser_iterate(const struct GNUNET_HELLO_Parser *parser, GNUNET_HELLO_UriCallback uc, void *uc_cls)
Iterate over URIs in a parser.
Definition: hello-uri.c:1201
struct GNUNET_TIME_Absolute GNUNET_HELLO_get_expiration_time_from_msg(const struct GNUNET_MessageHeader *msg)
Get the expiration time for this HELLO.
Definition: hello-uri.c:619
const struct GNUNET_PeerIdentity * GNUNET_HELLO_parser_get_id(const struct GNUNET_HELLO_Parser *parser)
Get the PeerIdentity for this builder.
Definition: hello-uri.c:412
char * GNUNET_HELLO_builder_to_url(const struct GNUNET_HELLO_Builder *builder, const struct GNUNET_CRYPTO_EddsaPrivateKey *priv)
Generate GNUnet HELLO URI from a builder.
Definition: hello-uri.c:997
struct GNUNET_MQ_Envelope * GNUNET_HELLO_builder_to_env(const struct GNUNET_HELLO_Builder *builder, const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_TIME_Relative expiration_time)
Generate envelope with GNUnet HELLO message (including peer ID) from a builder.
Definition: hello-uri.c:1168
char * GNUNET_HELLO_builder_to_url2(const struct GNUNET_HELLO_Builder *builder, const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_TIME_Relative expiration_time)
Generate GNUnet HELLO URI from a builder.
Definition: hello-uri.c:873
#define GNUNET_log(kind,...)
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
@ GNUNET_NO
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_ERROR
#define GNUNET_free(ptr)
Wrapper around free.
const struct GNUNET_MessageHeader * GNUNET_MQ_env_get_msg(const struct GNUNET_MQ_Envelope *env)
Obtain message contained in envelope.
Definition: mq.c:896
void GNUNET_PEERSTORE_iteration_next(struct GNUNET_PEERSTORE_IterateContext *ic, uint64_t limit)
Continue an iteration.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
Definition: scheduler.c:566
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
Definition: time.c:438
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
Definition: strings.c:640
Context for building (or parsing) HELLO URIs.
Definition: hello-uri.c:205
Context for parsing HELLOs.
Definition: hello-uri.c:258
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.

References binary_output, env, expirationstring, export_own_hello, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_HELLO_builder_free(), GNUNET_HELLO_builder_from_parser(), GNUNET_HELLO_builder_to_env(), GNUNET_HELLO_builder_to_url(), GNUNET_HELLO_builder_to_url2(), GNUNET_HELLO_get_expiration_time_from_msg(), GNUNET_HELLO_parser_free(), GNUNET_HELLO_parser_from_msg(), GNUNET_HELLO_parser_get_id(), GNUNET_HELLO_parser_iterate(), GNUNET_i2s(), GNUNET_log, GNUNET_memcmp, GNUNET_MQ_env_get_msg(), GNUNET_NO, GNUNET_PEERSTORE_iteration_next(), GNUNET_PEERSTORE_iteration_stop(), GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_absolute_time_to_string(), GNUNET_TIME_absolute_get_duration(), hello_validity, iter_ctx, msg, my_full_id, my_private_key, pid, print_hello_addrs(), print_hellos, record(), and GNUNET_MessageHeader::size.

Referenced by run().

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

◆ hello_store_success()

static void hello_store_success ( void *  cls,
int  success 
)
static

Definition at line 238 of file gnunet-hello.c.

239{
240 shc = NULL;
241 if (GNUNET_OK != success)
242 {
244 "Storing hello uri failed\n");
245 }
246 printf ("HELLO imported.");
248}
@ GNUNET_OK
@ GNUNET_ERROR_TYPE_WARNING

References GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_shutdown(), and shc.

Referenced by run().

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

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle cfg 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cfgconfiguration

Definition at line 260 of file gnunet-hello.c.

264{
265 struct GNUNET_HELLO_Parser *hp;
266 struct GNUNET_MQ_Envelope *env;
267 char *keyfile;
268 (void) cls;
269 (void) cfgfile;
270
271 if (NULL != args[0])
272 {
273 fprintf (stderr, _ ("Invalid command line argument `%s'\n"), args[0]);
274 return;
275 }
276 if (! print_hellos &&
279 {
280 fprintf (stderr, "%s", _ ("No argument given.\n"));
281 ret = 1;
283 return;
284 }
286 if (GNUNET_OK !=
288 "PEER",
289 "PRIVATE_KEY",
290 &keyfile))
291 {
292 GNUNET_log (
294 _ ("Core service is lacking HOSTKEY configuration setting. Exiting.\n"));
296 ret = 1;
297 return;
298 }
299 if (GNUNET_SYSERR ==
303 {
305 "Failed to read peer's private key!\n");
307 ret = 1;
308 GNUNET_free (keyfile);
309 return;
310 }
311 GNUNET_free (keyfile);
316 if (NULL != expirationstring)
317 {
320 {
321 fprintf (stderr, "Invalid expiration time `%s'", expirationstring);
323 return;
324 }
325 }
327 {
328 char buffer[GNUNET_MAX_MESSAGE_SIZE - 1];
329 char *write_ptr;
330 ssize_t nread;
331 size_t read_total = 0;
332
333 write_ptr = buffer;
334 while (0 < (nread = fread (write_ptr, 1,
335 sizeof buffer - read_total, stdin)))
336 {
337 read_total += nread;
338 write_ptr += nread;
339 }
340 buffer[read_total] = '\0';
341 if (strlen ("gnunet://hello/") > read_total)
342 {
343 fprintf (stderr, "HELLO malformed\n");
345 return;
346 }
347 if (0 == strncasecmp ("gnunet://hello/",
348 buffer, strlen ("gnunet://hello/")))
349 {
350 // Remove newline
351 buffer[read_total - 1] = '\0';
352 hp = GNUNET_HELLO_parser_from_url (buffer);
353 if (NULL == hp)
354 {
355 fprintf (stderr, "Unable to parse URI `%s'\n", buffer);
357 return;
358 }
362 &hello_store_success, NULL);
365 }
366 else if (read_total > sizeof (struct GNUNET_MessageHeader))
367 {
369 (const struct GNUNET_MessageHeader*)
370 buffer,
371 &hello_store_success, NULL);
372 }
373 else
374 {
375 fprintf (stderr, "HELLO malformed\n");
377 }
378 return;
379 }
380
382 "peerstore",
383 NULL,
385 &hello_iter,
386 NULL);
387
388}
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:108
static void hello_iter(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Definition: gnunet-hello.c:141
static enum GNUNET_GenericReturnValue import_hello
HELLO import option -I.
Definition: gnunet-hello.c:92
static void shutdown_task(void *cls)
Task run in monitor mode when the user presses CTRL-C to abort.
Definition: gnunet-hello.c:101
static int ret
Return code.
Definition: gnunet-hello.c:37
static void hello_store_success(void *cls, int success)
Definition: gnunet-hello.c:238
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message,...
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_key_from_file(const char *filename, int do_create, struct GNUNET_CRYPTO_EddsaPrivateKey *pkey)
Create a new private key by reading it from a file.
void GNUNET_CRYPTO_eddsa_key_get_public(const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Extract the public key for the given private key.
Definition: crypto_ecc.c:201
struct GNUNET_MQ_Envelope * GNUNET_HELLO_parser_to_env(const struct GNUNET_HELLO_Parser *parser)
Generate envelope with GNUnet HELLO message (including peer ID) from a parser.
Definition: hello-uri.c:1103
struct GNUNET_HELLO_Parser * GNUNET_HELLO_parser_from_url(const char *url)
Parse GNUnet HELLO url.
Definition: hello-uri.c:682
@ GNUNET_YES
@ GNUNET_SYSERR
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_PEERSTORE_IterateContext * GNUNET_PEERSTORE_iteration_start(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor callback, void *callback_cls)
Iterate over peerstore entries.
struct GNUNET_PEERSTORE_Handle * GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the PEERSTORE service.
#define GNUNET_PEERSTORE_HELLO_KEY
Key used for storing HELLO in the peerstore.
struct GNUNET_PEERSTORE_StoreHelloContext * GNUNET_PEERSTORE_hello_add(struct GNUNET_PEERSTORE_Handle *h, const struct GNUNET_MessageHeader *msg, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Add hello to peerstore.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
Definition: scheduler.c:1338
enum GNUNET_GenericReturnValue GNUNET_STRINGS_fancy_time_to_relative(const char *fancy_time, struct GNUNET_TIME_Relative *rtime)
Convert a given fancy human-readable time to our internal representation.
Definition: strings.c:259
#define GNUNET_TIME_UNIT_DAYS
One day.
#define _(String)
GNU gettext support macro.
Definition: platform.h:178
struct GNUNET_CRYPTO_EddsaPublicKey public_key

References _, consensus-simulation::args, cfg, env, expirationstring, export_own_hello, GNUNET_assert, GNUNET_CONFIGURATION_get_value_filename(), GNUNET_CRYPTO_eddsa_key_from_file(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_HELLO_parser_free(), GNUNET_HELLO_parser_from_url(), GNUNET_HELLO_parser_to_env(), GNUNET_log, GNUNET_MAX_MESSAGE_SIZE, GNUNET_MQ_env_get_msg(), GNUNET_NO, GNUNET_OK, GNUNET_PEERSTORE_connect(), GNUNET_PEERSTORE_hello_add(), GNUNET_PEERSTORE_HELLO_KEY, GNUNET_PEERSTORE_iteration_start(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), GNUNET_STRINGS_fancy_time_to_relative(), GNUNET_SYSERR, GNUNET_TIME_UNIT_DAYS, GNUNET_YES, hello_iter(), hello_store_success(), hello_validity, import_hello, iter_ctx, my_full_id, my_private_key, peerstore_handle, print_hellos, GNUNET_PeerIdentity::public_key, ret, shc, and shutdown_task().

Referenced by main().

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

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function to obtain peer information from CORE.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error

Definition at line 399 of file gnunet-hello.c.

400{
401 int res;
404 "export-hello",
406 "Print a HELLO for our peer identity"),
409 "binary",
411 "Output HELLO in binary format. Use with `--export'."),
414 "import-hello",
415 gettext_noop ("Import a HELLO"),
416 &import_hello),
418 "expiration",
419 "TIME",
421 "Expiration time to set for exported hello. (Default: 1 day)"),
424 "dump-hellos",
426 "List all known HELLOs in peerstore"),
428 };
429
430 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
431 return 2;
432 res = GNUNET_PROGRAM_run (argc,
433 argv,
434 "gnunet-hello",
436 "Import/export/print HELLOs."),
437 options,
438 &run,
439 NULL);
440
441 GNUNET_free_nz ((void *) argv);
442 if (GNUNET_OK == res)
443 return ret;
444 return 1;
445}
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
#define gettext_noop(String)
Definition: gettext.h:74
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run by the scheduler.
Definition: gnunet-hello.c:260
static char * res
Currently read line or NULL on EOF.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
#define GNUNET_free_nz(ptr)
Wrapper around free.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition: program.c:400
enum GNUNET_GenericReturnValue GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1253
Definition of a command line option.

References binary_output, expirationstring, export_own_hello, gettext_noop, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_string(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), import_hello, options, print_hellos, res, ret, and run().

Here is the call graph for this function:

Variable Documentation

◆ ret

int ret
static

Return code.

Definition at line 37 of file gnunet-hello.c.

Referenced by main(), and run().

◆ peerstore_handle

struct GNUNET_PEERSTORE_Handle* peerstore_handle
static

Definition at line 42 of file gnunet-hello.c.

Referenced by run(), and shutdown_task().

◆ iter_ctx

struct GNUNET_PEERSTORE_IterateContext* iter_ctx
static

PEERSTORE iteration context.

Definition at line 47 of file gnunet-hello.c.

Referenced by hello_iter(), run(), and shutdown_task().

◆ shc

HELLO store context handle.

Definition at line 52 of file gnunet-hello.c.

Referenced by GNUNET_sh2s(), hello_store_success(), run(), and shutdown_task().

◆ my_private_key

struct GNUNET_CRYPTO_EddsaPrivateKey my_private_key
static

Peer private key.

Definition at line 57 of file gnunet-hello.c.

Referenced by hello_iter(), and run().

◆ my_full_id

struct GNUNET_PeerIdentity my_full_id
static

Peer identity.

Definition at line 62 of file gnunet-hello.c.

Referenced by hello_iter(), and run().

◆ export_own_hello

int export_own_hello
static

HELLO export option -H.

Definition at line 67 of file gnunet-hello.c.

Referenced by hello_iter(), main(), and run().

◆ expirationstring

char* expirationstring
static

Optional expiration string -E.

Definition at line 72 of file gnunet-hello.c.

Referenced by hello_iter(), main(), parse_expiration(), and run().

◆ hello_validity

struct GNUNET_TIME_Relative hello_validity
static

Expiration time for exported hello.

Definition at line 77 of file gnunet-hello.c.

Referenced by hello_iter(), and run().

◆ binary_output

enum GNUNET_GenericReturnValue binary_output
static

HELLO export/import format option.

Definition at line 82 of file gnunet-hello.c.

Referenced by hello_iter(), and main().

◆ print_hellos

int print_hellos
static

Hello list option -D.

Definition at line 87 of file gnunet-hello.c.

Referenced by hello_iter(), main(), and run().

◆ import_hello

enum GNUNET_GenericReturnValue import_hello
static

HELLO import option -I.

Definition at line 92 of file gnunet-hello.c.

Referenced by main(), and run().