spread knowledge about how to contact us (get HELLO from peerinfo), and remember HELLOs of other peers we have an interest in More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_statistics_service.h"
#include "gnunet_peerinfo_service.h"
#include "cadet_protocol.h"
#include "gnunet-service-cadet.h"
#include "gnunet-service-cadet_dht.h"
#include "gnunet-service-cadet_hello.h"
#include "gnunet-service-cadet_peer.h"
Go to the source code of this file.
Macros | |
#define | LOG(level, ...) GNUNET_log_from (level, "cadet-hll", __VA_ARGS__) |
Functions | |
static void | got_hello (void *cls, const struct GNUNET_PeerIdentity *id, const struct GNUNET_HELLO_Message *hello, const char *err_msg) |
Process each hello message received from peerinfo. More... | |
void | GCH_init (const struct GNUNET_CONFIGURATION_Handle *c) |
Initialize the hello subsystem. More... | |
void | GCH_shutdown () |
Shut down the hello subsystem. More... | |
const struct GNUNET_HELLO_Message * | GCH_get_mine (void) |
Get own hello message. More... | |
Variables | |
static struct GNUNET_HELLO_Message * | mine |
Hello message of local peer. More... | |
static struct GNUNET_PEERINFO_Handle * | peerinfo |
Handle to peerinfo service. More... | |
static struct GNUNET_PEERINFO_NotifyContext * | nc |
Iterator context. More... | |
spread knowledge about how to contact us (get HELLO from peerinfo), and remember HELLOs of other peers we have an interest in
Definition in file gnunet-service-cadet_hello.c.
#define LOG | ( | level, | |
... | |||
) | GNUNET_log_from (level, "cadet-hll", __VA_ARGS__) |
Definition at line 38 of file gnunet-service-cadet_hello.c.
|
static |
Process each hello message received from peerinfo.
cls | Closure (unused). |
id | Identity of the peer. |
hello | Hello of the peer. |
err_msg | Error message. |
Definition at line 65 of file gnunet-service-cadet_hello.c.
References GCD_hello_update(), GCP_get(), GCP_set_hello(), GNUNET_copy_message(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_HELLO_get_last_expiration(), GNUNET_HELLO_size(), GNUNET_i2s(), GNUNET_memcmp, GNUNET_STRINGS_absolute_time_to_string(), GNUNET_YES, GNUNET_HELLO_Message::header, CadetPeer::hello, LOG, mine, my_full_id, and peer.
Referenced by GCH_init().
void GCH_init | ( | const struct GNUNET_CONFIGURATION_Handle * | c | ) |
Initialize the hello subsystem.
c | Configuration. |
Definition at line 103 of file gnunet-service-cadet_hello.c.
References GNUNET_assert, GNUNET_NO, GNUNET_PEERINFO_connect(), GNUNET_PEERINFO_notify(), got_hello(), nc, and peerinfo.
Referenced by run().
void GCH_shutdown | ( | void | ) |
Shut down the hello subsystem.
Definition at line 118 of file gnunet-service-cadet_hello.c.
References GNUNET_free, GNUNET_PEERINFO_disconnect(), GNUNET_PEERINFO_notify_cancel(), mine, nc, and peerinfo.
Referenced by shutdown_rest().
const struct GNUNET_HELLO_Message* GCH_get_mine | ( | void | ) |
Get own hello message.
Definition at line 144 of file gnunet-service-cadet_hello.c.
References mine.
Referenced by announce_id().
|
static |
Hello message of local peer.
Definition at line 43 of file gnunet-service-cadet_hello.c.
Referenced by GCH_get_mine(), GCH_shutdown(), and got_hello().
|
static |
Handle to peerinfo service.
Definition at line 48 of file gnunet-service-cadet_hello.c.
Referenced by GCH_init(), and GCH_shutdown().
|
static |
Iterator context.
Definition at line 53 of file gnunet-service-cadet_hello.c.
Referenced by check_iteration_start(), client_connect_cb(), client_disconnect_cb(), do_reconnect(), GCH_init(), GCH_shutdown(), GNS_resolver_init(), GNUNET_BANDWIDTH_tracker_consume(), GNUNET_notification_context_add(), GNUNET_notification_context_broadcast(), GNUNET_notification_context_create(), GNUNET_notification_context_destroy(), GNUNET_notification_context_get_size(), GNUNET_PEERINFO_notify(), GNUNET_PEERINFO_notify_cancel(), GNUNET_TRANSPORT_core_connect(), GNUNET_TRANSPORT_TESTING_start_peer(), handle_block_cache(), handle_iteration_next(), handle_iteration_start(), handle_iteration_stop(), handle_lookup_block(), handle_monitor_next(), handle_monitor_start(), handle_mq_destroy(), handle_notification(), handle_record_lookup(), handle_record_store(), handle_tx_control(), handle_zone_to_name(), monitor_iteration_next(), mq_error_handler(), reconnect(), send_lookup_response_with_filter(), send_store_response(), and send_tx_response().