38 #define LOG(level, ...) GNUNET_log_from (level, "cadet-hll", __VA_ARGS__)
85 "Hello for %s (%d bytes), expires on %s\n",
P2P messages used by CADET.
struct GNUNET_PeerIdentity my_full_id
Local peer own ID.
Information we track per peer.
void GCD_hello_update()
Function called by the HELLO subsystem whenever OUR hello changes.
cadet service; dealing with DHT requests and results
void GCH_shutdown()
Shut down the hello subsystem.
void GCH_init(const struct GNUNET_CONFIGURATION_Handle *c)
Initialize the hello subsystem.
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.
static struct GNUNET_PEERINFO_Handle * peerinfo
Handle to peerinfo service.
static struct GNUNET_PEERINFO_NotifyContext * nc
Iterator context.
const struct GNUNET_HELLO_Message * GCH_get_mine(void)
Get own hello message.
static struct GNUNET_HELLO_Message * mine
Hello message of local peer.
cadet service; dealing with hello messages
void GCP_set_hello(struct CadetPeer *cp, const struct GNUNET_HELLO_Message *hello)
We got a HELLO for a cp, remember it, and possibly trigger adequate actions (like trying to connect).
struct CadetPeer * GCP_get(const struct GNUNET_PeerIdentity *peer_id, int create)
Retrieve the CadetPeer structure associated with the peer.
Information we track per peer.
Maintain the list of currently known hosts.
API to create, modify and access statistics.
uint16_t GNUNET_HELLO_size(const struct GNUNET_HELLO_Message *hello)
Return the size of the given HELLO message.
struct GNUNET_TIME_Absolute GNUNET_HELLO_get_last_expiration(const struct GNUNET_HELLO_Message *msg)
When does the last address in the given HELLO expire?
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_DEBUG
struct GNUNET_MessageHeader * GNUNET_copy_message(const struct GNUNET_MessageHeader *msg)
Create a copy of the given message.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_PEERINFO_NotifyContext * GNUNET_PEERINFO_notify(const struct GNUNET_CONFIGURATION_Handle *cfg, int include_friend_only, GNUNET_PEERINFO_Processor callback, void *callback_cls)
Call a method whenever our known information about peers changes.
struct GNUNET_PEERINFO_Handle * GNUNET_PEERINFO_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the peerinfo service.
void GNUNET_PEERINFO_notify_cancel(struct GNUNET_PEERINFO_NotifyContext *nc)
Stop notifying about changes.
void GNUNET_PEERINFO_disconnect(struct GNUNET_PEERINFO_Handle *h)
Disconnect from the peerinfo service.
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
struct GNUNET_HELLO_Message * hello
Hello message of the peer.
A HELLO message is used to exchange information about transports with other peers.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_HELLO.
Handle to the peerinfo service.
Context for the info handler.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.