36 #ifndef GNUNET_TRANSPORT_CORE_SERVICE_H
37 #define GNUNET_TRANSPORT_CORE_SERVICE_H
52 #define GNUNET_TRANSPORT_CORE_VERSION 0x00000000
73 typedef void *(*GNUNET_TRANSPORT_NotifyConnect) (
struct GNUNET_MQ_Handle * mq
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static struct GNUNET_CADET_MessageHandler handlers[]
Handlers, for diverse services.
static struct GNUNET_CADET_Channel * ch
Channel handle.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
static struct GNUNET_PEERINFO_NotifyContext * nc
Iterator context.
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
void *(* GNUNET_TRANSPORT_NotifyConnect)(void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_MQ_Handle *mq)
Function called to notify transport users that another peer connected to us.
struct GNUNET_TRANSPORT_CoreHandle * GNUNET_TRANSPORT_core_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_PeerIdentity *self, const struct GNUNET_MQ_MessageHandler *handlers, void *cls, GNUNET_TRANSPORT_NotifyConnect nc, GNUNET_TRANSPORT_NotifyDisconnect nd)
Connect to the transport service.
void(* GNUNET_TRANSPORT_NotifyDisconnect)(void *cls, const struct GNUNET_PeerIdentity *peer, void *handler_cls)
Function called to notify transport users that another peer disconnected from us.
void GNUNET_TRANSPORT_core_disconnect(struct GNUNET_TRANSPORT_CoreHandle *handle)
Disconnect from the transport service.
struct GNUNET_MQ_Handle * GNUNET_TRANSPORT_core_get_mq(struct GNUNET_TRANSPORT_CoreHandle *handle, const struct GNUNET_PeerIdentity *peer)
Checks if a given peer is connected to us and get the message queue.
Handle to a message queue.
Message handler for a specific message type.
The identity of the host (wraps the signing key of the peer).
Handle for the transport service (includes all of the state for the transport service).
void * cls
Closure for the callbacks.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.