change HELLO files to never expire More...
#include "platform.h"
#include "gnunet_protocols.h"
#include "gnunet_hello_uri_lib.h"
#include "gnunet_transport_plugin.h"
Go to the source code of this file.
Data Structures | |
struct | AddContext |
Closure for add_to_buf(). More... | |
struct | TransportPlugin |
Entry in doubly-linked list of all of our plugins. More... | |
Functions | |
static void | plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg) |
static int | add_to_builder (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) |
static int | add_to_buf (void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_TIME_Absolute expiration) |
Add the given address with infinite expiration to the buffer. More... | |
static ssize_t | add_from_hello (void *cls, size_t max, void *buf) |
Add addresses from the address list to the HELLO. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
Main function that will be run without the scheduler. More... | |
int | main (int argc, char *argv[]) |
Variables | |
static int | address_count |
static struct GNUNET_CRYPTO_EddsaPrivateKey * | my_private_key |
Our private key. More... | |
struct GNUNET_PeerIdentity | my_full_id |
Local peer own ID. More... | |
static char * | hello_file |
The file with hello in old style which we like to replace with the new one. More... | |
static struct TransportPlugin * | plugins_head |
Head of DLL of all loaded plugins. More... | |
static struct TransportPlugin * | plugins_tail |
Head of DLL of all loaded plugins. More... | |
change HELLO files to never expire
Definition in file gnunet-hello.c.
|
static |
Definition at line 119 of file gnunet-hello.c.
References TransportPlugin::api, cfg, TransportPlugin::env, GNUNET_asprintf(), GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONTAINER_DLL_insert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_new, GNUNET_OK, GNUNET_PLUGIN_load(), GNUNET_strdup, TransportPlugin::lib_name, TransportPlugin::next, plugins_head, plugins_tail, and TransportPlugin::short_name.
Referenced by run().
|
static |
Definition at line 168 of file gnunet-hello.c.
References address, TransportPlugin::api, builder, GNUNET_asprintf(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_HELLO_builder_add_address(), GNUNET_log, TransportPlugin::next, plugins_head, TransportPlugin::short_name, and uri.
Referenced by run().
|
static |
Add the given address with infinite expiration to the buffer.
cls | closure |
address | address to add |
expiration | old expiration |
Definition at line 215 of file gnunet-hello.c.
References address, address_count, AddContext::buf, GNUNET_OK, GNUNET_TIME_UNIT_FOREVER_ABS, AddContext::max, ret, and AddContext::ret.
Referenced by add_from_hello().
|
static |
Add addresses from the address list to the HELLO.
cls | the HELLO with the addresses to add |
max | maximum space available |
buf | where to add the addresses |
Definition at line 244 of file gnunet-hello.c.
References add_to_buf(), AddContext::buf, GNUNET_assert, GNUNET_NO, GNUNET_SYSERR, AddContext::max, max, and AddContext::ret.
|
static |
Main function that will be run without the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
c | configuration |
Definition at line 271 of file gnunet-hello.c.
References _, add_to_builder(), address_count, builder, env, fh, GNUNET_ALIGN, GNUNET_assert, GNUNET_CRYPTO_eddsa_key_create_from_configuration(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_CRYPTO_eddsa_public_key_to_string(), GNUNET_DISK_file_close(), GNUNET_DISK_file_open(), GNUNET_DISK_file_read(), GNUNET_DISK_file_size(), GNUNET_DISK_file_write(), GNUNET_DISK_OPEN_READ, GNUNET_DISK_OPEN_TRUNCATE, GNUNET_DISK_OPEN_WRITE, GNUNET_DISK_PERM_USER_READ, GNUNET_DISK_PERM_USER_WRITE, GNUNET_free, GNUNET_HELLO_builder_free(), GNUNET_HELLO_builder_new(), GNUNET_HELLO_builder_to_env(), GNUNET_HELLO_builder_to_url(), GNUNET_i2s(), GNUNET_log_setup(), GNUNET_MQ_env_get_msg(), GNUNET_NO, GNUNET_OK, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, hello_file, msg, my_full_id, my_private_key, pid, plugins_load(), GNUNET_PeerIdentity::public_key, result, and GNUNET_MessageHeader::size.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 402 of file gnunet-hello.c.
References gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_string(), GNUNET_OK, GNUNET_PROGRAM_run2(), GNUNET_YES, hello_file, options, ret, and run().
|
static |
Definition at line 91 of file gnunet-hello.c.
Referenced by add_to_buf(), and run().
|
static |
Our private key.
Definition at line 96 of file gnunet-hello.c.
Referenced by GCH_get_mine(), GCT_handle_kx_auth(), got_hello(), run(), send_kx(), send_kx_auth(), set_monotime_sig(), and update_ax_by_kx().
struct GNUNET_PeerIdentity my_full_id |
Local peer own ID.
Definition at line 101 of file gnunet-hello.c.
Referenced by announce_id(), core_init_cb(), dir_ready_cb(), GCCH_bind(), GCCH_channel_local_new(), GCH_get_mine(), GCPP_try_path_from_dht(), GCT_alice_or_betty(), get_next_free_ctn(), got_hello(), handle_connection_create(), route_message(), run(), send_broken_without_mqm(), and send_create().
|
static |
The file with hello in old style which we like to replace with the new one.
Definition at line 106 of file gnunet-hello.c.
|
static |
Head of DLL of all loaded plugins.
Definition at line 111 of file gnunet-hello.c.
Referenced by add_to_builder(), and plugins_load().
|
static |
Head of DLL of all loaded plugins.
Definition at line 116 of file gnunet-hello.c.
Referenced by plugins_load().