Initialize the CORE subsystem.
1265{
1270 NULL),
1274 NULL),
1278 NULL),
1282 NULL),
1286 NULL),
1290 NULL),
1294 NULL),
1297 {
1299 .version = { 1, 0 },
1300 .version_max = { 1, 0 },
1301 .version_min = { 1, 0 },
1302 };
1303
1305 "CADET",
1306 "MAX_ROUTES",
1310 "CADET",
1311 "MAX_MSGS_QUEUE",
1317 NULL,
1322 &service_info);
1323}
struct GNUNET_MQ_MessageHandlers handlers[]
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.
static void * core_connect_cb(void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_MQ_Handle *mq, enum GNUNET_CORE_PeerClass class)
Method called whenever a given peer connects.
static struct GNUNET_CORE_Handle * core
Handle to the CORE service.
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 struct GNUNET_CONTAINER_MultiShortmap * routes
Routes on which this peer is an intermediate.
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).
static void connection_destroy(struct Connection *connection)
Destroy a connection.
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, struct GNUNET_CORE_ServiceInfo *service_info)
Connect to the core service.
@ GNUNET_CORE_SERVICE_CADET
Identifier for cadet service.
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).
struct GNUNET_CONTAINER_Heap * GNUNET_CONTAINER_heap_create(enum GNUNET_CONTAINER_HeapOrder order)
Create a new heap.
@ GNUNET_CONTAINER_HEAP_ORDER_MIN
Heap with the minimum cost at the root.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
#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.
Message for notifying a disconnection in a path.
Message for ack'ing a connection.
Message for cadet connection creation.
Message to destroy a connection.
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.
Gnunet service info - identifying compatibility with a range of version of a service communicating ov...
enum GNUNET_CORE_Service service
Identifier of the service on top of CORE.
Message handler for a specific message type.