GNUnet 0.21.0
gnunet_core_service.h File Reference

Core service; the main API for encrypted P2P communications. More...

#include "gnunet_util_lib.h"
Include dependency graph for gnunet_core_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EphemeralKeyMessage
 Message transmitted with the signed ephemeral key of a peer. More...
 
struct  PingMessage
 We're sending an (encrypted) PING to the other peer to check if it can decrypt. More...
 
struct  PongMessage
 Response to a PING. More...
 

Macros

#define GNUNET_CORE_VERSION   0x00000001
 Version number of GNUnet-core API. More...
 

Typedefs

typedef void *(* GNUNET_CORE_ConnectEventHandler) (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_MQ_Handle *mq)
 Method called whenever a given peer connects. More...
 
typedef void(* GNUNET_CORE_DisconnectEventHandler) (void *cls, const struct GNUNET_PeerIdentity *peer, void *peer_cls)
 Method called whenever a peer disconnects. More...
 
typedef void(* GNUNET_CORE_StartupCallback) (void *cls, const struct GNUNET_PeerIdentity *my_identity)
 Function called after GNUNET_CORE_connect has succeeded (or failed for good). More...
 
typedef void(* GNUNET_CORE_MonitorCallback) (void *cls, const struct GNUNET_PeerIdentity *pid, enum GNUNET_CORE_KxState state, struct GNUNET_TIME_Absolute timeout)
 Function called by the monitor callback whenever a peer's connection status changes. More...
 

Enumerations

enum  GNUNET_CORE_KxState {
  GNUNET_CORE_KX_STATE_DOWN = 0 , GNUNET_CORE_KX_STATE_KEY_SENT , GNUNET_CORE_KX_STATE_KEY_RECEIVED , GNUNET_CORE_KX_STATE_UP ,
  GNUNET_CORE_KX_STATE_REKEY_SENT , GNUNET_CORE_KX_PEER_DISCONNECT , GNUNET_CORE_KX_ITERATION_FINISHED , GNUNET_CORE_KX_CORE_DISCONNECT
}
 State machine for our P2P encryption handshake. More...
 

Functions

struct GNUNET_CORE_HandleGNUNET_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. More...
 
void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
 Disconnect from the core service. More...
 
struct GNUNET_MQ_HandleGNUNET_CORE_get_mq (const struct GNUNET_CORE_Handle *h, const struct GNUNET_PeerIdentity *pid)
 Obtain the message queue for a connected peer. More...
 
struct GNUNET_CORE_MonitorHandleGNUNET_CORE_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CORE_MonitorCallback peer_cb, void *peer_cb_cls)
 Monitor connectivity and KX status of all peers known to CORE. More...
 
void GNUNET_CORE_monitor_stop (struct GNUNET_CORE_MonitorHandle *mh)
 Stop monitoring CORE activity. More...
 
int GNUNET_CORE_is_peer_connected_sync (const struct GNUNET_CORE_Handle *h, const struct GNUNET_PeerIdentity *pid)
 Check if the given peer is currently connected. More...
 
struct GNUNET_MQ_HandleGNUNET_CORE_mq_create (struct GNUNET_CORE_Handle *h, const struct GNUNET_PeerIdentity *target)
 Create a message queue for sending messages to a peer with CORE. More...
 

Detailed Description

Core service; the main API for encrypted P2P communications.

Definition in file gnunet_core_service.h.