/**
* Ask the mesh service to add a peer described by a service string
*/
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD_BY_STRING 278
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ANNOUNCE_REGEX 278
+
+/**
+ * Ask the mesh service to add a peer described by a service string
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_ADD_BY_STRING 279
/**
* Ask the mesh service to add a peer to the blacklist of an existing tunnel
*/
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_BLACKLIST 279
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_BLACKLIST 280
/**
* Ask the mesh service to remove a peer from the blacklist of a tunnel
*/
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_UNBLACKLIST 280
+#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_UNBLACKLIST 281
/**
* 640kb should be enough for everybody
const char *regex)
{
struct GNUNET_MessageHeader *msg;
-
- msg = GNUNET_malloc
+ size_t len;
+ size_t msgsize;
+
+ len = strlen (regex);
+ msgsize = sizeof(struct GNUNET_MessageHeader) + len;
+ GNUNET_assert (UINT16_MAX > msgsize);
+
+ msg = GNUNET_malloc (msgsize);
+ msg->size = htons (msgsize);
+ msg->type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_ANNOUNCE_REGEX);
+ memcpy (&msg[1], regex, len);
+
+ send_packet(h, msg, NULL);
}
/**