hello API More...
#include "gnunet_statistics_service.h"
#include "gnunet_transport_service.h"
#include "gnunet_util_lib.h"
#include "gnunet_hello_lib.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | GST_HelloCallback) (void *cls, const struct GNUNET_MessageHeader *hello) |
Signature of a function to call whenever our hello changes. More... | |
Functions | |
void | GST_hello_start (int friend_only, GST_HelloCallback cb, void *cb_cls) |
Initialize the HELLO module. More... | |
void | GST_hello_stop (void) |
Shutdown the HELLO module. More... | |
const struct GNUNET_MessageHeader * | GST_hello_get (void) |
Obtain this peers HELLO message. More... | |
void | GST_hello_modify_addresses (int addremove, const struct GNUNET_HELLO_Address *address) |
Add or remove an address from this peer's HELLO message. More... | |
int | GST_hello_test_address (const struct GNUNET_HELLO_Address *address, struct GNUNET_CRYPTO_EddsaSignature **sig, struct GNUNET_TIME_Absolute **sig_expiration) |
Test if a particular address is one of ours. More... | |
hello API
Definition in file gnunet-service-transport_hello.h.
typedef void(* GST_HelloCallback) (void *cls, const struct GNUNET_MessageHeader *hello) |
Signature of a function to call whenever our hello changes.
cls | closure |
hello | updated HELLO |
Definition at line 40 of file gnunet-service-transport_hello.h.
void GST_hello_start | ( | int | friend_only, |
GST_HelloCallback | cb, | ||
void * | cb_cls | ||
) |
Initialize the HELLO module.
friend_only | use a friend only hello |
cb | function to call whenever our HELLO changes |
cb_cls | closure for cb |
Definition at line 237 of file gnunet-service-transport_hello.c.
References friend_option, hello_cb, hello_cb_cls, and refresh_hello_task().
Referenced by run().
void GST_hello_stop | ( | void | ) |
Shutdown the HELLO module.
Definition at line 252 of file gnunet-service-transport_hello.c.
References GNUNET_free, GNUNET_SCHEDULER_cancel(), hello_cb, hello_cb_cls, hello_task, and our_hello.
Referenced by shutdown_task().
const struct GNUNET_MessageHeader* GST_hello_get | ( | void | ) |
Obtain this peers HELLO message.
Definition at line 275 of file gnunet-service-transport_hello.c.
References our_hello.
Referenced by GST_plugins_load(), handle_client_start(), refresh_hello_task(), and transmit_ping_if_allowed().
void GST_hello_modify_addresses | ( | int | addremove, |
const struct GNUNET_HELLO_Address * | address | ||
) |
Add or remove an address from this peer's HELLO message.
addremove | GNUNET_YES to add, GNUNET_NO to remove |
address | address to add or remove |
Definition at line 288 of file gnunet-service-transport_hello.c.
References address, OwnAddressList::address, GNUNET_assert, GNUNET_break, GNUNET_CONTAINER_DLL_insert, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_HELLO_address_cmp(), GNUNET_HELLO_address_copy(), GNUNET_HELLO_address_free, GNUNET_log, GNUNET_new, GNUNET_NO, GNUNET_YES, GST_plugins_a2s(), OwnAddressList::next, oal_head, oal_tail, OwnAddressList::rc, and refresh_hello().
Referenced by plugin_env_address_change_notification().
int GST_hello_test_address | ( | const struct GNUNET_HELLO_Address * | address, |
struct GNUNET_CRYPTO_EddsaSignature ** | sig, | ||
struct GNUNET_TIME_Absolute ** | sig_expiration | ||
) |
Test if a particular address is one of ours.
address | the address to test |
sig | location where to cache PONG signatures for this address [set] |
sig_expiration | how long until the current 'sig' expires? (ZERO if sig was never created) [set] |
Definition at line 338 of file gnunet-service-transport_hello.c.
References address, OwnAddressList::address, GNUNET_HELLO_address_cmp(), GNUNET_NO, GNUNET_YES, OwnAddressList::next, oal_head, OwnAddressList::pong_sig_expires, and OwnAddressList::pong_signature.
Referenced by GST_validation_handle_ping().