}
+/**
+ * Obtain the array of message handlers provided by KX.
+ *
+ * @return NULL-entry terminated array of handlers
+ */
+const struct GNUNET_MQ_MessageHandler *
+GSC_KX_get_handlers (void)
+{
+#if 0
+ GNUNET_MQ_hd_fixed_size (ephemeral_key,
+ GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
+ struct EphemeralKeyMessage);
+ GNUNET_MQ_hd_fixed_size (ping,
+ PING,
+ struct PingMessage);
+ GNUNET_MQ_hd_fixed_size (pong,
+ PING,
+ struct PongMessage);
+ GNUNET_MQ_hd_var_size (encrypted,
+ PING,
+ struct ping);
+#endif
+ static struct GNUNET_MQ_MessageHandler handlers[] = {
+#if 0
+ make_ephemeral_key_handler (),
+ make_ping_handler (),
+ make_pong_handler (),
+ make_encrypted_handler (),
+#endif
+ GNUNET_MQ_handler_end()
+ };
+ return handlers;
+}
+
+
/**
* Deliver P2P message to interested clients.
* Invokes send twice, once for clients that want the full message, and once
GSC_SESSIONS_confirm_typemap (dmc->peer, m);
return GNUNET_OK;
default:
- GSC_CLIENTS_deliver_message (dmc->peer, m,
+ GSC_CLIENTS_deliver_message (dmc->peer,
+ m,
ntohs (m->size),
GNUNET_CORE_OPTION_SEND_FULL_INBOUND);
- GSC_CLIENTS_deliver_message (dmc->peer, m,
+ GSC_CLIENTS_deliver_message (dmc->peer,
+ m,
sizeof (struct GNUNET_MessageHeader),
GNUNET_CORE_OPTION_SEND_HDR_INBOUND);
}
current_ekm.origin_identity = GSC_my_identity;
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_sign (my_private_key,
- ¤t_ekm.purpose,
- ¤t_ekm.signature));
+ ¤t_ekm.purpose,
+ ¤t_ekm.signature));
}
struct GSC_KeyExchangeInfo;
+/**
+ * Obtain the array of message handlers provided by KX.
+ *
+ * @return NULL-entry terminated array of handlers
+ */
+const struct GNUNET_MQ_MessageHandler *
+GSC_KX_get_handlers (void);
+
+
/**
* We received a EPHEMERAL_KEY message. Validate and update
* our key material and status.
case GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE:
GSC_KX_handle_encrypted_message (n->kxinfo, message);
break;
- case GNUNET_MESSAGE_TYPE_DUMMY:
- /* Dummy messages for testing / benchmarking, just discard */
- break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Unsupported message of type %u (%u bytes) received from peer `%s'\n"),
me->deadline = GNUNET_TIME_relative_to_absolute (timeout);
me->size = msize;
GNUNET_memcpy (&me[1],
- msg,
- msize);
+ msg,
+ msize);
GNUNET_CONTAINER_DLL_insert_tail (n->message_head,
n->message_tail,
me);