69 const void *plugin_addr,
70 size_t plugin_addr_len,
107 addrp = (
char *) &msg[1];
109 strcpy (&addrp[plugin_addr_len], plugin_name);
147 const void *plugin_addr,
148 size_t plugin_addr_len,
171 "# performance updates given to clients",
195 const void *plugin_addr,
196 size_t plugin_addr_len,
208 "Callback for peer `%s' plugin `%s' BW out %u, BW in %u \n",
211 (
unsigned int) ntohl (bandwidth_out.
value__),
212 (
unsigned int) ntohl (bandwidth_in.
value__));
struct GNUNET_MQ_Envelope * GNUNET_MQ_msg_copy(const struct GNUNET_MessageHeader *hdr)
Create a new envelope by copying an existing message.
The notification context is the key datastructure for a convenience API used for transmission of noti...
struct GNUNET_MessageHeader * msg
struct GNUNET_MQ_Handle * GNUNET_SERVICE_client_get_mq(struct GNUNET_SERVICE_Client *c)
Obtain the message queue of c.
StartFlag
Flag used to indicate which type of client is connecting to the ATS service.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_ATS_properties_hton(struct GNUNET_ATS_PropertiesNBO *nbo, const struct GNUNET_ATS_Properties *hbo)
Convert ATS properties from host to network byte order.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
#define GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION
Type of the 'struct PeerInformationMessage' sent by ATS to clients to inform about QoS for a particul...
struct GNUNET_STATISTICS_Handle * GSA_stats
Handle for statistics.
void GNUNET_notification_context_add(struct GNUNET_NotificationContext *nc, struct GNUNET_MQ_Handle *mq)
Add a subscriber to the notification context.
ATS performance characteristics for an address.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
uint32_t value__
The actual value (bytes per second).
Handle to a client that is connected to a service.
void GAS_addresses_get_peer_info(const struct GNUNET_PeerIdentity *peer, GNUNET_ATS_PeerInfo_Iterator pi_it, void *pi_it_cls)
Return information all peers currently known to ATS.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_MQ_Envelope * env
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
ats service address management
#define GNUNET_MAX_MESSAGE_SIZE
Largest supported message (to be precise, one byte more than the largest possible message...
struct GNUNET_NotificationContext * GNUNET_notification_context_create(unsigned int queue_length)
Create a new notification context.
enum GNUNET_NetworkType scope
Which network scope does the respective address belong to? This property does not change...
Handle to a message queue.
void GNUNET_notification_context_broadcast(struct GNUNET_NotificationContext *nc, const struct GNUNET_MessageHeader *msg, int can_drop)
Send a message to all subscribers of this context.
The identity of the host (wraps the signing key of the peer).
#define GNUNET_ALIGN
gcc-ism to force alignment; we use this to align char-arrays that may then be cast to 'struct's...
struct GNUNET_MQ_Handle * mq
#define GNUNET_log(kind,...)
void GNUNET_notification_context_destroy(struct GNUNET_NotificationContext *nc)
Destroy the context, force disconnect for all subscribers.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
GNUNET_HELLO_AddressInfo
Additional local information about an address.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
static char * plugin_name
Name of our plugin.
automatic transport selection messages
Performance monitoring client that wants to learn about changes in performance characteristics.