[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22006 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22006 - gnunet/src/mesh |
Date: |
Thu, 14 Jun 2012 18:50:52 +0200 |
Author: bartpolot
Date: 2012-06-14 18:50:52 +0200 (Thu, 14 Jun 2012)
New Revision: 22006
Modified:
gnunet/src/mesh/mesh_api.c
Log:
- add api side implementation of blacklisting
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2012-06-14 16:45:14 UTC (rev 22005)
+++ gnunet/src/mesh/mesh_api.c 2012-06-14 16:50:52 UTC (rev 22006)
@@ -1382,6 +1382,20 @@
/**
+ * Announce to ther peer the availability of services described by the regex,
+ * in order to be reachable to other peers via connect_by_string.
+ *
+ * @param h handle to mesh.
+ * @param regex string with the regular expression describing local services.
+ */
+void
+GNUNET_MESH_announce_regex (struct GNUNET_MESH_Handle *h,
+ const char *regex)
+{
+
+}
+
+/**
* Create a new tunnel (we're initiator and will be allowed to add/remove peers
* and to broadcast).
*
@@ -1575,7 +1589,10 @@
*/
void
GNUNET_MESH_peer_request_connect_by_string (struct GNUNET_MESH_Tunnel *tunnel,
- const char *description);
+ const char *description)
+{
+
+}
/**
@@ -1588,9 +1605,20 @@
*/
void
GNUNET_MESH_peer_blacklist (struct GNUNET_MESH_Tunnel *tunnel,
- const struct GNUNET_PeerIdentity *peer);
+ const struct GNUNET_PeerIdentity *peer)
+{
+ struct GNUNET_MESH_PeerControl msg;
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_PeerControl));
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_BLACKLIST);
+ msg.tunnel_id = htonl (tunnel->tid);
+ msg.peer = *peer;
+ send_packet (tunnel->mesh, &msg.header, tunnel);
+ return;
+}
+
+
/**
* Request that the given peer isn't blacklisted anymore from this tunnel,
* and therefore can be added in future calls to connect_by_*.
@@ -1602,9 +1630,20 @@
*/
void
GNUNET_MESH_peer_unblacklist (struct GNUNET_MESH_Tunnel *tunnel,
- const struct GNUNET_PeerIdentity *peer);
+ const struct GNUNET_PeerIdentity *peer)
+{
+ struct GNUNET_MESH_PeerControl msg;
+ msg.header.size = htons (sizeof (struct GNUNET_MESH_PeerControl));
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_UNBLACKLIST);
+ msg.tunnel_id = htonl (tunnel->tid);
+ msg.peer = *peer;
+ send_packet (tunnel->mesh, &msg.header, tunnel);
+ return;
+}
+
+
/**
* Ask the mesh to call "notify" once it is ready to transmit the
* given number of bytes to the specified "target". If we are not yet
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22006 - gnunet/src/mesh,
gnunet <=