This change lets us compile with clang again.
static int
reconnect_arm (struct GNUNET_ARM_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (arm_result,
- GNUNET_MESSAGE_TYPE_ARM_RESULT,
- struct GNUNET_ARM_ResultMessage);
- GNUNET_MQ_hd_var_size (arm_list_result,
- GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
- struct GNUNET_ARM_ListResultMessage);
- GNUNET_MQ_hd_fixed_size (confirm,
- GNUNET_MESSAGE_TYPE_TEST,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_arm_result_handler (h),
- make_arm_list_result_handler (h),
- make_confirm_handler (h),
+ GNUNET_MQ_hd_fixed_size (arm_result,
+ GNUNET_MESSAGE_TYPE_ARM_RESULT,
+ struct GNUNET_ARM_ResultMessage,
+ h),
+ GNUNET_MQ_hd_var_size (arm_list_result,
+ GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
+ struct GNUNET_ARM_ListResultMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (confirm,
+ GNUNET_MESSAGE_TYPE_TEST,
+ struct GNUNET_MessageHeader,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *test;
static int
reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h)
{
- GNUNET_MQ_hd_var_size (monitor_notify,
- GNUNET_MESSAGE_TYPE_ARM_STATUS,
- struct GNUNET_ARM_StatusMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_monitor_notify_handler (h),
+ GNUNET_MQ_hd_var_size (monitor_notify,
+ GNUNET_MESSAGE_TYPE_ARM_STATUS,
+ struct GNUNET_ARM_StatusMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *msg;
transport_connect_adapter (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_fixed_size (ping,
- TEST_MESSAGE_TYPE_PING,
- struct TestMessage);
- GNUNET_MQ_hd_fixed_size (pong,
- TEST_MESSAGE_TYPE_PONG,
- struct TestMessage);
struct BenchmarkPeer *me = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_ping_handler (me),
- make_pong_handler (me),
+ GNUNET_MQ_hd_fixed_size (ping,
+ TEST_MESSAGE_TYPE_PING,
+ struct TestMessage,
+ me),
+ GNUNET_MQ_hd_fixed_size (pong,
+ TEST_MESSAGE_TYPE_PONG,
+ struct TestMessage,
+ me),
GNUNET_MQ_handler_end ()
};
core_connect_adapter (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_fixed_size (ping,
- TEST_MESSAGE_TYPE_PING,
- struct TestMessage);
- GNUNET_MQ_hd_fixed_size (pong,
- TEST_MESSAGE_TYPE_PONG,
- struct TestMessage);
struct BenchmarkPeer *me = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_ping_handler (me),
- make_pong_handler (me),
+ GNUNET_MQ_hd_fixed_size (ping,
+ TEST_MESSAGE_TYPE_PING,
+ struct TestMessage,
+ me),
+ GNUNET_MQ_hd_fixed_size (pong,
+ TEST_MESSAGE_TYPE_PONG,
+ struct TestMessage,
+ me),
GNUNET_MQ_handler_end ()
};
static void
reconnect (struct GNUNET_ATS_PerformanceHandle *ph)
{
- GNUNET_MQ_hd_var_size (peer_information,
- GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION,
- struct PeerInformationMessage);
- GNUNET_MQ_hd_fixed_size (reservation_result,
- GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT,
- struct ReservationResultMessage);
- GNUNET_MQ_hd_var_size (address_list,
- GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE,
- struct PeerInformationMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_peer_information_handler (ph),
- make_reservation_result_handler (ph),
- make_address_list_handler (ph),
+ GNUNET_MQ_hd_var_size (peer_information,
+ GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION,
+ struct PeerInformationMessage,
+ ph),
+ GNUNET_MQ_hd_fixed_size (reservation_result,
+ GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT,
+ struct ReservationResultMessage,
+ ph),
+ GNUNET_MQ_hd_var_size (address_list,
+ GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE,
+ struct PeerInformationMessage,
+ ph),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
reconnect (struct GNUNET_ATS_SchedulingHandle *sh)
{
- GNUNET_MQ_hd_fixed_size (ats_session_release,
- GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE,
- struct GNUNET_ATS_SessionReleaseMessage);
- GNUNET_MQ_hd_fixed_size (ats_address_suggestion,
- GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION,
- struct AddressSuggestionMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_ats_session_release_handler (sh),
- make_ats_address_suggestion_handler (sh),
+ GNUNET_MQ_hd_fixed_size (ats_session_release,
+ GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE,
+ struct GNUNET_ATS_SessionReleaseMessage,
+ sh),
+ GNUNET_MQ_hd_fixed_size (ats_address_suggestion,
+ GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION,
+ struct AddressSuggestionMessage,
+ sh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *ev;
static int
do_reconnect (struct GNUNET_CADET_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (channel_created,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
- struct GNUNET_CADET_ChannelCreateMessage);
- GNUNET_MQ_hd_fixed_size (channel_destroy,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
- struct GNUNET_CADET_ChannelDestroyMessage);
- GNUNET_MQ_hd_var_size (local_data,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA,
- struct GNUNET_CADET_LocalData);
- GNUNET_MQ_hd_fixed_size (local_ack,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK,
- struct GNUNET_CADET_LocalAck);
- GNUNET_MQ_hd_var_size (get_peers,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS,
- struct GNUNET_CADET_LocalInfoPeer);
- GNUNET_MQ_hd_var_size (get_peer,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER,
- struct GNUNET_CADET_LocalInfoPeer);
- GNUNET_MQ_hd_var_size (get_tunnels,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS,
- struct GNUNET_CADET_LocalInfoTunnel);
- GNUNET_MQ_hd_var_size (get_tunnel,
- GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL,
- struct GNUNET_CADET_LocalInfoTunnel);
+ struct GNUNET_MQ_MessageHandler handlers[] = {
+ GNUNET_MQ_hd_fixed_size (channel_created,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
+ struct GNUNET_CADET_ChannelCreateMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (channel_destroy,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
+ struct GNUNET_CADET_ChannelDestroyMessage,
+ h),
+ GNUNET_MQ_hd_var_size (local_data,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA,
+ struct GNUNET_CADET_LocalData,
+ h),
+ GNUNET_MQ_hd_fixed_size (local_ack,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK,
+ struct GNUNET_CADET_LocalAck,
+ h),
+ GNUNET_MQ_hd_var_size (get_peers,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS,
+ struct GNUNET_CADET_LocalInfoPeer,
+ h),
+ GNUNET_MQ_hd_var_size (get_peer,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER,
+ struct GNUNET_CADET_LocalInfoPeer,
+ h),
+ GNUNET_MQ_hd_var_size (get_tunnels,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS,
+ struct GNUNET_CADET_LocalInfoTunnel,
+ h),
+ GNUNET_MQ_hd_var_size (get_tunnel,
+ GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL,
+ struct GNUNET_CADET_LocalInfoTunnel,
+ h),
// FIXME
// GNUNET_MQ_hd_fixed_Y size (channel_destroyed,
// GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK,
// struct GNUNET_CADET_ChannelDestroyMessage);
- struct GNUNET_MQ_MessageHandler handlers[] = {
- make_channel_created_handler (h),
- make_channel_destroy_handler (h),
- make_local_data_handler (h),
- make_local_ack_handler (h),
- make_get_peers_handler (h),
- make_get_peer_handler (h),
- make_get_tunnels_handler (h),
- make_get_tunnel_handler (h),
GNUNET_MQ_handler_end ()
};
GNUNET_CONSENSUS_ElementCallback new_element_cb,
void *new_element_cls)
{
- GNUNET_MQ_hd_var_size (new_element,
- GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT,
- struct GNUNET_CONSENSUS_ElementMessage);
- GNUNET_MQ_hd_fixed_size (conclude_done,
- GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE,
- struct GNUNET_MessageHeader);
struct GNUNET_CONSENSUS_Handle *consensus
= GNUNET_new (struct GNUNET_CONSENSUS_Handle);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_new_element_handler (consensus),
- make_conclude_done_handler (consensus),
+ GNUNET_MQ_hd_var_size (new_element,
+ GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT,
+ struct GNUNET_CONSENSUS_ElementMessage,
+ consensus),
+ GNUNET_MQ_hd_fixed_size (conclude_done,
+ GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE,
+ struct GNUNET_MessageHeader,
+ consensus),
GNUNET_MQ_handler_end ()
};
struct GNUNET_CONSENSUS_JoinMessage *join_msg;
static void
reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone)
{
- GNUNET_MQ_hd_fixed_size (phone_ring,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
- struct ClientPhoneRingMessage);
- GNUNET_MQ_hd_fixed_size (phone_hangup,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
- struct ClientPhoneHangupMessage);
- GNUNET_MQ_hd_fixed_size (phone_suspend,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
- struct ClientPhoneSuspendMessage);
- GNUNET_MQ_hd_fixed_size (phone_resume,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
- struct ClientPhoneResumeMessage);
- GNUNET_MQ_hd_var_size (phone_audio,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
- struct ClientAudioMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_phone_ring_handler (phone),
- make_phone_hangup_handler (phone),
- make_phone_suspend_handler (phone),
- make_phone_resume_handler (phone),
- make_phone_audio_handler (phone),
+ GNUNET_MQ_hd_fixed_size (phone_ring,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
+ struct ClientPhoneRingMessage,
+ phone),
+ GNUNET_MQ_hd_fixed_size (phone_hangup,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
+ struct ClientPhoneHangupMessage,
+ phone),
+ GNUNET_MQ_hd_fixed_size (phone_suspend,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
+ struct ClientPhoneSuspendMessage,
+ phone),
+ GNUNET_MQ_hd_fixed_size (phone_resume,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
+ struct ClientPhoneResumeMessage,
+ phone),
+ GNUNET_MQ_hd_var_size (phone_audio,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
+ struct ClientAudioMessage,
+ phone),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *e;
GNUNET_CONVERSATION_CallEventHandler event_handler,
void *event_handler_cls)
{
- GNUNET_MQ_hd_fixed_size (call_suspend,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
- struct ClientPhoneSuspendMessage);
- GNUNET_MQ_hd_fixed_size (call_resume,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
- struct ClientPhoneResumeMessage);
- GNUNET_MQ_hd_fixed_size (call_picked_up,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
- struct ClientPhonePickedupMessage);
- GNUNET_MQ_hd_fixed_size (call_hangup,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
- struct ClientPhoneHangupMessage);
- GNUNET_MQ_hd_var_size (call_audio,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
- struct ClientAudioMessage);
struct GNUNET_CONVERSATION_Call *call
= GNUNET_new (struct GNUNET_CONVERSATION_Call);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_call_suspend_handler (call),
- make_call_resume_handler (call),
- make_call_picked_up_handler (call),
- make_call_hangup_handler (call),
- make_call_audio_handler (call),
+ GNUNET_MQ_hd_fixed_size (call_suspend,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
+ struct ClientPhoneSuspendMessage,
+ call),
+ GNUNET_MQ_hd_fixed_size (call_resume,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
+ struct ClientPhoneResumeMessage,
+ call),
+ GNUNET_MQ_hd_fixed_size (call_picked_up,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
+ struct ClientPhonePickedupMessage,
+ call),
+ GNUNET_MQ_hd_fixed_size (call_hangup,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
+ struct ClientPhoneHangupMessage,
+ call),
+ GNUNET_MQ_hd_var_size (call_audio,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
+ struct ClientAudioMessage,
+ call),
GNUNET_MQ_handler_end ()
};
struct GNUNET_CRYPTO_EcdsaPublicKey my_zone;
static void
reconnect (struct GNUNET_CORE_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (init_reply,
- GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
- struct InitReplyMessage);
- GNUNET_MQ_hd_fixed_size (connect_notify,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
- struct ConnectNotifyMessage);
- GNUNET_MQ_hd_fixed_size (disconnect_notify,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
- struct DisconnectNotifyMessage);
- GNUNET_MQ_hd_var_size (notify_inbound,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
- struct NotifyTrafficMessage);
- GNUNET_MQ_hd_var_size (notify_outbound,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND,
- struct NotifyTrafficMessage);
- GNUNET_MQ_hd_fixed_size (send_ready,
- GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
- struct SendMessageReady);
- struct GNUNET_MQ_MessageHandler handlers[] = {
- make_init_reply_handler (h),
- make_connect_notify_handler (h),
- make_disconnect_notify_handler (h),
- make_notify_inbound_handler (h),
- make_notify_outbound_handler (h),
- make_send_ready_handler (h),
+ struct GNUNET_MQ_MessageHandler handlers[] = {
+ GNUNET_MQ_hd_fixed_size (init_reply,
+ GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
+ struct InitReplyMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (connect_notify,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
+ struct ConnectNotifyMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (disconnect_notify,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
+ struct DisconnectNotifyMessage,
+ h),
+ GNUNET_MQ_hd_var_size (notify_inbound,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
+ struct NotifyTrafficMessage,
+ h),
+ GNUNET_MQ_hd_var_size (notify_outbound,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND,
+ struct NotifyTrafficMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (send_ready,
+ GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
+ struct SendMessageReady,
+ h),
GNUNET_MQ_handler_end ()
};
struct InitMessage *init;
static void
reconnect (struct GNUNET_CORE_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (init_reply,
- GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
- struct InitReplyMessage);
- GNUNET_MQ_hd_fixed_size (connect_notify,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
- struct ConnectNotifyMessage);
- GNUNET_MQ_hd_fixed_size (disconnect_notify,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
- struct DisconnectNotifyMessage);
- GNUNET_MQ_hd_var_size (notify_inbound,
- GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
- struct NotifyTrafficMessage);
- GNUNET_MQ_hd_fixed_size (send_ready,
- GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
- struct SendMessageReady);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_init_reply_handler (h),
- make_connect_notify_handler (h),
- make_disconnect_notify_handler (h),
- make_notify_inbound_handler (h),
- make_send_ready_handler (h),
+ GNUNET_MQ_hd_fixed_size (init_reply,
+ GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
+ struct InitReplyMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (connect_notify,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
+ struct ConnectNotifyMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (disconnect_notify,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
+ struct DisconnectNotifyMessage,
+ h),
+ GNUNET_MQ_hd_var_size (notify_inbound,
+ GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
+ struct NotifyTrafficMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (send_ready,
+ GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
+ struct SendMessageReady,
+ h),
GNUNET_MQ_handler_end ()
};
struct InitMessage *init;
static void
reconnect (struct GNUNET_CORE_MonitorHandle *mh)
{
- GNUNET_MQ_hd_fixed_size (receive_info,
- GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY,
- struct MonitorNotifyMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_receive_info_handler (mh),
+ GNUNET_MQ_hd_fixed_size (receive_info,
+ GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY,
+ struct MonitorNotifyMessage,
+ mh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk,
struct GNUNET_SERVER_Handle *server)
{
- GNUNET_MQ_hd_fixed_size (ephemeral_key,
- GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
- struct EphemeralKeyMessage);
- GNUNET_MQ_hd_fixed_size (ping,
- GNUNET_MESSAGE_TYPE_CORE_PING,
- struct PingMessage);
- GNUNET_MQ_hd_fixed_size (pong,
- GNUNET_MESSAGE_TYPE_CORE_PONG,
- struct PongMessage);
- GNUNET_MQ_hd_var_size (encrypted,
- GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE,
- struct EncryptedMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_ephemeral_key_handler (NULL),
- make_ping_handler (NULL),
- make_pong_handler (NULL),
- make_encrypted_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (ephemeral_key,
+ GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
+ struct EphemeralKeyMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (ping,
+ GNUNET_MESSAGE_TYPE_CORE_PING,
+ struct PingMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (pong,
+ GNUNET_MESSAGE_TYPE_CORE_PONG,
+ struct PongMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (encrypted,
+ GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE,
+ struct EncryptedMessage,
+ NULL),
GNUNET_MQ_handler_end()
};
init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
- GNUNET_MQ_hd_fixed_size (test,
- MTYPE,
- struct GNUNET_MessageHeader);
struct PeerContext *p = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ MTYPE,
+ struct GNUNET_MessageHeader,
+ NULL);
GNUNET_MQ_handler_end ()
};
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_fixed_size (test,
- MTYPE,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ MTYPE,
+ struct GNUNET_MessageHeader,
+ NULL);
GNUNET_MQ_handler_end ()
};
init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
- GNUNET_MQ_hd_var_size (test,
- MTYPE,
- struct TestMessage);
struct PeerContext *p = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_var_size (test,
+ MTYPE,
+ struct TestMessage,
+ NULL);
GNUNET_MQ_handler_end ()
};
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_fixed_size (test,
- MTYPE,
- struct TestMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ MTYPE,
+ struct TestMessage,
+ NULL);
GNUNET_MQ_handler_end ()
};
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
- GNUNET_MQ_hd_fixed_size (test,
- GNUNET_MESSAGE_TYPE_DUMMY,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ GNUNET_MESSAGE_TYPE_DUMMY,
+ struct GNUNET_MessageHeader,
+ NULL),
GNUNET_MQ_handler_end ()
};
init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
- GNUNET_MQ_hd_fixed_size (test,
- MTYPE,
- struct TestMessage);
struct PeerContext *p = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ MTYPE,
+ struct TestMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_fixed_size (test,
- MTYPE,
- struct TestMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (test,
+ MTYPE,
+ struct TestMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
static void
try_reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (status,
- GNUNET_MESSAGE_TYPE_DATASTORE_STATUS,
- struct StatusMessage);
- GNUNET_MQ_hd_var_size (data,
- GNUNET_MESSAGE_TYPE_DATASTORE_DATA,
- struct DataMessage);
- GNUNET_MQ_hd_fixed_size (data_end,
- GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END,
- struct GNUNET_MessageHeader);
struct GNUNET_DATASTORE_Handle *h = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_status_handler (h),
- make_data_handler (h),
- make_data_end_handler (h),
+ GNUNET_MQ_hd_var_size (status,
+ GNUNET_MESSAGE_TYPE_DATASTORE_STATUS,
+ struct StatusMessage,
+ h),
+ GNUNET_MQ_hd_var_size (data,
+ GNUNET_MESSAGE_TYPE_DATASTORE_DATA,
+ struct DataMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (data_end,
+ GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END,
+ struct GNUNET_MessageHeader,
+ h),
GNUNET_MQ_handler_end ()
};
static int
try_connect (struct GNUNET_DHT_Handle *h)
{
- GNUNET_MQ_hd_var_size (monitor_get,
- GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET,
- struct GNUNET_DHT_MonitorGetMessage);
- GNUNET_MQ_hd_var_size (monitor_get_resp,
- GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP,
- struct GNUNET_DHT_MonitorGetRespMessage);
- GNUNET_MQ_hd_var_size (monitor_put,
- GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT,
- struct GNUNET_DHT_MonitorPutMessage);
- GNUNET_MQ_hd_var_size (client_result,
- GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT,
- struct GNUNET_DHT_ClientResultMessage);
- GNUNET_MQ_hd_fixed_size (put_confirmation,
- GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK,
- struct GNUNET_DHT_ClientPutConfirmationMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_monitor_get_handler (h),
- make_monitor_get_resp_handler (h),
- make_monitor_put_handler (h),
- make_client_result_handler (h),
- make_put_confirmation_handler (h),
+ GNUNET_MQ_hd_var_size (monitor_get,
+ GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET,
+ struct GNUNET_DHT_MonitorGetMessage,
+ h),
+ GNUNET_MQ_hd_var_size (monitor_get_resp,
+ GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP,
+ struct GNUNET_DHT_MonitorGetRespMessage,
+ h),
+ GNUNET_MQ_hd_var_size (monitor_put,
+ GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT,
+ struct GNUNET_DHT_MonitorPutMessage,
+ h),
+ GNUNET_MQ_hd_var_size (client_result,
+ GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT,
+ struct GNUNET_DHT_ClientResultMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (put_confirmation,
+ GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK,
+ struct GNUNET_DHT_ClientPutConfirmationMessage,
+ h),
GNUNET_MQ_handler_end ()
};
if (NULL != h->mq)
int
GDS_NEIGHBOURS_init ()
{
- GNUNET_MQ_hd_var_size (dht_p2p_get,
- GNUNET_MESSAGE_TYPE_DHT_P2P_GET,
- struct PeerGetMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_put,
- GNUNET_MESSAGE_TYPE_DHT_P2P_PUT,
- struct PeerPutMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_result,
- GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT,
- struct PeerResultMessage);
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_dht_p2p_get_handler (NULL),
- make_dht_p2p_put_handler (NULL),
- make_dht_p2p_result_handler (NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_get,
+ GNUNET_MESSAGE_TYPE_DHT_P2P_GET,
+ struct PeerGetMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_put,
+ GNUNET_MESSAGE_TYPE_DHT_P2P_PUT,
+ struct PeerPutMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_result,
+ GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT,
+ struct PeerResultMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
unsigned long long temp_config_num;
int
GDS_NEIGHBOURS_init (void)
{
- GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk,
- GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK,
- struct RandomWalkMessage);
- GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk_response,
- GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE,
- struct RandomWalkResponseMessage);
- GNUNET_MQ_hd_fixed_size (dht_p2p_trail_destroy,
- GNUNET_MESSAGE_TYPE_WDHT_TRAIL_DESTROY,
- struct TrailDestroyMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_trail_route,
- GNUNET_MESSAGE_TYPE_WDHT_TRAIL_ROUTE,
- struct TrailRouteMessage);
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_dht_p2p_random_walk_handler (NULL),
- make_dht_p2p_random_walk_response_handler (NULL),
- make_dht_p2p_trail_destroy_handler (NULL),
- make_dht_p2p_trail_route_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk,
+ GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK,
+ struct RandomWalkMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk_response,
+ GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE,
+ struct RandomWalkResponseMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (dht_p2p_trail_destroy,
+ GNUNET_MESSAGE_TYPE_WDHT_TRAIL_DESTROY,
+ struct TrailDestroyMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_trail_route,
+ GNUNET_MESSAGE_TYPE_WDHT_TRAIL_ROUTE,
+ struct TrailRouteMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
int
GDS_NEIGHBOURS_init (void)
{
- GNUNET_MQ_hd_var_size (dht_p2p_put,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_PUT,
- struct PeerPutMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_get,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_GET,
- struct PeerGetMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_get_result,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_GET_RESULT,
- struct PeerGetResultMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_trail_setup,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP,
- struct PeerTrailSetupMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_result,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_RESULT,
- struct PeerTrailSetupResultMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_verify_successor,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR,
- struct PeerVerifySuccessorMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_verify_successor_result,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR_RESULT,
- struct PeerVerifySuccessorResultMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_notify_new_successor,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_NEW_SUCCESSOR,
- struct PeerNotifyNewSuccessorMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_rejection,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_REJECTION,
- struct PeerTrailRejectionMessage);
- GNUNET_MQ_hd_fixed_size (dht_p2p_trail_teardown,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_TEARDOWN,
- struct PeerTrailTearDownMessage);
- GNUNET_MQ_hd_var_size (dht_p2p_add_trail,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_ADD_TRAIL,
- struct PeerAddTrailMessage);
- GNUNET_MQ_hd_fixed_size (dht_p2p_notify_succ_confirmation,
- GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION,
- struct PeerNotifyConfirmationMessage);
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_dht_p2p_put_handler (NULL),
- make_dht_p2p_get_handler (NULL),
- make_dht_p2p_get_result_handler (NULL),
- make_dht_p2p_trail_setup_handler (NULL),
- make_dht_p2p_trail_setup_result_handler (NULL),
- make_dht_p2p_verify_successor_handler (NULL),
- make_dht_p2p_verify_successor_result_handler (NULL),
- make_dht_p2p_notify_new_successor_handler (NULL),
- make_dht_p2p_trail_setup_rejection_handler (NULL),
- make_dht_p2p_trail_teardown_handler (NULL),
- make_dht_p2p_add_trail_handler (NULL),
- make_dht_p2p_notify_succ_confirmation_handler (NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_put,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_PUT,
+ struct PeerPutMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_get,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_GET,
+ struct PeerGetMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_get_result,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_GET_RESULT,
+ struct PeerGetResultMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_trail_setup,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP,
+ struct PeerTrailSetupMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_result,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_RESULT,
+ struct PeerTrailSetupResultMessag,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_verify_successor,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR,
+ struct PeerVerifySuccessorMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_verify_successor_result,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR_RESULT,
+ struct PeerVerifySuccessorResultMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_notify_new_successor,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_NEW_SUCCESSOR,
+ struct PeerNotifyNewSuccessorMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_rejection,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_REJECTION,
+ struct PeerTrailRejectionMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (dht_p2p_trail_teardown,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_TEARDOWN,
+ struct PeerTrailTearDownMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (dht_p2p_add_trail,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_ADD_TRAIL,
+ struct PeerAddTrailMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (dht_p2p_notify_succ_confirmation,
+ GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION,
+ struct PeerNotifyConfirmationMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (request,
- GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST,
- struct GNUNET_DNS_Request);
struct GNUNET_DNS_Handle *dh = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_request_handler (dh),
+ GNUNET_MQ_hd_var_size (request,
+ GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST,
+ struct GNUNET_DNS_Request,
+ dh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
reconnect (struct GNUNET_DV_ServiceHandle *sh)
{
- GNUNET_MQ_hd_fixed_size (connect,
- GNUNET_MESSAGE_TYPE_DV_CONNECT,
- struct GNUNET_DV_ConnectMessage);
- GNUNET_MQ_hd_fixed_size (disconnect,
- GNUNET_MESSAGE_TYPE_DV_DISCONNECT,
- struct GNUNET_DV_DisconnectMessage);
- GNUNET_MQ_hd_fixed_size (distance_update,
- GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED,
- struct GNUNET_DV_DistanceUpdateMessage);
- GNUNET_MQ_hd_var_size (received,
- GNUNET_MESSAGE_TYPE_DV_RECV,
- struct GNUNET_DV_ReceivedMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_connect_handler (sh),
- make_disconnect_handler (sh),
- make_distance_update_handler (sh),
- make_received_handler (sh),
+ GNUNET_MQ_hd_fixed_size (connect,
+ GNUNET_MESSAGE_TYPE_DV_CONNECT,
+ struct GNUNET_DV_ConnectMessage,
+ sh),
+ GNUNET_MQ_hd_fixed_size (disconnect,
+ GNUNET_MESSAGE_TYPE_DV_DISCONNECT,
+ struct GNUNET_DV_DisconnectMessage,
+ sh),
+ GNUNET_MQ_hd_fixed_size (distance_update,
+ GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED,
+ struct GNUNET_DV_DistanceUpdateMessage,
+ sh),
+ GNUNET_MQ_hd_var_size (received,
+ GNUNET_MESSAGE_TYPE_DV_RECV,
+ struct GNUNET_DV_ReceivedMessage,
+ sh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *sm;
struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_MQ_hd_var_size (dv_route_message,
- GNUNET_MESSAGE_TYPE_DV_ROUTE,
- struct RouteMessage);
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_dv_route_message_handler (NULL),
+ GNUNET_MQ_hd_var_size (dv_route_message,
+ GNUNET_MESSAGE_TYPE_DV_ROUTE,
+ struct RouteMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = {
static void
do_reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (put,
- GNUNET_MESSAGE_TYPE_FS_PUT,
- struct ClientPutMessage);
struct GNUNET_FS_DownloadContext *dc = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_put_handler (dc),
+ GNUNET_MQ_hd_var_size (put,
+ GNUNET_MESSAGE_TYPE_FS_PUT,
+ struct ClientPutMessage,
+ dc),
GNUNET_MQ_handler_end ()
};
GNUNET_FS_IndexedFileProcessor iterator,
void *iterator_cls)
{
- GNUNET_MQ_hd_fixed_size (index_info_end,
- GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (index_info,
- GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY,
- struct IndexInfoMessage);
struct GNUNET_FS_GetIndexedContext *gic
= GNUNET_new (struct GNUNET_FS_GetIndexedContext);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_index_info_end_handler (gic),
- make_index_info_handler (gic),
+ GNUNET_MQ_hd_fixed_size (index_info_end,
+ GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END,
+ struct GNUNET_MessageHeader,
+ gic),
+ GNUNET_MQ_hd_var_size (index_info,
+ GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY,
+ struct IndexInfoMessage,
+ gic),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
hash_for_index_cb (void *cls,
const struct GNUNET_HashCode *res)
{
- GNUNET_MQ_hd_fixed_size (index_start_ok,
- GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (index_start_failed,
- GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED,
- struct GNUNET_MessageHeader);
struct GNUNET_FS_PublishContext *pc = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_index_start_ok_handler (pc),
- make_index_start_failed_handler (pc),
+ GNUNET_MQ_hd_fixed_size (index_start_ok,
+ GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK,
+ struct GNUNET_MessageHeader,
+ pc),
+ GNUNET_MQ_hd_var_size (index_start_failed,
+ GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED,
+ struct GNUNET_MessageHeader,
+ pc),
GNUNET_MQ_handler_end ()
};
struct GNUNET_FS_FileInformation *p;
static void
create_loc_uri (struct GNUNET_FS_PublishContext *pc)
{
- GNUNET_MQ_hd_fixed_size (signature_response,
- GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE,
- struct ResponseLocSignatureMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_signature_response_handler (pc),
+ GNUNET_MQ_hd_fixed_size (signature_response,
+ GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE,
+ struct ResponseLocSignatureMessage,
+ pc),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
do_reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_FS_PUT,
- struct ClientPutMessage);
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_result_handler (sc),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_FS_PUT,
+ struct ClientPutMessage,
+ sc),
GNUNET_MQ_handler_end ()
};
static void
unindex_finish (struct GNUNET_FS_UnindexContext *uc)
{
- GNUNET_MQ_hd_fixed_size (unindex_response,
- GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_unindex_response_handler (uc),
+ GNUNET_MQ_hd_fixed_size (unindex_response,
+ GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK,
+ struct GNUNET_MessageHeader,
+ uc),
GNUNET_MQ_handler_end ()
};
char *emsg;
main_init (struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_MQ_hd_var_size (p2p_get,
- GNUNET_MESSAGE_TYPE_FS_GET,
- struct GetMessage);
- GNUNET_MQ_hd_var_size (p2p_put,
- GNUNET_MESSAGE_TYPE_FS_PUT,
- struct PutMessage);
- GNUNET_MQ_hd_fixed_size (p2p_migration_stop,
- GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP,
- struct MigrationStopMessage);
struct GNUNET_MQ_MessageHandler no_p2p_handlers[] = {
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_MessageHandler p2p_handlers[] = {
- make_p2p_get_handler (NULL),
- make_p2p_put_handler (NULL),
- make_p2p_migration_stop_handler (NULL),
+ GNUNET_MQ_hd_var_size (p2p_get,
+ GNUNET_MESSAGE_TYPE_FS_GET,
+ struct GetMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (p2p_put,
+ GNUNET_MESSAGE_TYPE_FS_PUT,
+ struct PutMessage,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (p2p_migration_stop,
+ GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP,
+ struct MigrationStopMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
static void
reconnect (struct GNUNET_GNS_Handle *handle)
{
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT,
- struct GNUNET_GNS_ClientLookupResultMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_result_handler (handle),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT,
+ struct GNUNET_GNS_ClientLookupResultMessage,
+ handle),
GNUNET_MQ_handler_end ()
};
struct GNUNET_GNS_LookupRequest *lh;
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_var_size (advertisement,
- GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler learn_handlers[] = {
- make_advertisement_handler (NULL),
+ GNUNET_MQ_hd_var_size (advertisement,
+ GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
+ struct GNUNET_MessageHeader,
+ NULL),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_MessageHandler no_learn_handlers[] = {
setup_learn_peer (struct PeerContext *p,
const char *cfgname)
{
- GNUNET_MQ_hd_var_size (ad_arrive,
- GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler learn_handlers[] = {
- make_ad_arrive_handler (NULL),
+ GNUNET_MQ_hd_var_size (ad_arrive,
+ GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
+ struct GNUNET_MessageHeader,
+ NULL),
GNUNET_MQ_handler_end ()
};
char *filename;
static void
reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h)
{
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT,
- struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage);
- GNUNET_MQ_hd_var_size (exchange_result,
- GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT,
- struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_result_handler (h),
- make_exchange_result_handler (h),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT,
+ struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage,
+ h),
+ GNUNET_MQ_hd_var_size (exchange_result,
+ GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT,
+ struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_IDENTITY_PROVIDER_Operation *op;
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (identity_result_code,
- GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE,
- struct GNUNET_IDENTITY_ResultCodeMessage);
- GNUNET_MQ_hd_var_size (identity_update,
- GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE,
- struct GNUNET_IDENTITY_UpdateMessage);
- GNUNET_MQ_hd_var_size (identity_set_default,
- GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT,
- struct GNUNET_IDENTITY_SetDefaultMessage);
struct GNUNET_IDENTITY_Handle *h = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_identity_result_code_handler (h),
- make_identity_update_handler (h),
- make_identity_set_default_handler (h),
+ GNUNET_MQ_hd_var_size (identity_result_code,
+ GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE,
+ struct GNUNET_IDENTITY_ResultCodeMessage,
+ h),
+ GNUNET_MQ_hd_var_size (identity_update,
+ GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE,
+ struct GNUNET_IDENTITY_UpdateMessage,
+ h),
+ GNUNET_MQ_hd_var_size (identity_set_default,
+ GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT,
+ struct GNUNET_IDENTITY_SetDefaultMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
* const struct GNUNET_MessageTest *msg)
* { ... }
*
- * GNUNET_MQ_hd_fixed_size(test_message,
- * GNUNET_MESSAGE_TYPE_TEST,
- * struct GNUNET_MessageTest);
* struct GNUNET_MQ_MessageHandler handlers[] = {
- * make_test_message_handler (NULL),
+ * GNUNET_MQ_hd_fixed_size(test_message,
+ * GNUNET_MESSAGE_TYPE_TEST,
+ * struct GNUNET_MessageTest,
+ * "context"),
* GNUNET_MQ_handler_end()
* };
*
* @param name unique basename for the functions
* @param code message type constant
* @param str type of the message (a struct)
+ * @param ctx context for the callbacks
*/
-#define GNUNET_MQ_hd_fixed_size(name,code,str) \
- struct GNUNET_MQ_MessageHandler \
- make_##name##_handler (void *cls) { \
- void (*cb)(void *cls, const str *msg) = &handle_##name; \
- struct GNUNET_MQ_MessageHandler mh = { \
- NULL, (GNUNET_MQ_MessageCallback) cb, \
- cls, code, sizeof (str) }; \
- return mh; \
- }
+#define GNUNET_MQ_hd_fixed_size(name,code,str,ctx) \
+ ({ \
+ void (*_cb)(void *cls, const str *msg) = &handle_##name; \
+ ((struct GNUNET_MQ_MessageHandler) { \
+ NULL, (GNUNET_MQ_MessageCallback) _cb, \
+ (ctx), (code), sizeof (str) }); \
+ })
/**
* The macro is to be used as follows:
* <code>
* struct GNUNET_MessageTest { ... }; // can be variable size
- * GNUNET_MQ_hd_var_size(test_message,
- * GNUNET_MESSAGE_TYPE_TEST,
- * struct GNUNET_MessageTest);
* static int
* check_test (void *cls,
* const struct GNUNET_MessageTest *msg)
* }
*
* struct GNUNET_MQ_MessageHandler handlers[] = {
- * make_test_message_handler ("context"),
+ * GNUNET_MQ_hd_var_size(test_message,
+ * GNUNET_MESSAGE_TYPE_TEST,
+ * struct GNUNET_MessageTest,
+ * "context"),
* GNUNET_MQ_handler_end()
* };
*
* @param name unique basename for the functions
* @param code message type constant
* @param str type of the message (a struct)
- */
-#define GNUNET_MQ_hd_var_size(name,code,str) \
- struct GNUNET_MQ_MessageHandler \
- make_##name##_handler (void *ctx) { \
- int (*mv)(void *cls, const str *msg) = &check_##name; \
- void (*cb)(void *cls, const str *msg) = &handle_##name;\
- struct GNUNET_MQ_MessageHandler mh = \
- { (GNUNET_MQ_MessageValidationCallback) mv, \
- (GNUNET_MQ_MessageCallback) cb, \
- ctx, code, sizeof (str) }; \
- return mh; \
- }
+ * @param ctx context for the callbacks
+ */
+#define GNUNET_MQ_hd_var_size(name,code,str,ctx) \
+ ({ \
+ int (*_mv)(void *cls, const str *msg) = &check_##name; \
+ void (*_cb)(void *cls, const str *msg) = &handle_##name; \
+ ((struct GNUNET_MQ_MessageHandler) \
+ { (GNUNET_MQ_MessageValidationCallback) _mv, \
+ (GNUNET_MQ_MessageCallback) _cb, \
+ (ctx), (code), sizeof (str) }); \
+ })
/**
{
struct GNUNET_MULTICAST_Group *grp = &orig->grp;
- GNUNET_MQ_hd_var_size (group_message,
- GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
- struct GNUNET_MULTICAST_MessageHeader);
-
- GNUNET_MQ_hd_var_size (origin_request,
- GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST,
- struct GNUNET_MULTICAST_RequestHeader);
-
- GNUNET_MQ_hd_fixed_size (group_fragment_ack,
- GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (group_join_request,
- GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
- struct MulticastJoinRequestMessage);
-
- GNUNET_MQ_hd_fixed_size (group_replay_request,
- GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
- struct MulticastReplayRequestMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_group_message_handler (grp),
- make_origin_request_handler (orig),
- make_group_fragment_ack_handler (grp),
- make_group_join_request_handler (grp),
- make_group_replay_request_handler (grp),
+ GNUNET_MQ_hd_var_size (group_message,
+ GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
+ struct GNUNET_MULTICAST_MessageHeader,
+ grp),
+ GNUNET_MQ_hd_var_size (origin_request,
+ GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST,
+ struct GNUNET_MULTICAST_RequestHeader,
+ orig),
+ GNUNET_MQ_hd_fixed_size (group_fragment_ack,
+ GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
+ struct GNUNET_MessageHeader,
+ grp),
+ GNUNET_MQ_hd_var_size (group_join_request,
+ GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
+ struct MulticastJoinRequestMessage,
+ grp),
+ GNUNET_MQ_hd_fixed_size (group_replay_request,
+ GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
+ struct MulticastReplayRequestMessage,
+ grp),
GNUNET_MQ_handler_end ()
};
{
struct GNUNET_MULTICAST_Group *grp = &mem->grp;
- GNUNET_MQ_hd_var_size (group_message,
- GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
- struct GNUNET_MULTICAST_MessageHeader);
-
- GNUNET_MQ_hd_fixed_size (group_fragment_ack,
- GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (group_join_request,
- GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
- struct MulticastJoinRequestMessage);
-
- GNUNET_MQ_hd_var_size (member_join_decision,
- GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION,
- struct MulticastJoinDecisionMessageHeader);
-
- GNUNET_MQ_hd_fixed_size (group_replay_request,
- GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
- struct MulticastReplayRequestMessage);
-
- GNUNET_MQ_hd_var_size (member_replay_response,
- GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE,
- struct MulticastReplayResponseMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_group_message_handler (grp),
- make_group_fragment_ack_handler (grp),
- make_group_join_request_handler (grp),
- make_member_join_decision_handler (mem),
- make_group_replay_request_handler (grp),
- make_member_replay_response_handler (mem),
+ GNUNET_MQ_hd_var_size (group_message,
+ GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
+ struct GNUNET_MULTICAST_MessageHeader,
+ grp),
+ GNUNET_MQ_hd_fixed_size (group_fragment_ack,
+ GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
+ struct GNUNET_MessageHeader,
+ grp),
+ GNUNET_MQ_hd_var_size (group_join_request,
+ GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
+ struct MulticastJoinRequestMessage,
+ grp),
+ GNUNET_MQ_hd_var_size (member_join_decision,
+ GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION,
+ struct MulticastJoinDecisionMessageHeader,
+ mem),
+ GNUNET_MQ_hd_fixed_size (group_replay_request,
+ GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
+ struct MulticastReplayRequestMessage,
+ grp),
+ GNUNET_MQ_hd_var_size (member_replay_response,
+ GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE,
+ struct MulticastReplayResponseMessage,
+ mem),
GNUNET_MQ_handler_end ()
};
static void
reconnect (struct GNUNET_NAMECACHE_Handle *h)
{
- GNUNET_MQ_hd_var_size (lookup_block_response,
- GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE,
- struct LookupBlockResponseMessage);
- GNUNET_MQ_hd_fixed_size (block_cache_response,
- GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE,
- struct BlockCacheResponseMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_lookup_block_response_handler (h),
- make_block_cache_response_handler (h),
+ GNUNET_MQ_hd_var_size (lookup_block_response,
+ GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE,
+ struct LookupBlockResponseMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (block_cache_response,
+ GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE,
+ struct BlockCacheResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
GNUNET_assert (NULL == h->mq);
static void
reconnect (struct GNUNET_NAMESTORE_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (record_store_response,
- GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE,
- struct RecordStoreResponseMessage);
- GNUNET_MQ_hd_var_size (zone_to_name_response,
- GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE,
- struct ZoneToNameResponseMessage);
- GNUNET_MQ_hd_var_size (record_result,
- GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
- struct RecordResultMessage);
- GNUNET_MQ_hd_var_size (lookup_result,
- GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE,
- struct LabelLookupResponseMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_record_store_response_handler (h),
- make_zone_to_name_response_handler (h),
- make_record_result_handler (h),
- make_lookup_result_handler (h),
+ GNUNET_MQ_hd_fixed_size (record_store_response,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE,
+ struct RecordStoreResponseMessage,
+ h),
+ GNUNET_MQ_hd_var_size (zone_to_name_response,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE,
+ struct ZoneToNameResponseMessage,
+ h),
+ GNUNET_MQ_hd_var_size (record_result,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
+ struct RecordResultMessage,
+ h),
+ GNUNET_MQ_hd_var_size (lookup_result,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE,
+ struct LabelLookupResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_NAMESTORE_ZoneIterator *it;
static void
reconnect (struct GNUNET_NAMESTORE_ZoneMonitor *zm)
{
- GNUNET_MQ_hd_fixed_size (sync,
- GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
- struct RecordResultMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_sync_handler (zm),
- make_result_handler (zm),
+ GNUNET_MQ_hd_fixed_size (sync,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC,
+ struct GNUNET_MessageHeader,
+ zm),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
+ struct RecordResultMessage,
+ zm),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_MQ_hd_fixed_size (p2p_estimate,
- GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD,
- struct GNUNET_NSE_FloodMessage);
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
{&handle_start_message, NULL, GNUNET_MESSAGE_TYPE_NSE_START,
sizeof (struct GNUNET_MessageHeader)},
{NULL, NULL, 0, 0}
};
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_p2p_estimate_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (p2p_estimate,
+ GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD,
+ struct GNUNET_NSE_FloodMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
char *proof;
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_fixed_size (estimate,
- GNUNET_MESSAGE_TYPE_NSE_ESTIMATE,
- struct GNUNET_NSE_ClientMessage);
struct GNUNET_NSE_Handle *h = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_estimate_handler (h),
+ GNUNET_MQ_hd_fixed_size (estimate,
+ GNUNET_MESSAGE_TYPE_NSE_ESTIMATE,
+ struct GNUNET_NSE_ClientMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *msg;
static void
reconnect (struct GNUNET_PEERINFO_Handle *h)
{
- GNUNET_MQ_hd_var_size (info,
- GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
- struct InfoMessage);
- GNUNET_MQ_hd_fixed_size (end_iteration,
- GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_info_handler (h),
- make_end_iteration_handler (h),
+ GNUNET_MQ_hd_var_size (info,
+ GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
+ struct InfoMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (end_iteration,
+ GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END,
+ struct GNUNET_MessageHeader,
+ h),
GNUNET_MQ_handler_end ()
};
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (notification,
- GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
- struct InfoMessage);
struct GNUNET_PEERINFO_NotifyContext *nc = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_notification_handler (nc),
+ GNUNET_MQ_hd_var_size (notification,
+ GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
+ struct InfoMessage,
+ nc),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
reconnect (struct GNUNET_PEERSTORE_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (iterate_end,
- GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (iterate_result,
- GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (watch_record,
- GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_iterate_end_handler (h),
- make_iterate_result_handler (h),
- make_watch_record_handler (h),
+ GNUNET_MQ_hd_fixed_size (iterate_end,
+ GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END,
+ struct GNUNET_MessageHeader,
+ h),
+ GNUNET_MQ_hd_var_size (iterate_result,
+ GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD,
+ struct GNUNET_MessageHeader,
+ h),
+ GNUNET_MQ_hd_var_size (watch_record,
+ GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD,
+ struct GNUNET_MessageHeader,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_PEERSTORE_IterateContext *ic;
{
struct GNUNET_PSYC_Channel *chn = &mst->chn;
- GNUNET_MQ_hd_fixed_size (master_start_ack,
- GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK,
- struct GNUNET_PSYC_CountersResultMessage);
-
- GNUNET_MQ_hd_var_size (master_join_request,
- GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
- struct GNUNET_PSYC_JoinRequestMessage);
-
- GNUNET_MQ_hd_var_size (channel_message,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
- struct GNUNET_PSYC_MessageHeader);
-
- GNUNET_MQ_hd_fixed_size (channel_message_ack,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (channel_history_result,
- GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (channel_state_result,
- GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (channel_result,
- GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
- struct GNUNET_OperationResultMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_master_start_ack_handler (mst),
- make_master_join_request_handler (mst),
- make_channel_message_handler (chn),
- make_channel_message_ack_handler (chn),
- make_channel_history_result_handler (chn),
- make_channel_state_result_handler (chn),
- make_channel_result_handler (chn),
+ GNUNET_MQ_hd_fixed_size (master_start_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK,
+ struct GNUNET_PSYC_CountersResultMessage,
+ mst),
+ GNUNET_MQ_hd_var_size (master_join_request,
+ GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
+ struct GNUNET_PSYC_JoinRequestMessage,
+ mst),
+ GNUNET_MQ_hd_var_size (channel_message,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+ struct GNUNET_PSYC_MessageHeader,
+ chn),
+ GNUNET_MQ_hd_fixed_size (channel_message_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+ struct GNUNET_MessageHeader,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_history_result,
+ GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+ struct GNUNET_OperationResultMessage,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_state_result,
+ GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+ struct GNUNET_OperationResultMessage,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_result,
+ GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+ struct GNUNET_OperationResultMessage,
+ chn),
GNUNET_MQ_handler_end ()
};
{
struct GNUNET_PSYC_Channel *chn = &slv->chn;
- GNUNET_MQ_hd_fixed_size (slave_join_ack,
- GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK,
- struct GNUNET_PSYC_CountersResultMessage);
-
- GNUNET_MQ_hd_var_size (slave_join_decision,
- GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
- struct GNUNET_PSYC_JoinDecisionMessage);
-
- GNUNET_MQ_hd_var_size (channel_message,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
- struct GNUNET_PSYC_MessageHeader);
-
- GNUNET_MQ_hd_fixed_size (channel_message_ack,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (channel_history_result,
- GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (channel_state_result,
- GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (channel_result,
- GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
- struct GNUNET_OperationResultMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_slave_join_ack_handler (slv),
- make_slave_join_decision_handler (slv),
- make_channel_message_handler (chn),
- make_channel_message_ack_handler (chn),
- make_channel_history_result_handler (chn),
- make_channel_state_result_handler (chn),
- make_channel_result_handler (chn),
+ GNUNET_MQ_hd_fixed_size (slave_join_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK,
+ struct GNUNET_PSYC_CountersResultMessage,
+ slv),
+ GNUNET_MQ_hd_var_size (slave_join_decision,
+ GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
+ struct GNUNET_PSYC_JoinDecisionMessage,
+ slv),
+ GNUNET_MQ_hd_var_size (channel_message,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+ struct GNUNET_PSYC_MessageHeader,
+ chn),
+ GNUNET_MQ_hd_fixed_size (channel_message_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+ struct GNUNET_MessageHeader,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_history_result,
+ GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+ struct GNUNET_OperationResultMessage,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_state_result,
+ GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+ struct GNUNET_OperationResultMessage,
+ chn),
+ GNUNET_MQ_hd_var_size (channel_result,
+ GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+ struct GNUNET_OperationResultMessage,
+ chn),
GNUNET_MQ_handler_end ()
};
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Connecting to PSYCstore service.\n");
- GNUNET_MQ_hd_var_size (result_code,
- GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE,
- struct OperationResult);
-
- GNUNET_MQ_hd_fixed_size (result_counters,
- GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS,
- struct CountersResult);
-
- GNUNET_MQ_hd_var_size (result_fragment,
- GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT,
- struct FragmentResult);
-
- GNUNET_MQ_hd_var_size (result_state,
- GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE,
- struct StateResult);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_result_code_handler (h),
- make_result_counters_handler (h),
- make_result_fragment_handler (h),
- make_result_state_handler (h),
+ GNUNET_MQ_hd_var_size (result_code,
+ GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE,
+ struct OperationResult,
+ h),
+ GNUNET_MQ_hd_fixed_size (result_counters,
+ GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS,
+ struct CountersResult,
+ h),
+ GNUNET_MQ_hd_var_size (result_fragment,
+ GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT,
+ struct FragmentResult,
+ h),
+ GNUNET_MQ_hd_var_size (result_state,
+ GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE,
+ struct StateResult,
+ h),
GNUNET_MQ_handler_end ()
};
static void
search_reconnect (struct GNUNET_REGEX_Search *s)
{
- GNUNET_MQ_hd_var_size (search_response,
- GNUNET_MESSAGE_TYPE_REGEX_RESULT,
- struct ResultMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_search_response_handler (s),
+ GNUNET_MQ_hd_var_size (search_response,
+ GNUNET_MESSAGE_TYPE_REGEX_RESULT,
+ struct ResultMessage,
+ s),
GNUNET_MQ_handler_end ()
};
size_t slen = strlen (s->string) + 1;
struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_MQ_hd_fixed_size (p2p_revoke,
- GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
- struct RevokeMessage);
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
{&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY,
sizeof (struct QueryMessage)},
{NULL, NULL, 0, 0}
};
struct GNUNET_MQ_MessageHandler core_handlers[] = {
- make_p2p_revoke_handler (NULL),
+ GNUNET_MQ_hd_fixed_size (p2p_revoke,
+ GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
+ struct RevokeMessage,
+ NULL),
GNUNET_MQ_handler_end ()
};
char *fn;
GNUNET_REVOCATION_Callback func,
void *func_cls)
{
- GNUNET_MQ_hd_fixed_size (revocation_query_response,
- GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE,
- struct QueryResponseMessage);
struct GNUNET_REVOCATION_Query *q
= GNUNET_new (struct GNUNET_REVOCATION_Query);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_revocation_query_response_handler (q),
+ GNUNET_MQ_hd_fixed_size (revocation_query_response,
+ GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE,
+ struct QueryResponseMessage,
+ q),
GNUNET_MQ_handler_end ()
};
struct QueryMessage *qm;
GNUNET_REVOCATION_Callback func,
void *func_cls)
{
- GNUNET_MQ_hd_fixed_size (revocation_response,
- GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE,
- struct RevocationResponseMessage);
struct GNUNET_REVOCATION_Handle *h
= GNUNET_new (struct GNUNET_REVOCATION_Handle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_revocation_response_handler (h),
+ GNUNET_MQ_hd_fixed_size (revocation_response,
+ GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE,
+ struct RevocationResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
unsigned long long matching_bits;
static void
reconnect (struct GNUNET_RPS_Handle *h)
{
- GNUNET_MQ_hd_var_size (reply,
- GNUNET_MESSAGE_TYPE_RPS_CS_REPLY,
- struct GNUNET_RPS_CS_ReplyMessage);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_reply_handler (h),
+ GNUNET_MQ_hd_var_size (reply,
+ GNUNET_MESSAGE_TYPE_RPS_CS_REPLY,
+ struct GNUNET_RPS_CS_ReplyMessage,
+ h),
GNUNET_MQ_handler_end ()
};
GNUNET_SCALARPRODUCT_ContinuationWithStatus cont,
void *cont_cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
- struct ClientResponseMessage);
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (h),
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+ struct ClientResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
GNUNET_SCALARPRODUCT_DatumProcessor cont,
void *cont_cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
- struct ClientResponseMessage);
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (h),
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+ struct ClientResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
GNUNET_SECRETSHARING_SecretReadyCallback cb,
void *cls)
{
- GNUNET_MQ_hd_var_size (secret_ready,
- GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY,
- struct GNUNET_SECRETSHARING_SecretReadyMessage);
struct GNUNET_SECRETSHARING_Session *s
= GNUNET_new (struct GNUNET_SECRETSHARING_Session);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_secret_ready_handler (s),
+ GNUNET_MQ_hd_var_size (secret_ready,
+ GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY,
+ struct GNUNET_SECRETSHARING_SecretReadyMessage,
+ s),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *ev;
GNUNET_SECRETSHARING_DecryptCallback decrypt_cb,
void *decrypt_cb_cls)
{
- GNUNET_MQ_hd_fixed_size (decrypt_done,
- GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT_DONE,
- struct GNUNET_SECRETSHARING_DecryptResponseMessage);
struct GNUNET_SECRETSHARING_DecryptionHandle *s
= GNUNET_new (struct GNUNET_SECRETSHARING_DecryptionHandle);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_decrypt_done_handler (s),
+ GNUNET_MQ_hd_fixed_size (decrypt_done,
+ GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT_DONE,
+ struct GNUNET_SECRETSHARING_DecryptResponseMessage,
+ s),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *ev;
enum GNUNET_SET_OperationType op,
const uint32_t *cookie)
{
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_SET_RESULT,
- struct GNUNET_SET_ResultMessage);
- GNUNET_MQ_hd_var_size (iter_element,
- GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT,
- struct GNUNET_SET_IterResponseMessage);
- GNUNET_MQ_hd_fixed_size (iter_done,
- GNUNET_MESSAGE_TYPE_SET_ITER_DONE,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_fixed_size (copy_lazy,
- GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_RESPONSE,
- struct GNUNET_SET_CopyLazyResponseMessage);
struct GNUNET_SET_Handle *set = GNUNET_new (struct GNUNET_SET_Handle);
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_result_handler (set),
- make_iter_element_handler (set),
- make_iter_done_handler (set),
- make_copy_lazy_handler (set),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_SET_RESULT,
+ struct GNUNET_SET_ResultMessage,
+ set),
+ GNUNET_MQ_hd_var_size (iter_element,
+ GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT,
+ struct GNUNET_SET_IterResponseMessage,
+ set),
+ GNUNET_MQ_hd_fixed_size (iter_done,
+ GNUNET_MESSAGE_TYPE_SET_ITER_DONE,
+ struct GNUNET_MessageHeader,
+ set),
+ GNUNET_MQ_hd_fixed_size (copy_lazy,
+ GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_RESPONSE,
+ struct GNUNET_SET_CopyLazyResponseMessage,
+ set),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *mqm;
static void
listen_connect (void *cls)
{
- GNUNET_MQ_hd_var_size (request,
- GNUNET_MESSAGE_TYPE_SET_REQUEST,
- struct GNUNET_SET_RequestMessage);
struct GNUNET_SET_ListenHandle *lh = cls;
struct GNUNET_MQ_MessageHandler mq_handlers[] = {
- make_request_handler (lh),
+ GNUNET_MQ_hd_var_size (request,
+ GNUNET_MESSAGE_TYPE_SET_REQUEST,
+ struct GNUNET_SET_RequestMessage,
+ lh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *mqm;
{
struct GNUNET_SOCIAL_Place *plc = &hst->plc;
- GNUNET_MQ_hd_fixed_size (host_enter_ack,
- GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK,
- struct HostEnterAck);
-
- GNUNET_MQ_hd_var_size (host_enter_request,
- GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
- struct GNUNET_PSYC_JoinRequestMessage);
-
- GNUNET_MQ_hd_var_size (host_message,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
- struct GNUNET_PSYC_MessageHeader);
-
- GNUNET_MQ_hd_fixed_size (place_message_ack,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (place_history_result,
- GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (place_state_result,
- GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (place_result,
- GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
- struct GNUNET_OperationResultMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_host_enter_ack_handler (hst),
- make_host_enter_request_handler (hst),
- make_host_message_handler (plc),
- make_place_message_ack_handler (plc),
- make_place_history_result_handler (plc),
- make_place_state_result_handler (plc),
- make_place_result_handler (plc),
+ GNUNET_MQ_hd_fixed_size (host_enter_ack,
+ GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK,
+ struct HostEnterAck,
+ hst),
+ GNUNET_MQ_hd_var_size (host_enter_request,
+ GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
+ struct GNUNET_PSYC_JoinRequestMessage,
+ hst),
+ GNUNET_MQ_hd_var_size (host_message,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+ struct GNUNET_PSYC_MessageHeader,
+ hst),
+ GNUNET_MQ_hd_fixed_size (place_message_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+ struct GNUNET_MessageHeader,
+ plc),
+ GNUNET_MQ_hd_var_size (place_history_result,
+ GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+ struct GNUNET_OperationResultMessage,
+ plc),
+ GNUNET_MQ_hd_var_size (place_state_result,
+ GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+ struct GNUNET_OperationResultMessage,
+ plc),
+ GNUNET_MQ_hd_var_size (place_result,
+ GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+ struct GNUNET_OperationResultMessage,
+ plc),
GNUNET_MQ_handler_end ()
};
{
struct GNUNET_SOCIAL_Place *plc = &gst->plc;
- GNUNET_MQ_hd_fixed_size (guest_enter_ack,
- GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK,
- struct GNUNET_PSYC_CountersResultMessage);
-
- GNUNET_MQ_hd_var_size (guest_enter_decision,
- GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
- struct GNUNET_PSYC_JoinDecisionMessage);
-
- GNUNET_MQ_hd_var_size (place_message,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
- struct GNUNET_PSYC_MessageHeader);
-
- GNUNET_MQ_hd_fixed_size (place_message_ack,
- GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (place_history_result,
- GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (place_state_result,
- GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
- struct GNUNET_OperationResultMessage);
-
- GNUNET_MQ_hd_var_size (place_result,
- GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
- struct GNUNET_OperationResultMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_guest_enter_ack_handler (gst),
- make_guest_enter_decision_handler (gst),
- make_place_message_handler (plc),
- make_place_message_ack_handler (plc),
- make_place_history_result_handler (plc),
- make_place_state_result_handler (plc),
- make_place_result_handler (plc),
+ GNUNET_MQ_hd_fixed_size (guest_enter_ack,
+ GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK,
+ struct GNUNET_PSYC_CountersResultMessage,
+ gst),
+ GNUNET_MQ_hd_var_size (guest_enter_decision,
+ GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
+ struct GNUNET_PSYC_JoinDecisionMessage,
+ gst),
+ GNUNET_MQ_hd_var_size (place_message,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+ struct GNUNET_PSYC_MessageHeader,
+ plc),
+ GNUNET_MQ_hd_fixed_size (place_message_ack,
+ GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+ struct GNUNET_MessageHeader,
+ plc),
+ GNUNET_MQ_hd_var_size (place_history_result,
+ GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+ struct GNUNET_OperationResultMessage,
+ plc),
+ GNUNET_MQ_hd_var_size (place_state_result,
+ GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+ struct GNUNET_OperationResultMessage,
+ plc),
+ GNUNET_MQ_hd_var_size (place_result,
+ GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+ struct GNUNET_OperationResultMessage,
+ plc),
GNUNET_MQ_handler_end ()
};
static void
app_connect (struct GNUNET_SOCIAL_App *app)
{
- GNUNET_MQ_hd_var_size (app_ego,
- GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO,
- struct AppEgoMessage);
-
- GNUNET_MQ_hd_fixed_size (app_ego_end,
- GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (app_place,
- GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE,
- struct AppPlaceMessage);
-
- GNUNET_MQ_hd_fixed_size (app_place_end,
- GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END,
- struct GNUNET_MessageHeader);
-
- GNUNET_MQ_hd_var_size (app_result,
- GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
- struct GNUNET_OperationResultMessage);
-
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_app_ego_handler (app),
- make_app_ego_end_handler (app),
- make_app_place_handler (app),
- make_app_place_end_handler (app),
- make_app_result_handler (app),
+ GNUNET_MQ_hd_var_size (app_ego,
+ GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO,
+ struct AppEgoMessage,
+ app),
+ GNUNET_MQ_hd_fixed_size (app_ego_end,
+ GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END,
+ struct GNUNET_MessageHeader,
+ app),
+ GNUNET_MQ_hd_var_size (app_place,
+ GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE,
+ struct AppPlaceMessage,
+ app),
+ GNUNET_MQ_hd_fixed_size (app_place_end,
+ GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END,
+ struct GNUNET_MessageHeader,
+ app),
+ GNUNET_MQ_hd_var_size (app_result,
+ GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+ struct GNUNET_OperationResultMessage,
+ app),
GNUNET_MQ_handler_end ()
};
static int
try_connect (struct GNUNET_STATISTICS_Handle *h)
{
- GNUNET_MQ_hd_fixed_size (test,
- GNUNET_MESSAGE_TYPE_TEST,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_fixed_size (statistics_end,
- GNUNET_MESSAGE_TYPE_STATISTICS_END,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_var_size (statistics_value,
- GNUNET_MESSAGE_TYPE_STATISTICS_VALUE,
- struct GNUNET_STATISTICS_ReplyMessage);
- GNUNET_MQ_hd_fixed_size (statistics_watch_value,
- GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE,
- struct GNUNET_STATISTICS_WatchValueMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (h),
- make_statistics_end_handler (h),
- make_statistics_value_handler (h),
- make_statistics_watch_value_handler (h),
+ GNUNET_MQ_hd_fixed_size (test,
+ GNUNET_MESSAGE_TYPE_TEST,
+ struct GNUNET_MessageHeader,
+ h),
+ GNUNET_MQ_hd_fixed_size (statistics_end,
+ GNUNET_MESSAGE_TYPE_STATISTICS_END,
+ struct GNUNET_MessageHeader,
+ h),
+ GNUNET_MQ_hd_var_size (statistics_value,
+ GNUNET_MESSAGE_TYPE_STATISTICS_VALUE,
+ struct GNUNET_STATISTICS_ReplyMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (statistics_watch_value,
+ GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE,
+ struct GNUNET_STATISTICS_WatchValueMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_STATISTICS_GetHandle *gh;
GNUNET_TESTBED_ControllerCallback cc,
void *cc_cls)
{
- GNUNET_MQ_hd_var_size (add_host_confirm,
- GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS,
- struct GNUNET_TESTBED_HostConfirmedMessage);
- GNUNET_MQ_hd_fixed_size (peer_conevent,
- GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT,
- struct GNUNET_TESTBED_ConnectionEventMessage);
- GNUNET_MQ_hd_fixed_size (opsuccess,
- GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS,
- struct GNUNET_TESTBED_GenericOperationSuccessEventMessage);
- GNUNET_MQ_hd_var_size (op_fail_event,
- GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT,
- struct GNUNET_TESTBED_OperationFailureEventMessage);
- GNUNET_MQ_hd_fixed_size (peer_create_success,
- GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS,
- struct GNUNET_TESTBED_PeerCreateSuccessEventMessage);
- GNUNET_MQ_hd_fixed_size (peer_event,
- GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT,
- struct GNUNET_TESTBED_PeerEventMessage);
- GNUNET_MQ_hd_var_size (peer_config,
- GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION,
- struct GNUNET_TESTBED_PeerConfigurationInformationMessage);
- GNUNET_MQ_hd_var_size (slave_config,
- GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION,
- struct GNUNET_TESTBED_SlaveConfiguration);
- GNUNET_MQ_hd_var_size (link_controllers_result,
- GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT,
- struct GNUNET_TESTBED_ControllerLinkResponse);
- GNUNET_MQ_hd_var_size (barrier_status,
- GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
- const struct GNUNET_TESTBED_BarrierStatusMsg);
struct GNUNET_TESTBED_Controller *controller
= GNUNET_new (struct GNUNET_TESTBED_Controller);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_add_host_confirm_handler (controller),
- make_peer_conevent_handler (controller),
- make_opsuccess_handler (controller),
- make_op_fail_event_handler (controller),
- make_peer_create_success_handler (controller),
- make_peer_event_handler (controller),
- make_peer_config_handler (controller),
- make_slave_config_handler (controller),
- make_link_controllers_result_handler (controller),
- make_barrier_status_handler (controller),
+ GNUNET_MQ_hd_var_size (add_host_confirm,
+ GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS,
+ struct GNUNET_TESTBED_HostConfirmedMessage,
+ controller),
+ GNUNET_MQ_hd_fixed_size (peer_conevent,
+ GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT,
+ struct GNUNET_TESTBED_ConnectionEventMessage,
+ controller),
+ GNUNET_MQ_hd_fixed_size (opsuccess,
+ GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS,
+ struct GNUNET_TESTBED_GenericOperationSuccessEventMessage,
+ controller),
+ GNUNET_MQ_hd_var_size (op_fail_event,
+ GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT,
+ struct GNUNET_TESTBED_OperationFailureEventMessage,
+ controller),
+ GNUNET_MQ_hd_fixed_size (peer_create_success,
+ GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS,
+ struct GNUNET_TESTBED_PeerCreateSuccessEventMessage,
+ controller),
+ GNUNET_MQ_hd_fixed_size (peer_event,
+ GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT,
+ struct GNUNET_TESTBED_PeerEventMessage,
+ controller),
+ GNUNET_MQ_hd_var_size (peer_config,
+ GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION,
+ struct GNUNET_TESTBED_PeerConfigurationInformationMessage,
+ controller),
+ GNUNET_MQ_hd_var_size (slave_config,
+ GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION,
+ struct GNUNET_TESTBED_SlaveConfiguration,
+ controller),
+ GNUNET_MQ_hd_var_size (link_controllers_result,
+ GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT,
+ struct GNUNET_TESTBED_ControllerLinkResponse,
+ controller),
+ GNUNET_MQ_hd_var_size (barrier_status,
+ GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
+ const struct GNUNET_TESTBED_BarrierStatusMsg,
+ controller),
GNUNET_MQ_handler_end ()
};
struct GNUNET_TESTBED_InitMessage *msg;
GNUNET_TESTBED_barrier_wait_cb cb,
void *cb_cls)
{
- GNUNET_MQ_hd_var_size (status,
- GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
- struct GNUNET_TESTBED_BarrierStatusMsg);
struct GNUNET_TESTBED_BarrierWaitHandle *h
= GNUNET_new (struct GNUNET_TESTBED_BarrierWaitHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_status_handler (h),
+ GNUNET_MQ_hd_var_size (status,
+ GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
+ struct GNUNET_TESTBED_BarrierStatusMsg,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_MQ_hd_var_size (hello,
- GNUNET_MESSAGE_TYPE_HELLO,
- struct GNUNET_HELLO_Message);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_hello_handler (NULL),
+ GNUNET_MQ_hd_var_size (hello,
+ GNUNET_MESSAGE_TYPE_HELLO,
+ struct GNUNET_HELLO_Message,
+ NULL),
GNUNET_MQ_handler_end ()
};
unsigned long long opt;
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *mycfg)
{
- GNUNET_MQ_hd_var_size (dummy,
- GNUNET_MESSAGE_TYPE_DUMMY,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_dummy_handler (NULL),
+ GNUNET_MQ_hd_var_size (dummy,
+ GNUNET_MESSAGE_TYPE_DUMMY,
+ struct GNUNET_MessageHeader,
+ NULL),
GNUNET_MQ_handler_end ()
};
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *mycfg)
{
- GNUNET_MQ_hd_var_size (dummy,
- GNUNET_MESSAGE_TYPE_DUMMY,
- struct GNUNET_MessageHeader);
int counter = 0;
ret = 1;
else if (benchmark_receive) /* -b: Benchmark receiving */
{
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_dummy_handler (NULL),
+ GNUNET_MQ_hd_var_size (dummy,
+ GNUNET_MESSAGE_TYPE_DUMMY,
+ struct GNUNET_MessageHeader,
+ NULL),
GNUNET_MQ_handler_end ()
};
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
- GNUNET_MQ_hd_var_size (test,
- GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE,
- struct GNUNET_TRANSPORT_TESTING_TestMessage);
- GNUNET_MQ_hd_var_size (test2,
- GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2,
- struct GNUNET_TRANSPORT_TESTING_TestMessage);
struct GNUNET_TRANSPORT_TESTING_ConnectCheckContext *ccc = cls;
int ok;
for (unsigned int i=0;i<ccc->num_peers;i++)
{
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_test_handler (NULL),
- make_test2_handler (NULL),
+ GNUNET_MQ_hd_var_size (test,
+ GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE,
+ struct GNUNET_TRANSPORT_TESTING_TestMessage,
+ NULL),
+ GNUNET_MQ_hd_var_size (test2,
+ GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2,
+ struct GNUNET_TRANSPORT_TESTING_TestMessage,
+ NULL),
GNUNET_MQ_handler_end()
};
ccc->p[i] = GNUNET_TRANSPORT_TESTING_start_peer (ccc->tth,
GNUNET_TRANSPORT_AddressToStringCallback aluc,
void *aluc_cls)
{
- GNUNET_MQ_hd_var_size (reply,
- GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
- struct AddressToStringResultMessage);
struct GNUNET_TRANSPORT_AddressToStringContext *alc
= GNUNET_new (struct GNUNET_TRANSPORT_AddressToStringContext);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_reply_handler (alc),
+ GNUNET_MQ_hd_var_size (reply,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
+ struct AddressToStringResultMessage,
+ alc),
GNUNET_MQ_handler_end ()
};
size_t alen;
static void
reconnect (struct GNUNET_TRANSPORT_Blacklist *br)
{
- GNUNET_MQ_hd_fixed_size (query,
- GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY,
- struct BlacklistMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_query_handler (br),
+ GNUNET_MQ_hd_fixed_size (query,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY,
+ struct BlacklistMessage,
+ br),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (hello,
- GNUNET_MESSAGE_TYPE_HELLO,
- struct GNUNET_MessageHeader);
- GNUNET_MQ_hd_fixed_size (connect,
- GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT,
- struct ConnectInfoMessage);
- GNUNET_MQ_hd_fixed_size (disconnect,
- GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT,
- struct DisconnectInfoMessage);
- GNUNET_MQ_hd_fixed_size (send_ok,
- GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK,
- struct SendOkMessage);
- GNUNET_MQ_hd_var_size (recv,
- GNUNET_MESSAGE_TYPE_TRANSPORT_RECV,
- struct InboundMessage);
- GNUNET_MQ_hd_fixed_size (set_quota,
- GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA,
- struct QuotaSetMessage);
struct GNUNET_TRANSPORT_CoreHandle *h = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_hello_handler (h),
- make_connect_handler (h),
- make_disconnect_handler (h),
- make_send_ok_handler (h),
- make_recv_handler (h),
- make_set_quota_handler (h),
+ GNUNET_MQ_hd_var_size (hello,
+ GNUNET_MESSAGE_TYPE_HELLO,
+ struct GNUNET_MessageHeader,
+ h),
+ GNUNET_MQ_hd_fixed_size (connect,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT,
+ struct ConnectInfoMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (disconnect,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT,
+ struct DisconnectInfoMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (send_ok,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK,
+ struct SendOkMessage,
+ h),
+ GNUNET_MQ_hd_var_size (recv,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_RECV,
+ struct InboundMessage,
+ h),
+ GNUNET_MQ_hd_fixed_size (set_quota,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA,
+ struct QuotaSetMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
reconnect (void *cls)
{
- GNUNET_MQ_hd_var_size (hello,
- GNUNET_MESSAGE_TYPE_HELLO,
- struct GNUNET_MessageHeader);
struct GNUNET_TRANSPORT_HelloGetHandle *ghh = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_hello_handler (ghh),
+ GNUNET_MQ_hd_var_size (hello,
+ GNUNET_MESSAGE_TYPE_HELLO,
+ struct GNUNET_MessageHeader,
+ ghh),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
static void
do_peer_connect (void *cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE,
- struct PeerIterateResponseMessage);
- GNUNET_MQ_hd_fixed_size (response_end,
- GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END,
- struct GNUNET_MessageHeader);
struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (pal_ctx),
- make_response_end_handler (pal_ctx),
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE,
+ struct PeerIterateResponseMessage,
+ pal_ctx),
+ GNUNET_MQ_hd_fixed_size (response_end,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END,
+ struct GNUNET_MessageHeader,
+ pal_ctx),
GNUNET_MQ_handler_end ()
};
struct PeerMonitorMessage *msg;
static void
do_plugin_connect (void *cls)
{
- GNUNET_MQ_hd_var_size (event,
- GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT,
- struct TransportPluginMonitorMessage);
- GNUNET_MQ_hd_fixed_size (sync,
- GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC,
- struct GNUNET_MessageHeader);
struct GNUNET_TRANSPORT_PluginMonitor *pm = cls;
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_event_handler (pm),
- make_sync_handler (pm),
+ GNUNET_MQ_hd_var_size (event,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT,
+ struct TransportPluginMonitorMessage,
+ pm),
+ GNUNET_MQ_hd_fixed_size (sync,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC,
+ struct GNUNET_MessageHeader,
+ pm),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MessageHeader *msg;
static void
reconnect_task (void *cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (NULL),
- GNUNET_MQ_handler_end ()
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE,
+ struct GNUNET_MessageHeader,
+ NULL),
+ GNUNET_MQ_handler_end ()
};
r_task = NULL;
socklen_t slens[2];
struct GNUNET_MQ_Envelope *env;
struct GNUNET_MessageHeader *msg;
- GNUNET_MQ_hd_fixed_size (bounce,
- MY_TYPE,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler chandlers[] = {
- make_bounce_handler (cls),
+ GNUNET_MQ_hd_fixed_size (bounce,
+ MY_TYPE,
+ struct GNUNET_MessageHeader,
+ cls),
GNUNET_MQ_handler_end ()
};
socklen_t slens[2];
struct GNUNET_MQ_Envelope *env;
struct GNUNET_MessageHeader *msg;
- GNUNET_MQ_hd_fixed_size (reply,
- MY_TYPE,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler chandlers[] = {
- make_reply_handler (cls),
+ GNUNET_MQ_hd_fixed_size (reply,
+ MY_TYPE,
+ struct GNUNET_MessageHeader,
+ cls),
GNUNET_MQ_handler_end ()
};
socklen_t slens[2];
struct GNUNET_MQ_Envelope *env;
struct GNUNET_MessageHeader *msg;
- GNUNET_MQ_hd_fixed_size (bounce,
- MY_TYPE,
- struct GNUNET_MessageHeader);
struct GNUNET_MQ_MessageHandler chandlers[] = {
- make_bounce_handler (cls),
+ GNUNET_MQ_hd_fixed_size (bounce,
+ MY_TYPE,
+ struct GNUNET_MessageHeader,
+ cls),
GNUNET_MQ_handler_end ()
};
connect_task (void *cls)
{
struct GNUNET_VPN_Handle *vh = cls;
- GNUNET_MQ_hd_var_size (use_ip,
- GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP,
- struct RedirectToIpResponseMessage);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_use_ip_handler (cls),
+ GNUNET_MQ_hd_var_size (use_ip,
+ GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP,
+ struct RedirectToIpResponseMessage,
+ cls),
GNUNET_MQ_handler_end ()
};
struct GNUNET_VPN_RedirectionRequest *rr;