42#define LOG(level, ...) GNUNET_log_from (level, "cadet-cor", __VA_ARGS__)
291 "Queue full due new message on connection %s, dropping old message\n",
294 "# messages dropped due to full buffer",
331 "Failed to route message of type %u from %s on connection %s: no route\n",
354 "Routing message of type %u from %s to %s on connection %s\n",
367 (NULL !=
dir->env_head) &&
381 "Received duplicate of message already in buffer, dropping\n");
383 "# messages dropped due to duplicate in buffer",
394 if (NULL != rung->
next)
403 "Queue full due new message on connection %s, dropping old message\n",
406 "# messages dropped due to full buffer",
429 "Queueing new message of type %u from %s to %s on connection %s\n",
438 (NULL !=
dir->env_head) &&
467 uint16_t
size = ntohs (
msg->header.
size) -
sizeof(*msg);
488 while (NULL != (
env =
dir->env_head))
491 "# messages dropped due to route destruction",
496 if (NULL !=
dir->mqm)
514 "Destroying route from %s to %s of connection %s\n",
551 if (NULL == target->
mqm)
554 "Notifying %s about BROKEN route at %s-%s of connection %s\n",
597 "Sending BROKEN due to timeout (%s was last use, %s linger)\n",
632 if (NULL != (
env =
dir->env_head))
663 dir->my_route = route;
693 if (NULL != failure_at)
694 bm->
peer2 = *failure_at;
715 uint16_t
size = ntohs (
msg->header.
size) -
sizeof(*msg);
716 unsigned int path_length;
721 if (0 == path_length)
724 "Dropping CADET_CONNECTION_CREATE with empty path\n");
729 "Handling CADET_CONNECTION_CREATE from %s for CID %s with %u hops\n",
739 for (
unsigned int i = 0; i < path_length; i++)
742 "CADET_CONNECTION_CREATE has peer %s at offset %u\n",
754 "Dropping CADET_CONNECTION_CREATE with cyclic path\n");
762 for (off = 1; off < path_length; off++)
765 if (off == path_length)
768 "Dropping CADET_CONNECTION_CREATE without us in the path\n");
776 "Dropping CADET_CONNECTION_CREATE without sender at previous hop in the path\n");
785 "Passing on duplicate CADET_CONNECTION_CREATE message on connection %s\n",
794 if (off == path_length - 1)
805 "Received duplicate CADET_CONNECTION_CREATE message on connection %s\n",
813 "I am destination for CADET_CONNECTION_CREATE message from %s for connection %s, building inverse path\n",
836 "Received CADET_CONNECTION_CREATE from %s for %s, but %s already has a connection. Sending BROKEN\n",
851 "Received CADET_CONNECTION_CREATE from %s for %s. Next hop %s:%u is down. Sending BROKEN\n",
862 "Received CADET_CONNECTION_CREATE from %s for %s. We have reached our route limit. Sending BROKEN\n",
871 "Received CADET_CONNECTION_CREATE from %s for %s. Next hop %s:%u is up. Creating route\n",
938 "Received CONNECTION_CREATE_ACK for connection %s.\n",
983 "Received CONNECTION_BROKEN for connection %s. Destroying it.\n",
1033 "Received CONNECTION_DESTROY for connection %s. Destroying connection.\n",
1042 "Received CONNECTION_DESTROY for connection %s. Destroying route.\n",
1069 "Routing KX with ephemeral %s on CID %s\n",
1228 "CORE connection to peer %s was established.\n",
1250 "CORE connection to peer %s went down.\n",
struct GNUNET_MQ_MessageHandlers handlers[]
struct GNUNET_MQ_Handle * mq
struct GNUNET_MessageHeader * msg
struct GNUNET_MQ_Envelope * env
P2P messages used by CADET.
static char * dir
Set to the directory where runtime files are stored.
static void connection_destroy(struct Connection *connection)
Destroys a receiving state due to timeout or shutdown.
struct GNUNET_PeerIdentity my_identity
Our peer identity.
static struct GNUNET_PeerIdentity my_full_id
Peer identity.
static char origin[GNUNET_DNSPARSER_MAX_NAME_LENGTH]
Current origin.
struct GNUNET_TIME_Relative keepalive_period
How frequently do we send KEEPALIVE messages on idle connections?
static struct CadetConnection * connection_create(struct CadetPeer *destination, struct CadetPeerPath *path, unsigned int off, struct CadetTConnection *ct, const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, enum CadetConnectionState init_state, GCC_ReadyCallback ready_cb, void *ready_cb_cls)
Create a connection to destination via path and notify cb whenever we are ready for more data.
void GCC_handle_encrypted(struct CadetConnection *cc, const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
Handle encrypted message.
struct CadetPeerPath * GCC_get_path(struct CadetConnection *cc, unsigned int *off)
Obtain the path used by this connection.
void GCC_handle_connection_create_ack(struct CadetConnection *cc)
A GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK was received for this connection,...
void GCC_handle_kx(struct CadetConnection *cc, const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg)
Handle KX message.
void GCC_destroy_without_core(struct CadetConnection *cc)
Destroy a connection, called when the CORE layer is already done (i.e.
void GCC_handle_kx_auth(struct CadetConnection *cc, const struct GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg)
Handle KX_AUTH message.
void GCC_handle_duplicate_create(struct CadetConnection *cc)
We got a GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE for a connection that we already have.
struct CadetConnection * GCC_lookup(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid)
Lookup a connection by its identifier.
A connection is a live end-to-end messaging mechanism where the peers are identified by a path and kn...
static void dir_ready_cb(void *cls, int ready)
Function called when the message queue to the previous hop becomes available/unavailable.
static void * core_connect_cb(void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_MQ_Handle *mq)
Method called whenever a given peer connects.
void GCO_shutdown()
Shut down the CORE subsystem.
static struct GNUNET_CORE_Handle * core
Handle to the CORE service.
static unsigned long long cur_buffers
Current number of envelopes we have buffered at this peer.
static void destroy_direction(struct RouteDirection *dir)
Free internal data of a route direction.
static struct Rung * rung_tail
Tail of the rung_head DLL.
static int check_connection_create(void *cls, const struct GNUNET_CADET_ConnectionCreateMessage *msg)
Check if the create_connection message has the appropriate size.
static void dir_init(struct RouteDirection *dir, struct CadetRoute *route, struct CadetPeer *hop)
Initialize one of the directions of a route.
static void handle_tunnel_kx(void *cls, const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX.
static struct Rung rung_zero
Rung zero (always pointed to by rung_head).
static void handle_tunnel_encrypted(void *cls, const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED.
static void discard_buffer(struct RouteDirection *dir, struct GNUNET_MQ_Envelope *env)
Discard the buffer env from the route direction dir and move dir down a rung.
static void discard_all_from_rung_tail()
Discard all messages from the highest rung, to make space.
static struct Rung * rung_head
DLL of rungs, with the head always point to a rung of route directions with no messages in the queue.
static void route_message(struct CadetPeer *prev, const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, const struct GNUNET_MessageHeader *msg, const enum GNUNET_MQ_PriorityPreferences priority)
We message msg from prev.
void GCO_init(const struct GNUNET_CONFIGURATION_Handle *c)
Initialize the CORE subsystem.
static int check_tunnel_encrypted(void *cls, const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
Check if the encrypted message has the appropriate size.
static void send_broken_without_mqm(struct CadetPeer *target, const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, const struct GNUNET_PeerIdentity *failure_at)
We could not create the desired route.
static void handle_connection_create(void *cls, const struct GNUNET_CADET_ConnectionCreateMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE.
static void timeout_cb(void *cls)
Function called to check if any routes have timed out, and if so, to clean them up.
static void destroy_route(struct CadetRoute *route)
Destroy our state for route.
static struct CadetRoute * get_route(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid)
Get the route corresponding to a hash.
static struct GNUNET_CONTAINER_Heap * route_heap
Heap of routes, MIN-sorted by last activity.
static unsigned long long max_routes
Maximum number of concurrent routes this peer will support.
static void core_disconnect_cb(void *cls, const struct GNUNET_PeerIdentity *peer, void *peer_cls)
Method called whenever a peer disconnects.
static void handle_tunnel_kx_auth(void *cls, const struct GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX_AUTH.
static struct GNUNET_CONTAINER_MultiShortmap * routes
Routes on which this peer is an intermediate.
static void send_broken(struct RouteDirection *target, const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, const struct GNUNET_PeerIdentity *peer1, const struct GNUNET_PeerIdentity *peer2)
Send message that a route is broken between peer1 and peer2.
static void lower_rung(struct RouteDirection *dir)
Lower the rung in which dir is by 1.
static void handle_connection_broken(void *cls, const struct GNUNET_CADET_ConnectionBrokenMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN.
static void handle_connection_destroy(void *cls, const struct GNUNET_CADET_ConnectionDestroyMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY.
static struct GNUNET_SCHEDULER_Task * timeout_task
Task to timeout routes.
static void handle_connection_create_ack(void *cls, const struct GNUNET_CADET_ConnectionCreateAckMessage *msg)
Handle for GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK.
static unsigned long long max_buffers
Maximum number of envelopes we will buffer at this peer.
static void core_init_cb(void *cls, const struct GNUNET_PeerIdentity *my_identity)
Function called after GNUNET_CORE_connect has succeeded (or failed for good).
cadet service; interaction with CORE service
const char * GCPP_2s(struct CadetPeerPath *path)
Convert a path to a human-readable string.
struct CadetPeer * GCPP_get_peer_at_offset(struct CadetPeerPath *path, unsigned int off)
Obtain the peer at offset off in path.
struct CadetPeerPath * GCPP_get_path_from_route(unsigned int path_length, const struct GNUNET_PeerIdentity *pids)
We got an incoming connection, obtain the corresponding path.
int GCP_check_monotime_sig(struct CadetPeer *peer, const struct GNUNET_CADET_ConnectionCreateMessage *msg)
Checking the signature for a monotime of a GNUNET_CADET_ConnectionCreateMessage.
const struct GNUNET_PeerIdentity * GCP_get_id(struct CadetPeer *cp)
Obtain the peer identity for a struct CadetPeer.
struct CadetPeer * GCP_get(const struct GNUNET_PeerIdentity *peer_id, int create)
Retrieve the CadetPeer structure associated with the peer.
int GCP_has_core_connection(struct CadetPeer *cp)
Test if cp has a core-level connection.
struct CadetTunnel * GCP_get_tunnel(struct CadetPeer *cp, int create)
Get the tunnel towards a peer.
void GCP_send_ooo(struct CadetPeer *cp, struct GNUNET_MQ_Envelope *env)
Send the message in env to cp, overriding queueing logic.
int GCP_check_and_update_monotime(struct CadetPeer *peer, struct GNUNET_TIME_AbsoluteNBO monotime)
Checking if a monotime value is newer than the last monotime value received from a peer.
void GCP_request_mq_cancel(struct GCP_MessageQueueManager *mqm, struct GNUNET_MQ_Envelope *last_env)
Stops message queue change notifications.
void GCP_set_mq(struct CadetPeer *cp, struct GNUNET_MQ_Handle *mq)
Set the message queue to mq for peer cp and notify watchers.
void GCP_send(struct GCP_MessageQueueManager *mqm, struct GNUNET_MQ_Envelope *env)
Send the message in env to cp.
const char * GCP_2s(const struct CadetPeer *cp)
Get the static string for a peer ID.
struct GCP_MessageQueueManager * GCP_request_mq(struct CadetPeer *cp, GCP_MessageQueueNotificationCallback cb, void *cb_cls)
Start message queue change notifications.
Information we track per peer.
void GCT_change_estate(struct CadetTunnel *t, enum CadetTunnelEState state)
Change the tunnel encryption state.
int GCT_add_inbound_connection(struct CadetTunnel *t, const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, struct CadetPeerPath *path)
Add a connection to the tunnel.
enum CadetTunnelEState GCT_get_estate(struct CadetTunnel *t)
Get the encryption state of a tunnel.
Information we track per tunnel.
@ CADET_TUNNEL_KEY_UNINITIALIZED
Uninitialized status, we need to send KX.
@ CADET_TUNNEL_KEY_OK
Handshake completed: session key available.
static struct GNUNET_STATISTICS_Handle * stats
Handle to the statistics service.
static struct GNUNET_SCHEDULER_Task * t
Main task.
Core service; the main API for encrypted P2P communications.
API to create, modify and access statistics.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
struct GNUNET_CORE_Handle * GNUNET_CORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls, GNUNET_CORE_StartupCallback init, GNUNET_CORE_ConnectEventHandler connects, GNUNET_CORE_DisconnectEventHandler disconnects, const struct GNUNET_MQ_MessageHandler *handlers)
Connect to the core service.
void GNUNET_CORE_disconnect(struct GNUNET_CORE_Handle *handle)
Disconnect from the core service.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert_after(head, tail, other, element)
Insert an element into a DLL after the given other element.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiShortmap * GNUNET_CONTAINER_multishortmap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multishortmap_put(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void * GNUNET_CONTAINER_multishortmap_get(const struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key)
Given a key find a value in the map matching the key.
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
void GNUNET_CONTAINER_multishortmap_destroy(struct GNUNET_CONTAINER_MultiShortmap *map)
Destroy a hash map.
unsigned int GNUNET_CONTAINER_multishortmap_size(const struct GNUNET_CONTAINER_MultiShortmap *map)
Get the number of key-value pairs in the map.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
int GNUNET_CONTAINER_multishortmap_remove(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, const void *value)
Remove the given key-value pair from the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY
There must only be one value per key; storing a value should fail if a value under the same key alrea...
void * GNUNET_CONTAINER_heap_remove_node(struct GNUNET_CONTAINER_HeapNode *node)
Removes a node from the heap.
void * GNUNET_CONTAINER_heap_peek(const struct GNUNET_CONTAINER_Heap *heap)
Get element stored at the root of heap.
void GNUNET_CONTAINER_heap_update_cost(struct GNUNET_CONTAINER_HeapNode *node, GNUNET_CONTAINER_HeapCostType new_cost)
Updates the cost of any node in the tree.
struct GNUNET_CONTAINER_HeapNode * GNUNET_CONTAINER_heap_insert(struct GNUNET_CONTAINER_Heap *heap, void *element, GNUNET_CONTAINER_HeapCostType cost)
Inserts a new element into the heap.
struct GNUNET_CONTAINER_Heap * GNUNET_CONTAINER_heap_create(enum GNUNET_CONTAINER_HeapOrder order)
Create a new heap.
void GNUNET_CONTAINER_heap_destroy(struct GNUNET_CONTAINER_Heap *heap)
Destroys the heap.
@ GNUNET_CONTAINER_HEAP_ORDER_MIN
Heap with the minimum cost at the root.
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
#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.
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
const char * GNUNET_e2s(const struct GNUNET_CRYPTO_EcdhePublicKey *p)
Convert a public key value to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
const char * GNUNET_sh2s(const struct GNUNET_ShortHashCode *shc)
Convert a short hash value to a string (for printing debug messages).
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
const char * GNUNET_i2s2(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_MQ_Envelope * GNUNET_MQ_msg_copy(const struct GNUNET_MessageHeader *hdr)
Create a new envelope by copying an existing message.
void GNUNET_MQ_dll_remove(struct GNUNET_MQ_Envelope **env_head, struct GNUNET_MQ_Envelope **env_tail, struct GNUNET_MQ_Envelope *env)
Remove env from the envelope DLL starting at env_head.
void GNUNET_MQ_env_set_options(struct GNUNET_MQ_Envelope *env, enum GNUNET_MQ_PriorityPreferences pp)
Set application-specific options for this envelope.
void GNUNET_MQ_dll_insert_head(struct GNUNET_MQ_Envelope **env_head, struct GNUNET_MQ_Envelope **env_tail, struct GNUNET_MQ_Envelope *env)
Insert env into the envelope DLL starting at env_head Note that env must not be in any MQ while this ...
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
void GNUNET_MQ_discard(struct GNUNET_MQ_Envelope *mqm)
Discard the message queue message, free all allocated resources.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
const struct GNUNET_MQ_Envelope * GNUNET_MQ_env_next(const struct GNUNET_MQ_Envelope *env)
Return next envelope in queue.
GNUNET_MQ_PriorityPreferences
Per envelope preferences and priorities.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
const struct GNUNET_MessageHeader * GNUNET_MQ_env_get_msg(const struct GNUNET_MQ_Envelope *env)
Obtain message contained in envelope.
enum GNUNET_MQ_PriorityPreferences GNUNET_MQ_env_get_options(struct GNUNET_MQ_Envelope *env)
Get performance preferences set for this envelope.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
void GNUNET_MQ_dll_insert_tail(struct GNUNET_MQ_Envelope **env_head, struct GNUNET_MQ_Envelope **env_tail, struct GNUNET_MQ_Envelope *env)
Insert env into the envelope DLL starting at env_head Note that env must not be in any MQ while this ...
@ GNUNET_MQ_PREF_OUT_OF_ORDER
Flag to indicate that out-of-order delivery is OK.
@ GNUNET_MQ_PRIO_CRITICAL_CONTROL
Highest priority, control traffic (e.g.
@ GNUNET_MQ_PREF_UNRELIABLE
Flag to indicate that unreliable delivery is acceptable.
@ GNUNET_MQ_PREF_LOW_LATENCY
Flag to indicate that low latency is important.
@ GNUNET_MQ_PRIO_BEST_EFFORT
Best-effort traffic (e.g.
#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK
Send origin an ACK that the connection is complete.
#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN
Notify that a connection is no longer valid.
#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX
Axolotl key exchange.
#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY
Request the destruction of a connection.
#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX_AUTH
Axolotl key exchange response with authentication.
#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE
Request the creation of a connection.
#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED
Axolotl encrypted data.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_at(struct GNUNET_TIME_Absolute at, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run at the specified time.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
void GNUNET_STATISTICS_set(struct GNUNET_STATISTICS_Handle *handle, const char *name, uint64_t value, int make_persistent)
Set statistic value for the peer.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
static struct GNUNET_CONTAINER_MultiPeerMap * map
Peermap of PeerIdentities to "struct PeerEntry" (for fast lookup).
static unsigned int size
Size of the "table".
Low-level connection to a destination.
Information regarding a possible path to reach a peer.
Struct containing all information regarding a given peer.
struct RouteDirection prev
Information about the previous hop on this route.
struct GNUNET_CADET_ConnectionTunnelIdentifier cid
Unique identifier for the connection that uses this route.
struct GNUNET_CONTAINER_HeapNode * hn
Position of this route in the route_heap.
struct RouteDirection next
Information about the next hop on this route.
struct GNUNET_TIME_Absolute last_use
When was this route last in use?
Struct containing all information regarding a tunnel to a peer.
Data structure used to track whom we have to notify about changes to our message queue.
Message for notifying a disconnection in a path.
struct GNUNET_PeerIdentity peer1
ID of the endpoint.
struct GNUNET_CADET_ConnectionTunnelIdentifier cid
ID of the connection.
struct GNUNET_PeerIdentity peer2
ID of the endpoint.
Message for ack'ing a connection.
Message for cadet connection creation.
Message to destroy a connection.
Hash uniquely identifying a connection below a tunnel.
struct GNUNET_ShortHashCode connection_of_tunnel
Axolotl-encrypted tunnel message with application payload.
Message for a Key eXchange for a tunnel, with authentication.
Message for a Key eXchange for a tunnel.
Handle to a node in a heap.
Internal representation of the hash map.
Internal representation of the hash map.
Context for the core service connection.
Handle to a message queue.
Message handler for a specific message type.
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.
Time for relative time used by GNUnet, in microseconds.
Information we keep per direction for a route.
struct Rung * rung
Rung of this route direction (matches length of the buffer DLL).
int is_ready
Is mqm currently ready for transmission?
struct RouteDirection * next
DLL of other route directions within the same struct Rung.
struct GNUNET_MQ_Envelope * env_tail
Tail of DLL of envelopes we have in the buffer for this direction.
struct GCP_MessageQueueManager * mqm
Message queue manager for hop.
struct GNUNET_MQ_Envelope * env_head
Head of DLL of envelopes we have in the buffer for this direction.
struct CadetRoute * my_route
Route this direction is part of.
struct CadetPeer * hop
Target peer.
struct RouteDirection * prev
DLL of other route directions within the same struct Rung.
Set of CadetRoutes that have exactly the same number of messages in their buffer.
struct RouteDirection * rd_head
DLL of route directions with a number of buffer entries matching this rung.
unsigned int num_routes
Total number of route directions in this rung.
struct RouteDirection * rd_tail
DLL of route directions with a number of buffer entries matching this rung.
struct Rung * prev
Rung of RouteDirections with one less buffer entry each.
struct Rung * next
Rung of RouteDirections with one more buffer entry each.
unsigned int rung_off
Number of messages route directions at this rung have in their buffer.