*/
struct GNUNET_CADET_PortMessage
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_[OPEN|CLOSE]
- *
- * Size: sizeof(struct GNUNET_CADET_ChannelMessage)
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN
+ * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE
+ *
+ * Size: sizeof(struct GNUNET_CADET_ChannelMessage)
+ */
struct GNUNET_MessageHeader header;
- /**
- * Port to open/close.
- */
+ /**
+ * Port to open/close.
+ */
struct GNUNET_HashCode port GNUNET_PACKED;
};
*/
struct GNUNET_CADET_ChannelCreateMessage
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
- *
- * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage)
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
+ *
+ * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage)
+ */
struct GNUNET_MessageHeader header;
- /**
- * ID of a channel controlled by this client.
- */
+ /**
+ * ID of a channel controlled by this client.
+ */
CADET_ChannelNumber channel_id GNUNET_PACKED;
- /**
- * Channel's peer
- */
+ /**
+ * Channel's peer
+ */
struct GNUNET_PeerIdentity peer;
- /**
- * Port of the channel.
- */
+ /**
+ * Port of the channel.
+ */
struct GNUNET_HashCode port;
- /**
- * Options.
- */
+ /**
+ * Options.
+ */
uint32_t opt GNUNET_PACKED;
};
*/
struct GNUNET_CADET_ChannelDestroyMessage
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY
- *
- * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage)
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY
+ *
+ * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage)
+ */
struct GNUNET_MessageHeader header;
-
- /**
- * ID of a channel controlled by this client.
- */
+
+ /**
+ * ID of a channel controlled by this client.
+ */
CADET_ChannelNumber channel_id GNUNET_PACKED;
};
*/
struct GNUNET_CADET_LocalData
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA
+ */
struct GNUNET_MessageHeader header;
- /**
- * ID of the channel
- */
+ /**
+ * ID of the channel
+ */
uint32_t id GNUNET_PACKED;
- /**
- * Payload follows
- */
+ /**
+ * Payload follows
+ */
};
*/
struct GNUNET_CADET_LocalAck
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK
+ */
struct GNUNET_MessageHeader header;
- /**
- * ID of the channel allowed to send more data.
- */
+ /**
+ * ID of the channel allowed to send more data.
+ */
CADET_ChannelNumber channel_id GNUNET_PACKED;
};
struct GNUNET_CADET_LocalInfo
{
/**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO[_TUNNEL,_PEER]
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL or
+ * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER
*/
struct GNUNET_MessageHeader header;
struct GNUNET_CADET_LocalInfoPeer
{
/**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER[S]
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER or
+ * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS
*/
struct GNUNET_MessageHeader header;
struct GNUNET_CADET_LocalInfoTunnel
{
/**
- * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL[S]
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL
+ * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS
*/
struct GNUNET_MessageHeader header;
*/
struct GNUNET_MessageHeader header;
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
/**
* ID of the connection
*/
*/
struct GNUNET_CADET_ConnectionACK
{
- /**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK
+ */
struct GNUNET_MessageHeader header;
- /**
- * ID of the connection.
- */
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
+ /**
+ * ID of the connection.
+ */
struct GNUNET_CADET_Hash cid;
};
*/
struct GNUNET_CADET_KX
{
- /**
- * Type: #GNUNET_MESSAGE_TYPE_CADET_KX.
- */
+ /**
+ * Type: #GNUNET_MESSAGE_TYPE_CADET_KX.
+ */
struct GNUNET_MessageHeader header;
+
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
- /**
- * ID of the connection.
- */
+ /**
+ * ID of the connection.
+ */
struct GNUNET_CADET_Hash cid;
/* Specific KX message follows. */
struct GNUNET_MessageHeader header;
/**
- * ID of the channel
+ * Channel options.
*/
- CADET_ChannelNumber chid GNUNET_PACKED;
+ uint32_t opt GNUNET_PACKED;
/**
* Destination port.
struct GNUNET_HashCode port;
/**
- * Channel options.
+ * ID of the channel
*/
- uint32_t opt GNUNET_PACKED;
+ CADET_ChannelNumber chid GNUNET_PACKED;
};
*/
struct GNUNET_MessageHeader header;
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
/**
* ID of the connection.
*/
*/
struct GNUNET_MessageHeader header;
+ /**
+ * For alignment.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
/**
* ID of the connection.
*/
*/
struct CadetReliableMessage
{
- /**
- * Double linked list, FIFO style
- */
+ /**
+ * Double linked list, FIFO style
+ */
struct CadetReliableMessage *next;
struct CadetReliableMessage *prev;
- /**
- * Type of message (payload, channel management).
- */
+ /**
+ * Type of message (payload, channel management).
+ */
int16_t type;
- /**
- * Tunnel Reliability queue this message is in.
- */
+ /**
+ * Tunnel Reliability queue this message is in.
+ */
struct CadetChannelReliability *rel;
- /**
- * ID of the message (ACK needed to free)
- */
+ /**
+ * ID of the message (ACK needed to free)
+ */
uint32_t mid;
/**
*/
struct CadetChannelQueue *chq;
- /**
- * When was this message issued (to calculate ACK delay)
- */
+ /**
+ * When was this message issued (to calculate ACK delay)
+ */
struct GNUNET_TIME_Absolute timestamp;
/* struct GNUNET_CADET_Data with payload */
*/
struct CadetChannelReliability
{
- /**
- * Channel this is about.
- */
+ /**
+ * Channel this is about.
+ */
struct CadetChannel *ch;
- /**
- * DLL of messages sent and not yet ACK'd.
- */
+ /**
+ * DLL of messages sent and not yet ACK'd.
+ */
struct CadetReliableMessage *head_sent;
struct CadetReliableMessage *tail_sent;
- /**
- * DLL of messages received out of order.
- */
+ /**
+ * DLL of messages received out of order.
+ */
struct CadetReliableMessage *head_recv;
struct CadetReliableMessage *tail_recv;
- /**
- * Messages received.
- */
+ /**
+ * Messages received.
+ */
unsigned int n_recv;
- /**
- * Next MID to use for outgoing traffic.
- */
+ /**
+ * Next MID to use for outgoing traffic.
+ */
uint32_t mid_send;
- /**
- * Next MID expected for incoming traffic.
- */
+ /**
+ * Next MID expected for incoming traffic.
+ */
uint32_t mid_recv;
- /**
- * Handle for queued unique data CREATE, DATA_ACK.
- */
+ /**
+ * Handle for queued unique data CREATE, DATA_ACK.
+ */
struct CadetChannelQueue *uniq;
- /**
- * Can we send data to the client?
- */
+ /**
+ * Can we send data to the client?
+ */
int client_ready;
/**
*/
int client_allowed;
- /**
- * Task to resend/poll in case no ACK is received.
- */
+ /**
+ * Task to resend/poll in case no ACK is received.
+ */
struct GNUNET_SCHEDULER_Task * retry_task;
- /**
- * Counter for exponential backoff.
- */
+ /**
+ * Counter for exponential backoff.
+ */
struct GNUNET_TIME_Relative retry_timer;
- /**
- * How long does it usually take to get an ACK.
- */
+ /**
+ * How long does it usually take to get an ACK.
+ */
struct GNUNET_TIME_Relative expected_delay;
};
*/
struct CadetChannel
{
- /**
- * Tunnel this channel is in.
- */
+ /**
+ * Tunnel this channel is in.
+ */
struct CadetTunnel *t;
- /**
- * Destination port of the channel.
- */
+ /**
+ * Destination port of the channel.
+ */
struct GNUNET_HashCode port;
- /**
- * Global channel number ( < GNUNET_CADET_LOCAL_CHANNEL_ID_CLI)
- */
+ /**
+ * Global channel number ( < GNUNET_CADET_LOCAL_CHANNEL_ID_CLI)
+ */
CADET_ChannelNumber gid;
- /**
- * Local tunnel number for root (owner) client.
- * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_CLI or 0 )
- */
+ /**
+ * Local tunnel number for root (owner) client.
+ * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_CLI or 0 )
+ */
CADET_ChannelNumber lid_root;
-
- /**
- * Local tunnel number for local destination clients (incoming number)
- * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_SERV or 0).
- */
+
+ /**
+ * Local tunnel number for local destination clients (incoming number)
+ * ( >= GNUNET_CADET_LOCAL_CHANNEL_ID_SERV or 0).
+ */
CADET_ChannelNumber lid_dest;
- /**
- * Channel state.
- */
+ /**
+ * Channel state.
+ */
enum CadetChannelState state;
- /**
- * Is the tunnel bufferless (minimum latency)?
- */
+ /**
+ * Is the tunnel bufferless (minimum latency)?
+ */
int nobuffer;
- /**
- * Is the tunnel reliable?
- */
+ /**
+ * Is the tunnel reliable?
+ */
int reliable;
- /**
- * Last time the channel was used
- */
+ /**
+ * Last time the channel was used
+ */
struct GNUNET_TIME_Absolute timestamp;
- /**
- * Client owner of the tunnel, if any
- */
+ /**
+ * Client owner of the tunnel, if any
+ */
struct CadetClient *root;
- /**
- * Client destination of the tunnel, if any.
- */
+ /**
+ * Client destination of the tunnel, if any.
+ */
struct CadetClient *dest;
- /**
- * Flag to signal the destruction of the channel.
- * If this is set GNUNET_YES the channel will be destroyed
- * when the queue is empty.
- */
+ /**
+ * Flag to signal the destruction of the channel.
+ * If this is set to #GNUNET_YES the channel will be destroyed
+ * when the queue is empty.
+ */
int destroy;
- /**
- * Total (reliable) messages pending ACK for this channel.
- */
+ /**
+ * Total (reliable) messages pending ACK for this channel.
+ */
unsigned int pending_messages;
- /**
- * Reliability data.
- * Only present (non-NULL) at the owner of a tunnel.
- */
+ /**
+ * Reliability data.
+ * Only present (non-NULL) at the owner of a tunnel.
+ */
struct CadetChannelReliability *root_rel;
- /**
- * Reliability data.
- * Only present (non-NULL) at the destination of a tunnel.
- */
+ /**
+ * Reliability data.
+ * Only present (non-NULL) at the destination of a tunnel.
+ */
struct CadetChannelReliability *dest_rel;
};
struct CadetClient *c,
int is_root);
+
/**
* Handle a channel create requested by a client.
*
* @param c Client that requested the creation (will be the root).
* @param msg Create Channel message.
*
- * @return GNUNET_OK if everything went fine, GNUNET_SYSERR otherwise.
+ * @return #GNUNET_OK if everything went fine, #GNUNET_SYSERR otherwise.
*/
int
GCCH_handle_local_create (struct CadetClient *c,
const struct GNUNET_CADET_Data *msg,
int fwd);
+
/**
* Handler for cadet network traffic end-to-end ACKs.
*
const struct GNUNET_CADET_DataACK *msg,
int fwd);
+
/**
* Handler for channel create messages.
*
GCCH_handle_create (struct CadetTunnel *t,
const struct GNUNET_CADET_ChannelCreate *msg);
+
/**
* Handler for channel NACK messages.
*
void
GCCH_handle_nack (struct CadetChannel *ch);
+
/**
* Handler for channel ack messages.
*
const struct GNUNET_CADET_ChannelManage *msg,
int fwd);
+
/**
* Handler for channel destroy messages.
*
const struct GNUNET_CADET_ChannelManage *msg,
int fwd);
+
/**
* Sends an already built message on a channel.
*
struct CadetChannel *ch, int fwd,
void *existing_copy);
+
/**
* Get the static string for identification of the channel.
*
* Check invariants for all connections using #check_neighbours().
*/
void
-GCC_check_connections ();
+GCC_check_connections (void);
/**
*/
struct CadetClient
{
- /**
- * Linked list next
- */
+ /**
+ * Linked list next
+ */
struct CadetClient *next;
- /**
- * Linked list prev
- */
+ /**
+ * Linked list prev
+ */
struct CadetClient *prev;
- /**
- * Tunnels that belong to this client, indexed by local id
- */
+ /**
+ * Tunnels that belong to this client, indexed by local id
+ */
struct GNUNET_CONTAINER_MultiHashMap32 *own_channels;
-
- /**
- * Tunnels this client has accepted, indexed by incoming local id
- */
+
+ /**
+ * Tunnels this client has accepted, indexed by incoming local id
+ */
struct GNUNET_CONTAINER_MultiHashMap32 *incoming_channels;
- /**
- * Channel ID for the next incoming channel.
- */
+ /**
+ * Channel ID for the next incoming channel.
+ */
CADET_ChannelNumber next_chid;
- /**
- * Handle to communicate with the client
- */
+ /**
+ * Handle to communicate with the client
+ */
struct GNUNET_SERVER_Client *handle;
- /**
- * Ports that this client has declared interest in.
- * Indexed by port, contains *Client.
- */
+ /**
+ * Ports that this client has declared interest in.
+ * Indexed by port, contains *Client.
+ */
struct GNUNET_CONTAINER_MultiHashMap *ports;
- /**
- * Whether the client is active or shutting down (don't send confirmations
- * to a client that is shutting down.
- */
+ /**
+ * Whether the client is active or shutting down (don't send confirmations
+ * to a client that is shutting down.
+ */
int shutting_down;
- /**
- * ID of the client, mainly for debug messages
- */
+ /**
+ * ID of the client, mainly for debug messages
+ */
unsigned int id;
};
* @param key Port.
* @param value Client structure.
*
- * @return GNUNET_OK, keep iterating.
+ * @return #GNUNET_OK, keep iterating.
*/
static int
client_release_ports (void *cls,
* @param key The local channel id (used to access the hashmap).
* @param value The value stored at the key (channel to destroy).
*
- * @return GNUNET_OK, keep iterating.
+ * @return #GNUNET_OK, keep iterating.
*/
static int
channel_destroy_iterator (void *cls,
GNUNET_free (c);
}
+
/**
* Create a client record, register data and initialize memory.
*
*/
enum CadetTunnelCState
{
- /**
- * Uninitialized status, should never appear in operation.
- */
+ /**
+ * Uninitialized status, should never appear in operation.
+ */
CADET_TUNNEL_NEW,
- /**
- * No path to the peer known yet.
- */
+ /**
+ * No path to the peer known yet.
+ */
CADET_TUNNEL_SEARCHING,
- /**
- * Request sent, not yet answered.
- */
+ /**
+ * Request sent, not yet answered.
+ */
CADET_TUNNEL_WAITING,
- /**
- * Peer connected and ready to accept data.
- */
+ /**
+ * Peer connected and ready to accept data.
+ */
CADET_TUNNEL_READY,
/**
* @param type Type of message sent.
* @param size Size of the message.
*/
-typedef void (*GCT_sent) (void *cls,
- struct CadetTunnel *t,
- struct CadetTunnelQueue *q,
- uint16_t type, size_t size);
+typedef void
+(*GCT_sent) (void *cls,
+ struct CadetTunnel *t,
+ struct CadetTunnelQueue *q,
+ uint16_t type, size_t size);
+
+typedef void
+(*GCT_conn_iter) (void *cls, struct CadetConnection *c);
+
-typedef void (*GCT_conn_iter) (void *cls, struct CadetConnection *c);
-typedef void (*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
+typedef void
+(*GCT_chan_iter) (void *cls, struct CadetChannel *ch);
/******************************************************************************/
#define GNUNET_MESSAGE_TYPE_DNS_HELPER 214
-/*******************************************************************************
- * CADET message types
- ******************************************************************************/
-
-/**
- * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
- */
-#define GNUNET_MESSAGE_TYPE_CADET 215
-
-/**
- * Type of message used to send another peer which messages we want to receive
- * through a cadet-tunnel (LEGACY)
- */
-#define GNUNET_MESSAGE_TYPE_CADET_HELLO 216
-
-/**
- * Request the creation of a connection
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE 256
-
-/**
- * Send origin an ACK that the connection is complete
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK 257
-
-/**
- * Notify that a connection is no longer valid
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN 258
-
-/**
- * At some point, the route will spontaneously change TODO
- */
-#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED 259
-
-/**
- * Payload data (usually inside a encrypted tunnel).
- */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA 260
-
-/**
- * Confirm payload data end-to-end.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK 261
-
-/**
- * Key exchange encapsulation.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_KX 262
-
-/**
- * Request the destuction of a connection
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY 266
-
-/**
- * Hop-by-hop, connection dependent ACK.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_ACK 268
-
-/**
- * Poll for a hop-by-hop ACK.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_POLL 269
-
-/**
- * Announce connection is still alive (direction sensitive).
- */
-#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE 270
-
-
-/**
- * Ask the cadet service to create a new channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE 273
-
-/**
- * Ask the cadet service to destroy a channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY 274
-
-/**
- * Confirm the creation of a channel
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK 275
-
-/**
- * Reject the creation of a channel
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK 276
-
-/**
- * Axolotl key exchange.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_AX_KX 281
-
-/**
- * Axolotl encrypted data.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_AX 282
-
-/**
- * Payload client <-> service
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 285
-
-/**
- * Local ACK for data.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 286
-
-/**
- * Start listening on a port.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN 287
-
-/**
- * Stop listening on a port.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 288
-
-/**
- * Local information about all channels of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS 290
-
-/**
- * Local information of service about a specific channel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 291
-
-/**
- * Local information about all tunnels of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 292
-
-/**
- * Local information of service about a specific tunnel.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 293
-
-/**
- * Local information about all connections of service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 294
-
-/**
- * Local information of service about a specific connection.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 295
-
-/**
- * Local information about all peers known to the service.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 296
-
-/**
- * Local information of service about a specific peer.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER 297
-
-/**
- * Traffic (net-cat style) used by the Command Line Interface.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_CLI 298
-
-/**
- * Debug request.
- */
-#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP 299
-
-
/*******************************************************************************
* CHAT message types START
#define GNUNET_MESSAGE_TYPE_TESTBED_LOGGER_ACK 601
-/*******************************************************************************
- * EXPERIMENTATION message types
- ******************************************************************************/
-
-/**
- * Message for experimentation request
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_REQUEST 610
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_RESPONSE 611
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_START 612
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_START_ACK 613
-
-/**
- * Message for experimentation response
- */
-#define GNUNET_MESSAGE_TYPE_EXPERIMENTATION_STOP 614
-
-
-
/**
* Advertise regex capability.
#define GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY 783
-/*******************************************************************************
- * SENSOR message types
- ******************************************************************************/
-
-/**
- * Request information about all sensors
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_GETALL 800
-
-/**
- * Request information about one sensor
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_GET 801
-
-/**
- * Message carrying sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_INFO 802
-
-/**
- * End of an iteration sequence
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_END 803
-
-/**
- * Message carrying a single sensor reading
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_READING 804
-
-/**
- * Request for sensor list from update point
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_LIST_REQ 805
-
-/**
- * Messsage carrying brief sensor information (name, version)
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_BRIEF 806
-
-/**
- * Request for full sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_FULL_REQ 807
-
-/**
- * Full sensor information
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_FULL 808
-
-/**
- * Sensor anomaly report
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_REPORT 809
-
-/**
- * Message sent from API to service to force a new sensor anomaly status
- * (For testing purposes only)
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_FORCE 810
-
-/**
- * Sensor anomaly report exchanged between peers
- */
-#define GNUNET_MESSAGE_TYPE_SENSOR_ANOMALY_REPORT_P2P 811
-
-
/*******************************************************************************
* PEERSTORE message types
******************************************************************************/
/*******************************************************************************/
+
+/*******************************************************************************
+ * CADET message types
+ ******************************************************************************/
+
+/**
+ * Type of message used to transport messages throug a CADET-tunnel (LEGACY)
+ */
+#define GNUNET_MESSAGE_TYPE_CADET 1000
+
+/**
+ * Type of message used to send another peer which messages we want to receive
+ * through a cadet-tunnel (LEGACY)
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_HELLO 1001
+
+/**
+ * Request the creation of a connection
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE 1002
+
+/**
+ * Send origin an ACK that the connection is complete
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK 1003
+
+/**
+ * Notify that a connection is no longer valid
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN 1004
+
+/**
+ * At some point, the route will spontaneously change TODO
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED 1005
+
+/**
+ * Payload data (usually inside a encrypted tunnel).
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_DATA 1006
+
+/**
+ * Confirm payload data end-to-end.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_DATA_ACK 1007
+
+/**
+ * Key exchange encapsulation.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_KX 1008
+
+/**
+ * Request the destuction of a connection
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY 1009
+
+/**
+ * Hop-by-hop, connection dependent ACK.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_ACK 1010
+
+/**
+ * Poll for a hop-by-hop ACK.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_POLL 1011
+
+/**
+ * Announce connection is still alive (direction sensitive).
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE 1012
+
+
+/**
+ * Ask the cadet service to create a new channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE 1013
+
+/**
+ * Ask the cadet service to destroy a channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY 1014
+
+/**
+ * Confirm the creation of a channel
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK 1015
+
+/**
+ * Reject the creation of a channel
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK 1016
+
+/**
+ * Axolotl key exchange.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_AX_KX 1017
+
/**
- * Next available: 970
+ * Axolotl encrypted data.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_AX 1018
+
+/**
+ * Payload client <-> service
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 1019
+
+/**
+ * Local ACK for data.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 1020
+
+/**
+ * Start listening on a port.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN 1021
+
+/**
+ * Stop listening on a port.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE 1022
+
+/**
+ * Local information about all channels of service.
*/
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS 1023
+
+/**
+ * Local information of service about a specific channel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1024
+
+/**
+ * Local information about all tunnels of service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1025
+
+/**
+ * Local information of service about a specific tunnel.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 1026
+
+/**
+ * Local information about all connections of service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 1027
+
+/**
+ * Local information of service about a specific connection.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 1028
+
+/**
+ * Local information about all peers known to the service.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1029
+
+/**
+ * Local information of service about a specific peer.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER 1030
+
+/**
+ * Traffic (net-cat style) used by the Command Line Interface.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_CLI 1031
+
+/**
+ * Debug request.
+ */
+#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP 1032
+
+
+/**
+ * Next available: 1060
+ */
+
+
/**
* Type used to match 'all' message types.