/**
* Message for a client to create channels.
*/
-struct GNUNET_CADET_ChannelCreateMessageMessage
+struct GNUNET_CADET_ChannelOpenMessageMessage
{
/**
* Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
*
- * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessageMessage)
+ * Size: sizeof(struct GNUNET_CADET_ChannelOpenMessageMessage)
*/
struct GNUNET_MessageHeader header;
*/
static void
handle_channel_created (void *cls,
- const struct GNUNET_CADET_ChannelCreateMessageMessage *msg)
+ const struct GNUNET_CADET_ChannelOpenMessageMessage *msg)
{
struct GNUNET_CADET_Handle *h = cls;
struct GNUNET_CADET_Channel *ch;
{
struct GNUNET_MQ_MessageHandler handlers[] = {
GNUNET_MQ_hd_fixed_size (channel_created,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
- struct GNUNET_CADET_ChannelCreateMessageMessage,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN,
+ struct GNUNET_CADET_ChannelOpenMessageMessage,
h),
GNUNET_MQ_hd_fixed_size (channel_destroy,
GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
h),
// FIXME
// GNUNET_MQ_hd_fixed_Y size (channel_destroyed,
-// GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED,
+// GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED,
// struct GNUNET_CADET_ChannelDestroyMessage);
GNUNET_MQ_handler_end ()
};
msg = (struct GNUNET_MessageHeader *) &th[1];
switch (ntohs(msg->type))
{
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY:
case GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN:
case GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE:
const struct GNUNET_HashCode *port,
enum GNUNET_CADET_ChannelOption options)
{
- struct GNUNET_CADET_ChannelCreateMessageMessage *msg;
+ struct GNUNET_CADET_ChannelOpenMessageMessage *msg;
struct GNUNET_MQ_Envelope *env;
struct GNUNET_CADET_Channel *ch;
struct GNUNET_CADET_ClientChannelNumber chid;
ch->ctx = channel_ctx;
ch->peer = GNUNET_PEER_intern (peer);
- env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE);
+ env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
msg->channel_id = ch->chid;
msg->port = *port;
msg->peer = *peer;
/**
* Transport payload data.
*/
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
s = "DATA";
break;
/**
* Confirm receipt of payload data.
*/
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
s = "DATA_ACK";
break;
/**
* Encrypted.
*/
- case GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED:
s = "ENCRYPTED";
break;
/**
* ACK for a data packet.
*/
- case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK:
s = "ACK";
break;
/**
* POLL for ACK.
*/
- case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL:
s = "POLL";
break;
/**
* Ask the cadet service to create a new tunnel
*/
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
s = "CHAN_CREAT";
break;
/**
* Confirm the creation of a channel.
*/
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
s = "CHAN_ACK";
break;
/**
* Confirm the creation of a channel.
*/
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED:
s = "CHAN_NACK";
break;
};
+/******************************************************************************/
+/******************************* TUNNEL ***********************************/
+/******************************************************************************/
+
/**
* Unique identifier (counter) for an encrypted message in a channel.
- * Used to match #GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK
- * and #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL messages
- * against the respective #GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED
+ * Used to match #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK
+ * and #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL messages
+ * against the respective #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED
* messages.
*/
struct CadetEncryptedMessageIdentifier
};
-/**
- * Message to acknowledge cadet encrypted traffic.
- */
-struct GNUNET_CADET_ConnectionEncryptedAckMessage
-{
- /**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK
- */
- struct GNUNET_MessageHeader header;
-
- /**
- * Maximum packet ID authorized.
- */
- struct CadetEncryptedMessageIdentifier cemi;
-
- /**
- * ID of the connection.
- */
- struct GNUNET_CADET_ConnectionTunnelIdentifier cid;
-};
-
-
-/**
- * Message to query a peer about its Flow Control status regarding a tunnel.
- */
-struct GNUNET_CADET_ConnectionHopByHopPollMessage
-{
- /**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL
- */
- struct GNUNET_MessageHeader header;
-
- /**
- * Last packet sent.
- */
- struct CadetEncryptedMessageIdentifier cemi;
-
- /**
- * ID of the connection.
- */
- struct GNUNET_CADET_ConnectionTunnelIdentifier cid;
-
-};
-
-
-
-/******************************************************************************/
-/******************************* TUNNEL ***********************************/
-/******************************************************************************/
-
/**
* Flags to be used in GNUNET_CADET_KX.
*/
* using 'gcry_sexp_sprint'.
*/
struct GNUNET_CRYPTO_EcdhePublicKey ratchet_key;
+
+#ifdef NEW_CADET
+ /**
+ * Proof that sender could compute the 3-DH, in lieu of a signature.
+ */
+ struct GNUNET_HashCode triple_dh_proof;
+#endif
};
/**
* Axolotl tunnel message.
*/
-struct GNUNET_CADET_ConnectionEncryptedMessage
+struct GNUNET_CADET_TunnelEncryptedMessage
{
/**
- * Type: #GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED
*/
struct GNUNET_MessageHeader header;
};
+/**
+ * Message to query a peer about its Flow Control status regarding a tunnel.
+ *
+ * It is NOT yet clear if we need this.
+ */
+struct GNUNET_CADET_ConnectionHopByHopPollMessage
+{
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Last packet sent.
+ */
+ struct CadetEncryptedMessageIdentifier cemi;
+
+ /**
+ * ID of the connection.
+ */
+ struct GNUNET_CADET_ConnectionTunnelIdentifier cid;
+
+};
+
+
+/**
+ * Message to acknowledge cadet encrypted traffic, used for
+ * flow-control on a hop-by-hop basis on the connection-level. Note
+ * that we do use the @e cemi from the tunnel layer as the connection
+ * layer's header is included/shared with the tunnel layer messages,
+ * and we only do flow control for the payload.
+ */
+struct GNUNET_CADET_ConnectionEncryptedAckMessage
+{
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Maximum packet ID authorized.
+ */
+ struct CadetEncryptedMessageIdentifier cemi;
+
+ /**
+ * ID of the connection.
+ */
+ struct GNUNET_CADET_ConnectionTunnelIdentifier cid;
+};
+
/******************************************************************************/
/******************************* CHANNEL ***********************************/
/**
* Message to create a Channel.
*/
-struct GNUNET_CADET_ChannelCreateMessage
+struct GNUNET_CADET_ChannelOpenMessage
{
/**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN
*/
struct GNUNET_MessageHeader header;
*/
struct GNUNET_MessageHeader header;
+#ifdef NEW_CADET
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
+#endif
+
/**
* ID of the channel
*/
/**
* Message for cadet data traffic.
*/
-struct GNUNET_CADET_ChannelDataMessage
+struct GNUNET_CADET_ChannelAppDataMessage
{
/**
* Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST,
struct GNUNET_CADET_ChannelDataAckMessage
{
/**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK
*/
struct GNUNET_MessageHeader header;
uint32_t options)
{
struct GNUNET_MQ_Envelope *env;
- struct GNUNET_CADET_ChannelCreateMessageMessage *msg;
+ struct GNUNET_CADET_ChannelOpenMessageMessage *msg;
struct GNUNET_CADET_ClientChannelNumber lid;
lid = client_get_next_lid (c);
/* notify local client about incoming connection! */
env = GNUNET_MQ_msg (msg,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE);
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
msg->channel_id = lid;
msg->port = *port;
msg->opt = htonl (options);
*/
static void
handle_channel_create (void *cls,
- const struct GNUNET_CADET_ChannelCreateMessageMessage *ccm)
+ const struct GNUNET_CADET_ChannelOpenMessageMessage *ccm)
{
struct CadetClient *c = cls;
struct CadetChannel *ch;
struct GNUNET_CADET_PortMessage,
NULL),
GNUNET_MQ_hd_fixed_size (channel_create,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
- struct GNUNET_CADET_ChannelCreateMessageMessage,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN,
+ struct GNUNET_CADET_ChannelOpenMessageMessage,
NULL),
GNUNET_MQ_hd_fixed_size (channel_destroy,
GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
/**
* Message to create a Channel.
*/
-struct GNUNET_CADET_ChannelCreateMessage
+struct GNUNET_CADET_ChannelOpenMessage
{
/**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN
*/
struct GNUNET_MessageHeader header;
/**
* Message for cadet data traffic.
*/
-struct GNUNET_CADET_ChannelDataMessage
+struct GNUNET_CADET_ChannelAppDataMessage
{
/**
* Type: #GNUNET_MESSAGE_TYPE_CADET_UNICAST,
struct GNUNET_CADET_ChannelDataAckMessage
{
/**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK
*/
struct GNUNET_MessageHeader header;
/**
* Data message we are trying to send.
*/
- struct GNUNET_CADET_ChannelDataMessage data_message;
+ struct GNUNET_CADET_ChannelAppDataMessage data_message;
/* followed by variable-size payload */
};
/**
* Last entry in the tunnel's queue relating to control messages
- * (#GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE or
- * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK). Used to cancel
+ * (#GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN or
+ * #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK). Used to cancel
* transmission in case we receive updated information.
*/
struct CadetTunnelQueueEntry *last_control_qe;
send_create (void *cls)
{
struct CadetChannel *ch = cls;
- struct GNUNET_CADET_ChannelCreateMessage msgcc;
+ struct GNUNET_CADET_ChannelOpenMessage msgcc;
uint32_t options;
options = 0;
if (ch->out_of_order)
options |= GNUNET_CADET_OPTION_OUT_OF_ORDER;
msgcc.header.size = htons (sizeof (msgcc));
- msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE);
+ msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
msgcc.opt = htonl (options);
msgcc.port = ch->port;
msgcc.gid = ch->gid;
{
struct GNUNET_CADET_ChannelDataAckMessage msg;
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK);
msg.header.size = htons (sizeof (msg));
msg.gid = ch->gid;
msg.mid.mid = htonl (ntohl (ch->mid_recv.mid) - 1);
/* Everything is correct, send the message. */
crm = GNUNET_malloc (sizeof (*crm) + payload_size);
crm->ch = ch;
- crm->data_message.header.size = htons (sizeof (struct GNUNET_CADET_ChannelDataMessage) + payload_size);
- crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA);
+ crm->data_message.header.size = htons (sizeof (struct GNUNET_CADET_ChannelAppDataMessage) + payload_size);
+ crm->data_message.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA);
ch->mid_send.mid = htonl (ntohl (ch->mid_send.mid) + 1);
crm->data_message.mid = ch->mid_send;
crm->data_message.gid = ch->gid;
*/
void
GCC_handle_encrypted (struct CadetConnection *cc,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
GCT_handle_encrypted (cc->ct,
msg);
*/
void
GCC_handle_encrypted (struct CadetConnection *cc,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg);
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg);
/**
* @return #GNUNET_YES if size is correct, #GNUNET_NO otherwise.
*/
static int
-check_create (void *cls,
- const struct GNUNET_CADET_ConnectionCreateMessage *msg)
+check_connection_create (void *cls,
+ const struct GNUNET_CADET_ConnectionCreateMessage *msg)
{
uint16_t size = ntohs (msg->header.size) - sizeof (*msg);
* @param msg Message itself.
*/
static void
-handle_create (void *cls,
- const struct GNUNET_CADET_ConnectionCreateMessage *msg)
+handle_connection_create (void *cls,
+ const struct GNUNET_CADET_ConnectionCreateMessage *msg)
{
struct CadetPeer *peer = cls;
uint16_t size = ntohs (msg->header.size) - sizeof (*msg);
* @deprecated duplicate logic with #handle_destroy(); dedup!
*/
static void
-handle_broken (void *cls,
- const struct GNUNET_CADET_ConnectionBrokenMessage *msg)
+handle_connection_broken (void *cls,
+ const struct GNUNET_CADET_ConnectionBrokenMessage *msg)
{
struct CadetPeer *peer = cls;
struct CadetConnection *cc;
* @param msg Message itself.
*/
static void
-handle_destroy (void *cls,
- const struct GNUNET_CADET_ConnectionDestroyMessage *msg)
+handle_connection_destroy (void *cls,
+ const struct GNUNET_CADET_ConnectionDestroyMessage *msg)
{
struct CadetPeer *peer = cls;
struct CadetConnection *cc;
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_HOP_BY_HOP_ENCRYPTED_ACK.
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
*/
static void
-handle_ack (void *cls,
- const struct GNUNET_CADET_ConnectionEncryptedAckMessage *msg)
+handle_hop_by_hop_encrypted_ack (void *cls,
+ const struct GNUNET_CADET_ConnectionEncryptedAckMessage *msg)
{
struct CadetPeer *peer = cls;
#if FIXME
- GCC_handle_ack (peer,
- msg);
+ GCC_handle_poll (peer,
+ msg);
#endif
}
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
* @param msg Message itself.
*/
static void
-handle_kx (void *cls,
- const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg)
+handle_tunnel_kx (void *cls,
+ const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg)
{
struct CadetPeer *peer = cls;
struct CadetConnection *cc;
* @return #GNUNET_YES if size is correct, #GNUNET_NO otherwise.
*/
static int
-check_encrypted (void *cls,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+check_tunnel_encrypted (void *cls,
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
return GNUNET_YES;
}
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED.
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED.
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
*/
static void
-handle_encrypted (void *cls,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+handle_tunnel_encrypted (void *cls,
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
struct CadetPeer *peer = cls;
struct CadetConnection *cc;
GCO_init (const struct GNUNET_CONFIGURATION_Handle *c)
{
struct GNUNET_MQ_MessageHandler handlers[] = {
- GNUNET_MQ_hd_var_size (create,
+ GNUNET_MQ_hd_var_size (connection_create,
GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE,
struct GNUNET_CADET_ConnectionCreateMessage,
NULL),
GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK,
struct GNUNET_CADET_ConnectionCreateMessageAckMessage,
NULL),
- GNUNET_MQ_hd_fixed_size (broken,
+ GNUNET_MQ_hd_fixed_size (connection_broken,
GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN,
struct GNUNET_CADET_ConnectionBrokenMessage,
NULL),
- GNUNET_MQ_hd_fixed_size (destroy,
+ GNUNET_MQ_hd_fixed_size (connection_destroy,
GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY,
struct GNUNET_CADET_ConnectionDestroyMessage,
NULL),
- GNUNET_MQ_hd_fixed_size (ack,
- GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK,
+ GNUNET_MQ_hd_fixed_size (hop_by_hop_encrypted_ack,
+ GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK,
struct GNUNET_CADET_ConnectionEncryptedAckMessage,
NULL),
GNUNET_MQ_hd_fixed_size (poll,
- GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL,
+ GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL,
struct GNUNET_CADET_ConnectionHopByHopPollMessage,
NULL),
- GNUNET_MQ_hd_fixed_size (kx,
+ GNUNET_MQ_hd_fixed_size (tunnel_kx,
GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX,
struct GNUNET_CADET_TunnelKeyExchangeMessage,
NULL),
- GNUNET_MQ_hd_var_size (encrypted,
- GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED,
- struct GNUNET_CADET_ConnectionEncryptedMessage,
+ GNUNET_MQ_hd_var_size (tunnel_encrypted,
+ GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED,
+ struct GNUNET_CADET_TunnelEncryptedMessage,
NULL),
GNUNET_MQ_handler_end ()
};
*/
static void
t_h_encrypt (struct CadetTunnel *t,
- struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+ struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
struct CadetTunnelAxolotl *ax;
*/
static void
t_h_decrypt (struct CadetTunnel *t,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *src,
- struct GNUNET_CADET_ConnectionEncryptedMessage *dst)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *src,
+ struct GNUNET_CADET_TunnelEncryptedMessage *dst)
{
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
struct CadetTunnelAxolotl *ax;
static ssize_t
try_old_ax_keys (struct CadetTunnel *t,
void *dst,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *src,
+ const struct GNUNET_CADET_TunnelEncryptedMessage *src,
size_t size)
{
struct CadetTunnelSkippedKey *key;
struct GNUNET_ShortHashCode *hmac;
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
- struct GNUNET_CADET_ConnectionEncryptedMessage plaintext_header;
+ struct GNUNET_CADET_TunnelEncryptedMessage plaintext_header;
struct GNUNET_CRYPTO_SymmetricSessionKey *valid_HK;
size_t esize;
size_t res;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Trying skipped keys\n");
hmac = &plaintext_header.hmac;
- esize = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ esize = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
/* Find a correct Header Key */
valid_HK = NULL;
return -1;
/* Should've been checked in -cadet_connection.c handle_cadet_encrypted. */
- GNUNET_assert (size > sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage));
- len = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ GNUNET_assert (size > sizeof (struct GNUNET_CADET_TunnelEncryptedMessage));
+ len = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
GNUNET_assert (len >= sizeof (struct GNUNET_MessageHeader));
/* Decrypt header */
static ssize_t
t_ax_decrypt_and_validate (struct CadetTunnel *t,
void *dst,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *src,
+ const struct GNUNET_CADET_TunnelEncryptedMessage *src,
size_t size)
{
struct CadetTunnelAxolotl *ax;
struct GNUNET_ShortHashCode msg_hmac;
struct GNUNET_HashCode hmac;
- struct GNUNET_CADET_ConnectionEncryptedMessage plaintext_header;
+ struct GNUNET_CADET_TunnelEncryptedMessage plaintext_header;
uint32_t Np;
uint32_t PNp;
size_t esize; /* Size of encryped payload */
- esize = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ esize = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
ax = &t->ax;
/* Try current HK */
*/
static int
check_plaintext_data (void *cls,
- const struct GNUNET_CADET_ChannelDataMessage *msg)
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg)
{
return GNUNET_OK;
}
*/
static void
handle_plaintext_data (void *cls,
- const struct GNUNET_CADET_ChannelDataMessage *msg)
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg)
{
struct CadetTunnel *t = cls;
GNUNET_break (0); // FIXME!
*/
static void
handle_plaintext_channel_create (void *cls,
- const struct GNUNET_CADET_ChannelCreateMessage *cc)
+ const struct GNUNET_CADET_ChannelOpenMessage *cc)
{
struct CadetTunnel *t = cls;
GNUNET_break (0); // FIXME!
struct GNUNET_MessageHeader,
NULL),
GNUNET_MQ_hd_var_size (plaintext_data,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA,
- struct GNUNET_CADET_ChannelDataMessage,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA,
+ struct GNUNET_CADET_ChannelAppDataMessage,
NULL),
GNUNET_MQ_hd_fixed_size (plaintext_data_ack,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK,
struct GNUNET_CADET_ChannelDataAckMessage,
NULL),
GNUNET_MQ_hd_fixed_size (plaintext_channel_create,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
- struct GNUNET_CADET_ChannelCreateMessage,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN,
+ struct GNUNET_CADET_ChannelOpenMessage,
NULL),
GNUNET_MQ_hd_fixed_size (plaintext_channel_nack,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED,
struct GNUNET_CADET_ChannelManageMessage,
NULL),
GNUNET_MQ_hd_fixed_size (plaintext_channel_ack,
- GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK,
+ GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK,
struct GNUNET_CADET_ChannelManageMessage,
NULL),
GNUNET_MQ_hd_fixed_size (plaintext_channel_destroy,
*/
void
GCT_handle_encrypted (struct CadetTConnection *ct,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
struct CadetTunnel *t = ct->t;
uint16_t size = ntohs (msg->header.size);
struct CadetTunnelQueueEntry *tq;
uint16_t payload_size;
struct GNUNET_MQ_Envelope *env;
- struct GNUNET_CADET_ConnectionEncryptedMessage *ax_msg;
+ struct GNUNET_CADET_TunnelEncryptedMessage *ax_msg;
/* FIXME: what about KX not yet being ready? (see "is_ready()" check in old code!) */
payload_size = ntohs (message->size);
env = GNUNET_MQ_msg_extra (ax_msg,
payload_size,
- GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED);
+ GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED);
t_ax_encrypt (t,
&ax_msg[1],
message,
*/
void
GCT_handle_encrypted (struct CadetTConnection *ct,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg);
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg);
/**
*/
struct GNUNET_TIME_Absolute timestamp;
- /* struct GNUNET_CADET_ChannelDataMessage with payload */
+ /* struct GNUNET_CADET_ChannelAppDataMessage with payload */
};
* @param rel Reliability data for retransmission.
*/
static struct CadetReliableMessage *
-copy_message (const struct GNUNET_CADET_ChannelDataMessage *msg, uint32_t mid,
+copy_message (const struct GNUNET_CADET_ChannelAppDataMessage *msg, uint32_t mid,
struct CadetChannelReliability *rel)
{
struct CadetReliableMessage *copy;
copy = GNUNET_malloc (sizeof (*copy) + size);
copy->mid = mid;
copy->rel = rel;
- copy->type = GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA;
+ copy->type = GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA;
GNUNET_memcpy (©[1], msg, size);
return copy;
* @param rel Reliability data to the corresponding direction.
*/
static void
-add_buffered_data (const struct GNUNET_CADET_ChannelDataMessage *msg,
+add_buffered_data (const struct GNUNET_CADET_ChannelAppDataMessage *msg,
struct CadetChannelReliability *rel)
{
struct CadetReliableMessage *copy;
*/
static void
send_client_data (struct CadetChannel *ch,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
int fwd)
{
if (fwd)
{
if (copy->mid == rel->mid_recv || GNUNET_NO == ch->reliable)
{
- struct GNUNET_CADET_ChannelDataMessage *msg = (struct GNUNET_CADET_ChannelDataMessage *) ©[1];
+ struct GNUNET_CADET_ChannelAppDataMessage *msg = (struct GNUNET_CADET_ChannelAppDataMessage *) ©[1];
LOG (GNUNET_ERROR_TYPE_DEBUG, " have %u! now expecting %u\n",
copy->mid, rel->mid_recv + 1);
struct CadetChannelReliability *rel = cls;
struct CadetReliableMessage *copy;
struct CadetChannel *ch;
- struct GNUNET_CADET_ChannelDataMessage *payload;
+ struct GNUNET_CADET_ChannelAppDataMessage *payload;
int fwd;
rel->retry_task = NULL;
return;
}
- payload = (struct GNUNET_CADET_ChannelDataMessage *) ©[1];
+ payload = (struct GNUNET_CADET_ChannelAppDataMessage *) ©[1];
fwd = (rel == ch->root_rel);
/* Message not found in the queue that we are going to use. */
switch (chq->type)
{
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
LOG (GNUNET_ERROR_TYPE_DEBUG, "data MID %u sent\n", copy->mid);
GNUNET_assert (chq == copy->chq);
copy->timestamp = GNUNET_TIME_absolute_get ();
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
LOG (GNUNET_ERROR_TYPE_DEBUG, "sent %s\n", GC_m2s (chq->type));
rel = chq->rel;
GNUNET_assert (rel->uniq == chq);
rel->uniq = NULL;
if (CADET_CHANNEL_READY != rel->ch->state
- && GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK != type
+ && GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK != type
&& GNUNET_NO == rel->ch->destroy)
{
GNUNET_assert (NULL == rel->retry_task);
static void
send_create (struct CadetChannel *ch)
{
- struct GNUNET_CADET_ChannelCreateMessage msgcc;
+ struct GNUNET_CADET_ChannelOpenMessage msgcc;
msgcc.header.size = htons (sizeof (msgcc));
- msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE);
+ msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
msgcc.chid = ch->gid;
msgcc.port = ch->port;
msgcc.opt = htonl (channel_get_options (ch));
struct GNUNET_CADET_ChannelManageMessage msg;
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK);
LOG (GNUNET_ERROR_TYPE_DEBUG,
" sending channel %s ack for channel %s\n",
GC_f2s (fwd), GCCH_2s (ch));
struct GNUNET_CADET_ChannelManageMessage msg;
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED);
LOG (GNUNET_ERROR_TYPE_DEBUG,
" sending channel NACK for channel %s\n",
GCCH_2s (ch));
switch (type)
{
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
/* Don't send hop ACK, wait for client to ACK */
LOG (GNUNET_ERROR_TYPE_DEBUG, "SEND loopback %u (%u)\n",
- ntohl (((struct GNUNET_CADET_ChannelDataMessage *) msgh)->mid), ntohs (msgh->size));
- GCCH_handle_data (ch, (struct GNUNET_CADET_ChannelDataMessage *) msgh, fwd);
+ ntohl (((struct GNUNET_CADET_ChannelAppDataMessage *) msgh)->mid), ntohs (msgh->size));
+ GCCH_handle_data (ch, (struct GNUNET_CADET_ChannelAppDataMessage *) msgh, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
GCCH_handle_data_ack (ch, (struct GNUNET_CADET_ChannelDataAckMessage *) msgh, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
GCCH_handle_create (ch->t,
- (struct GNUNET_CADET_ChannelCreateMessage *) msgh);
+ (struct GNUNET_CADET_ChannelOpenMessage *) msgh);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
GCCH_handle_ack (ch,
(struct GNUNET_CADET_ChannelManageMessage *) msgh,
fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED:
GCCH_handle_nack (ch);
break;
rel = fwd ? ch->dest_rel : ch->root_rel;
ack = rel->mid_recv - 1;
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK);
msg.header.size = htons (sizeof (msg));
msg.chid = ch->gid;
msg.mid = htonl (ack);
msg.futures = 0LL;
for (copy = rel->head_recv; NULL != copy; copy = copy->next)
{
- if (copy->type != GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA)
+ if (copy->type != GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " Type %s, expected DATA\n",
GC_m2s (copy->type));
size_t size)
{
struct CadetChannelReliability *rel;
- struct GNUNET_CADET_ChannelDataMessage *payload;
- uint16_t p2p_size = sizeof(struct GNUNET_CADET_ChannelDataMessage) + size;
+ struct GNUNET_CADET_ChannelAppDataMessage *payload;
+ uint16_t p2p_size = sizeof(struct GNUNET_CADET_ChannelAppDataMessage) + size;
unsigned char cbuf[p2p_size];
unsigned char buffer;
rel->client_allowed = GNUNET_NO;
/* Ok, everything is correct, send the message. */
- payload = (struct GNUNET_CADET_ChannelDataMessage *) cbuf;
+ payload = (struct GNUNET_CADET_ChannelAppDataMessage *) cbuf;
payload->mid = htonl (rel->mid_send);
rel->mid_send++;
GNUNET_memcpy (&payload[1], message, size);
payload->header.size = htons (p2p_size);
- payload->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA);
+ payload->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA);
payload->chid = ch->gid;
LOG (GNUNET_ERROR_TYPE_DEBUG, " sending on channel...\n");
GCCH_send_prebuilt_message (&payload->header, ch, fwd, NULL);
*/
int
GCCH_handle_local_create (struct CadetClient *c,
- struct GNUNET_CADET_ChannelCreateMessageMessage *msg)
+ struct GNUNET_CADET_ChannelOpenMessageMessage *msg)
{
struct CadetChannel *ch;
struct CadetTunnel *t;
*/
void
GCCH_handle_data (struct CadetChannel *ch,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
int fwd)
{
struct CadetChannelReliability *rel;
mid = ntohl (msg->mid);
LOG (GNUNET_ERROR_TYPE_INFO, "<== %s (%s %4u) on chan %s (%p) %s [%5u]\n",
- GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA), GC_m2s (payload_type), mid,
+ GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA), GC_m2s (payload_type), mid,
GCCH_2s (ch), ch, GC_f2s (fwd), ntohs (msg->header.size));
if ( (GNUNET_NO == ch->reliable) ||
ack = ntohl (msg->mid);
LOG (GNUNET_ERROR_TYPE_INFO,
"<== %s (0x%010lX %4u) on chan %s (%p) %s [%5u]\n",
- GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK), msg->futures, ack,
+ GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK), msg->futures, ack,
GCCH_2s (ch), ch, GC_f2s (fwd), ntohs (msg->header.size));
if (GNUNET_YES == fwd)
*/
struct CadetChannel *
GCCH_handle_create (struct CadetTunnel *t,
- const struct GNUNET_CADET_ChannelCreateMessage *msg)
+ const struct GNUNET_CADET_ChannelOpenMessage *msg)
{
struct GNUNET_CADET_ClientChannelNumber chid;
struct GNUNET_CADET_ChannelNumber gid;
LOG (GNUNET_ERROR_TYPE_INFO,
"<== %s ( 0x%08X %4u) on chan %s (%p) %s [%5u]\n",
- GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE), chid, port,
+ GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN), chid, port,
GCCH_2s (ch), ch, GC_f2s (GNUNET_YES), ntohs (msg->header.size));
if (GNUNET_YES == new_channel || GCT_is_loopback (t))
{
LOG (GNUNET_ERROR_TYPE_INFO,
"<== %s ( 0x%08X %4u) on chan %s (%p) %s [%5u]\n",
- GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED), ch->gid, 0,
+ GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED), ch->gid, 0,
GCCH_2s (ch), ch, "---", 0);
send_client_nack (ch);
{
LOG (GNUNET_ERROR_TYPE_INFO,
"<== %s ( 0x%08X %4u) on chan %s (%p) %s [%5u]\n",
- GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK), ch->gid, 0,
+ GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK), ch->gid, 0,
GCCH_2s (ch), ch, GC_f2s (fwd), ntohs (msg->header.size));
/* If this is a remote (non-loopback) channel, find 'fwd'. */
data_id = 0;
switch (type)
{
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
{
- struct GNUNET_CADET_ChannelDataMessage *data_msg;
+ struct GNUNET_CADET_ChannelAppDataMessage *data_msg;
struct GNUNET_MessageHeader *payload_msg;
uint16_t payload_type;
- data_msg = (struct GNUNET_CADET_ChannelDataMessage *) message;
+ data_msg = (struct GNUNET_CADET_ChannelAppDataMessage *) message;
data_id = ntohl (data_msg->mid);
payload_msg = (struct GNUNET_MessageHeader *) &data_msg[1];
payload_type = ntohs (payload_msg->type);
info[31] = '\0';
break;
}
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
{
struct GNUNET_CADET_ChannelDataAckMessage *ack_msg;
ack_msg = (struct GNUNET_CADET_ChannelDataAckMessage *) message;
(unsigned long int) ack_msg->futures);
break;
}
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
{
- struct GNUNET_CADET_ChannelCreateMessage *cc_msg;
- cc_msg = (struct GNUNET_CADET_ChannelCreateMessage *) message;
+ struct GNUNET_CADET_ChannelOpenMessage *cc_msg;
+ cc_msg = (struct GNUNET_CADET_ChannelOpenMessage *) message;
SPRINTF (info, " 0x%08X", ntohl (cc_msg->chid.cn));
break;
}
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED:
case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY:
{
struct GNUNET_CADET_ChannelManageMessage *m_msg;
switch (type)
{
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
if (GNUNET_YES == ch->reliable)
{
chq = GNUNET_new (struct CadetChannelQueue);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
chq = GNUNET_new (struct CadetChannelQueue);
chq->type = type;
chq->rel = fwd ? ch->root_rel : ch->dest_rel;
case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY:
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED:
fire_and_forget (message, ch, GNUNET_YES);
break;
*/
int
GCCH_handle_local_create (struct CadetClient *c,
- struct GNUNET_CADET_ChannelCreateMessageMessage *msg);
+ struct GNUNET_CADET_ChannelOpenMessageMessage *msg);
/**
* Handler for cadet network payload traffic.
*/
void
GCCH_handle_data (struct CadetChannel *ch,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
int fwd);
*/
struct CadetChannel *
GCCH_handle_create (struct CadetTunnel *t,
- const struct GNUNET_CADET_ChannelCreateMessage *msg);
+ const struct GNUNET_CADET_ChannelOpenMessage *msg);
/**
/* Build ACK message and send on conn */
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK);
msg.cemi = ack_cemi;
msg.cid = c->id;
}
else /* CONN_CREATE or CONN_ACK */
{
- GNUNET_assert (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED != type);
+ GNUNET_assert (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED != type);
forced = GNUNET_YES;
}
schedule_next_keepalive (c, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED:
if (GNUNET_YES == sent)
{
fc->last_pid_sent = pid;
connection_reset_timeout (c, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL:
fc->poll_msg = NULL;
if (2 == c->destroy)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " task %u\n", fc->poll_task);
break;
- case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK:
fc->ack_msg = NULL;
break;
LOG (GNUNET_ERROR_TYPE_DEBUG, "Polling connection %s %s\n",
GCC_2s (c), GC_f2s (fwd));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL);
msg.header.size = htons (sizeof (msg));
msg.cid = c->id;
msg.cemi = fc->last_pid_sent;
/* Check PID for payload messages */
type = ntohs (message->type);
- if (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED == type)
+ if (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED == type)
{
fc = fwd ? &c->bck_fc : &c->fwd_fc;
LOG (GNUNET_ERROR_TYPE_DEBUG, " PID %u (expected in interval [%u,%u])\n",
*/
void
GCC_handle_encrypted (struct CadetPeer *peer,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
static struct CadetEncryptedMessageIdentifier zero;
const struct GNUNET_CADET_ConnectionTunnelIdentifier* cid;
GC_f2s(fwd), size);
switch (type)
{
- case GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED:
LOG (GNUNET_ERROR_TYPE_DEBUG, " Q_N+ %p %u, PIDsnt: %u, ACKrcv: %u\n",
fc,
fc->queue_n,
GNUNET_break (0 == payload_type);
break;
- case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK:
- case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL:
+ case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL:
case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY:
case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN:
GNUNET_assert (GNUNET_YES == force);
GNUNET_break (0);
LOG (GNUNET_ERROR_TYPE_DEBUG, "queue full: %u/%u\n",
fc->queue_n, fc->queue_max);
- if (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED == type)
+ if (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED == type)
{
fc->queue_n--;
}
*/
void
GCC_handle_encrypted (struct CadetPeer *peer,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg);
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg);
/**
* Core handler for axolotl key exchange traffic.
LOG (GNUNET_ERROR_TYPE_DEBUG, " by client %u\n", c->id);
/* Message size sanity check */
- if (sizeof (struct GNUNET_CADET_ChannelCreateMessageMessage)
+ if (sizeof (struct GNUNET_CADET_ChannelOpenMessageMessage)
!= ntohs (message->size))
{
GNUNET_break (0);
if (GNUNET_OK !=
GCCH_handle_local_create (c,
- (struct GNUNET_CADET_ChannelCreateMessageMessage *)
+ (struct GNUNET_CADET_ChannelOpenMessageMessage *)
message))
{
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
sizeof (struct GNUNET_CADET_PortMessage)},
{&handle_port_close, NULL, GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE,
sizeof (struct GNUNET_CADET_PortMessage)},
- {&handle_channel_create, NULL, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
- sizeof (struct GNUNET_CADET_ChannelCreateMessageMessage)},
+ {&handle_channel_create, NULL, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN,
+ sizeof (struct GNUNET_CADET_ChannelOpenMessageMessage)},
{&handle_channel_destroy, NULL, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
sizeof (struct GNUNET_CADET_ChannelDestroyMessage)},
{&handle_data, NULL, GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA, 0},
uint32_t opt,
const struct GNUNET_PeerIdentity *peer)
{
- struct GNUNET_CADET_ChannelCreateMessageMessage msg;
+ struct GNUNET_CADET_ChannelOpenMessageMessage msg;
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
msg.channel_id = id;
msg.port = *port;
msg.opt = htonl (opt);
c);
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED);
msg.channel_id = id;
GNUNET_SERVER_notification_context_unicast (nc,
c->handle,
*/
void
GML_send_data (struct CadetClient *c,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
struct GNUNET_CADET_ClientChannelNumber id)
{
struct GNUNET_CADET_LocalData *copy;
- uint16_t size = ntohs (msg->header.size) - sizeof (struct GNUNET_CADET_ChannelDataMessage);
+ uint16_t size = ntohs (msg->header.size) - sizeof (struct GNUNET_CADET_ChannelAppDataMessage);
char cbuf[size + sizeof (struct GNUNET_CADET_LocalData)];
if (size < sizeof (struct GNUNET_MessageHeader))
*/
void
GML_send_data (struct CadetClient *c,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
struct GNUNET_CADET_ClientChannelNumber id);
/**
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
* @return #GNUNET_YES if size is correct, #GNUNET_NO otherwise.
*/
static int
-check_encrypted (void *cls, const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+check_encrypted (void *cls, const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
uint16_t size;
uint16_t minimum_size;
size = ntohs (msg->header.size);
- minimum_size = sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage)
+ minimum_size = sizeof (struct GNUNET_CADET_TunnelEncryptedMessage)
+ sizeof (struct GNUNET_MessageHeader);
if (size < minimum_size)
}
/**
- * Handle for #GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED.
+ * Handle for #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED.
*
* @param cls Closure (CadetPeer for neighbor that sent the message).
* @param msg Message itself.
*/
static void
-handle_encrypted (void *cls, const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+handle_encrypted (void *cls, const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
struct CadetPeer *peer = cls;
GCC_handle_encrypted (peer, msg);
struct GNUNET_CADET_ConnectionDestroyMessage,
NULL),
GNUNET_MQ_hd_fixed_size (ack,
- GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK,
+ GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK,
struct GNUNET_CADET_ConnectionEncryptedAckMessage,
NULL),
GNUNET_MQ_hd_fixed_size (poll,
- GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL,
+ GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL,
struct GNUNET_CADET_ConnectionHopByHopPollMessage,
NULL),
GNUNET_MQ_hd_fixed_size (kx,
struct GNUNET_CADET_TunnelKeyExchangeMessage,
NULL),
GNUNET_MQ_hd_var_size (encrypted,
- GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED,
- struct GNUNET_CADET_ConnectionEncryptedMessage,
+ GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED,
+ struct GNUNET_CADET_TunnelEncryptedMessage,
NULL),
GNUNET_MQ_handler_end ()
};
}
/* Bulky payload has lower priority, control traffic has higher. */
- if (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED == q->type)
+ if (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED == q->type)
return low;
return high;
}
static int
is_connection_management (uint16_t type)
{
- return type == GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK ||
- type == GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL;
+ return type == GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK ||
+ type == GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL;
}
* @param msg Message whose header to encrypt.
*/
static void
-t_h_encrypt (struct CadetTunnel *t, struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+t_h_encrypt (struct CadetTunnel *t, struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
struct CadetTunnelAxolotl *ax;
* @param dst Where to decrypt header to.
*/
static void
-t_h_decrypt (struct CadetTunnel *t, const struct GNUNET_CADET_ConnectionEncryptedMessage *src,
- struct GNUNET_CADET_ConnectionEncryptedMessage *dst)
+t_h_decrypt (struct CadetTunnel *t, const struct GNUNET_CADET_TunnelEncryptedMessage *src,
+ struct GNUNET_CADET_TunnelEncryptedMessage *dst)
{
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
struct CadetTunnelAxolotl *ax;
*/
static int
try_old_ax_keys (struct CadetTunnel *t, void *dst,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *src, size_t size)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *src, size_t size)
{
struct CadetTunnelSkippedKey *key;
struct GNUNET_ShortHashCode *hmac;
struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
- struct GNUNET_CADET_ConnectionEncryptedMessage plaintext_header;
+ struct GNUNET_CADET_TunnelEncryptedMessage plaintext_header;
struct GNUNET_CRYPTO_SymmetricSessionKey *valid_HK;
size_t esize;
size_t res;
LOG (GNUNET_ERROR_TYPE_DEBUG, "Trying old keys\n");
hmac = &plaintext_header.hmac;
- esize = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ esize = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
/* Find a correct Header Key */
for (key = t->ax->skipped_head; NULL != key; key = key->next)
return -1;
/* Should've been checked in -cadet_connection.c handle_cadet_encrypted. */
- GNUNET_assert (size > sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage));
- len = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ GNUNET_assert (size > sizeof (struct GNUNET_CADET_TunnelEncryptedMessage));
+ len = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
GNUNET_assert (len >= sizeof (struct GNUNET_MessageHeader));
/* Decrypt header */
*/
static int
t_ax_decrypt_and_validate (struct CadetTunnel *t, void *dst,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *src,
+ const struct GNUNET_CADET_TunnelEncryptedMessage *src,
size_t size)
{
struct CadetTunnelAxolotl *ax;
struct GNUNET_ShortHashCode msg_hmac;
struct GNUNET_HashCode hmac;
- struct GNUNET_CADET_ConnectionEncryptedMessage plaintext_header;
+ struct GNUNET_CADET_TunnelEncryptedMessage plaintext_header;
uint32_t Np;
uint32_t PNp;
size_t esize; /* Size of encryped payload */
size_t osize; /* Size of output (decrypted payload) */
- esize = size - sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
+ esize = size - sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
ax = t->ax;
if (NULL == ax)
return -1;
struct CadetTunnelQueue *existing_q)
{
struct GNUNET_MessageHeader *msg;
- struct GNUNET_CADET_ConnectionEncryptedMessage *ax_msg;
+ struct GNUNET_CADET_TunnelEncryptedMessage *ax_msg;
struct CadetTunnelQueue *tq;
size_t size = ntohs (message->size);
- char cbuf[sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage) + size] GNUNET_ALIGN;
+ char cbuf[sizeof (struct GNUNET_CADET_TunnelEncryptedMessage) + size] GNUNET_ALIGN;
size_t esize;
uint16_t type;
int fwd;
GNUNET_assert (GNUNET_NO == GCT_is_loopback (t));
- ax_msg = (struct GNUNET_CADET_ConnectionEncryptedMessage *) cbuf;
+ ax_msg = (struct GNUNET_CADET_TunnelEncryptedMessage *) cbuf;
msg = &ax_msg->header;
- msg->size = htons (sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage) + size);
- msg->type = htons (GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED);
+ msg->size = htons (sizeof (struct GNUNET_CADET_TunnelEncryptedMessage) + size);
+ msg->type = htons (GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED);
esize = t_ax_encrypt (t, &ax_msg[1], message, size);
ax_msg->Ns = htonl (t->ax->Ns++);
ax_msg->PNs = htonl (t->ax->PNs);
*/
static void
handle_data (struct CadetTunnel *t,
- const struct GNUNET_CADET_ChannelDataMessage *msg,
+ const struct GNUNET_CADET_ChannelAppDataMessage *msg,
int fwd)
{
struct CadetChannel *ch;
/* Check size */
size = ntohs (msg->header.size);
if (size <
- sizeof (struct GNUNET_CADET_ChannelDataMessage) +
+ sizeof (struct GNUNET_CADET_ChannelAppDataMessage) +
sizeof (struct GNUNET_MessageHeader))
{
GNUNET_break (0);
*/
static void
handle_ch_create (struct CadetTunnel *t,
- const struct GNUNET_CADET_ChannelCreateMessage *msg)
+ const struct GNUNET_CADET_ChannelOpenMessage *msg)
{
struct CadetChannel *ch;
size_t size;
/* Check size */
size = ntohs (msg->header.size);
- if (size != sizeof (struct GNUNET_CADET_ChannelCreateMessage))
+ if (size != sizeof (struct GNUNET_CADET_ChannelOpenMessage))
{
GNUNET_break_op (0);
return;
GNUNET_STATISTICS_update (stats, "# keepalives received", 1, GNUNET_NO);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA:
/* Don't send hop ACK, wait for client to ACK */
- handle_data (t, (struct GNUNET_CADET_ChannelDataMessage *) msgh, fwd);
+ handle_data (t, (struct GNUNET_CADET_ChannelAppDataMessage *) msgh, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK:
handle_data_ack (t, (struct GNUNET_CADET_ChannelDataAckMessage *) msgh, fwd);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
- handle_ch_create (t, (struct GNUNET_CADET_ChannelCreateMessage *) msgh);
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN:
+ handle_ch_create (t, (struct GNUNET_CADET_ChannelOpenMessage *) msgh);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED:
handle_ch_nack (t, (struct GNUNET_CADET_ChannelManageMessage *) msgh);
break;
- case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK:
+ case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK:
handle_ch_ack (t, (struct GNUNET_CADET_ChannelManageMessage *) msgh, fwd);
break;
*/
void
GCT_handle_encrypted (struct CadetTunnel *t,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg)
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg)
{
uint16_t size = ntohs (msg->header.size);
char cbuf [size];
LOG (GNUNET_ERROR_TYPE_DEBUG, "init\n");
expected_overhead = 0;
- expected_overhead += sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage);
- expected_overhead += sizeof (struct GNUNET_CADET_ChannelDataMessage);
+ expected_overhead += sizeof (struct GNUNET_CADET_TunnelEncryptedMessage);
+ expected_overhead += sizeof (struct GNUNET_CADET_ChannelAppDataMessage);
expected_overhead += sizeof (struct GNUNET_CADET_ConnectionEncryptedAckMessage);
GNUNET_assert (GNUNET_CONSTANTS_CADET_P2P_OVERHEAD == expected_overhead);
*/
void
GCT_handle_encrypted (struct CadetTunnel *t,
- const struct GNUNET_CADET_ConnectionEncryptedMessage *msg);
+ const struct GNUNET_CADET_TunnelEncryptedMessage *msg);
/**
/**
* Size of the CADET message overhead:
- * = sizeof (struct GNUNET_CADET_ConnectionEncryptedMessage)
- * + sizeof (struct GNUNET_CADET_ChannelDataMessage)
+ * = sizeof (struct GNUNET_CADET_TunnelEncryptedMessage)
+ * + sizeof (struct GNUNET_CADET_ChannelAppDataMessage)
* + sizeof (struct GNUNET_CADET_ConnectionEncryptedAckMessage))
*
* Checked for correcteness in gnunet-service-cadet_tunnel.c: GCT_init().
/**
* Hop-by-hop, connection dependent ACK.
*/
-#define GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED_HOP_BY_HOP_ACK 1005
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_ENCRYPTED_ACK 1005
/**
- * Poll for a hop-by-hop ACK.
+ * Axolotl key exchange.
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_HOP_BY_HOP_POLL 1006
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX 1007
/**
- * Key exchange encapsulation.
+ * Axolotl encrypted data.
*/
-#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_KX 1007
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED 1008
/**
- * Axolotl encrypted data.
+ * We do not bother with ACKs for
+ * #GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED messages, but we instead
+ * poll for one if we got nothing for a while and start to be worried.
*/
-#define GNUNET_MESSAGE_TYPE_CONNECTION_ENCRYPTED 1008
+#define GNUNET_MESSAGE_TYPE_CADET_TUNNEL_ENCRYPTED_POLL 1006
+
+
/********************************** Channel *********************************/
/**
* Payload data (inside an encrypted tunnel).
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA 1010
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA 1010
/**
* Confirm payload data end-to-end.
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DATA_ACK 1011
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_APP_DATA_ACK 1011
/**
* Announce connection is still alive (direction sensitive).
/**
* Ask the cadet service to create a new channel.
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE 1013
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN 1013
/**
* Ask the cadet service to destroy a channel.
/**
* Confirm the creation of a channel
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_ACK 1015
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_ACK 1015
/**
* Reject the creation of a channel
*/
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE_NACK_DEPRECATED 1016
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN_NACK_DEPRECATED 1016
/*********************************** Local **********************************/
*/
#define GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING 20
-/**
- * Key exchange in CADET
- */
-#define GNUNET_SIGNATURE_PURPOSE_CADET_KX 21
-
/**
* Signature for the first round of distributed key generation.
*/