aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-07-08 16:47:03 +0000
committerNathan S. Evans <evans@in.tum.de>2011-07-08 16:47:03 +0000
commit51204303f98feef6d3f100ac0a344294a091fbe5 (patch)
treea04e1260d8ce79a0e74120c3cf1716b8dc37d22e /src/include
parent893a40187d3343a46294d657a915bdb663c49536 (diff)
downloadgnunet-51204303f98feef6d3f100ac0a344294a091fbe5.tar.gz
gnunet-51204303f98feef6d3f100ac0a344294a091fbe5.zip
connected peer lookup
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_dht_service.h2
-rw-r--r--src/include/gnunet_protocols.h32
-rw-r--r--src/include/gnunet_transport_service.h16
3 files changed, 48 insertions, 2 deletions
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index e57dd718c..027986a85 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -41,7 +41,7 @@ extern "C"
41 41
42 42
43/** 43/**
44 * FIXME: document. 44 * Default republication frequency for stored data in the DHT.
45 */ 45 */
46#define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 60) 46#define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 60)
47 47
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 957bcd0eb..960ec60ab 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -102,7 +102,6 @@ extern "C"
102 */ 102 */
103#define GNUNET_MESSAGE_TYPE_FRAGMENT 18 103#define GNUNET_MESSAGE_TYPE_FRAGMENT 18
104 104
105
106/** 105/**
107 * Message from the core saying that the transport 106 * Message from the core saying that the transport
108 * server should start giving it messages. This 107 * server should start giving it messages. This
@@ -299,6 +298,11 @@ extern "C"
299#define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58 298#define GNUNET_MESSAGE_TYPE_TRANSPORT_UDP_NAT_PROBE_KEEPALIVE 58
300 299
301/** 300/**
301 * Request to look up addresses of peers.
302 */
303#define GNUNET_MESSAGE_TYPE_TRANSPORT_PEER_ADDRESS_LOOKUP 59
304
305/**
302 * Welcome message between TCP transports. 306 * Welcome message between TCP transports.
303 */ 307 */
304#define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60 308#define GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME 60
@@ -912,6 +916,10 @@ extern "C"
912 916
913 917
914 918
919/*******************************************************************************
920 * CHAT message types START
921 ******************************************************************************/
922
915/** 923/**
916 * Message sent from client to join a chat room. 924 * Message sent from client to join a chat room.
917 */ 925 */
@@ -977,6 +985,28 @@ extern "C"
977 */ 985 */
978#define GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT 311 986#define GNUNET_MESSAGE_TYPE_CHAT_P2P_CONFIRMATION_RECEIPT 311
979 987
988/*******************************************************************************
989 * CHAT message types END
990 ******************************************************************************/
991
992/*******************************************************************************
993 * NSE (network size estimation) message types START
994 ******************************************************************************/
995
996/**
997 * client->service message indicating start
998 */
999#define GNUNET_MESSAGE_TYPE_NSE_START 321
1000
1001/**
1002 * P2P message sent from nearest peer
1003 */
1004#define GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD 322
1005
1006/**
1007 * service->client message indicating
1008 */
1009#define GNUNET_MESSAGE_TYPE_NSE_ESTIMATE 323
980 1010
981/** 1011/**
982 * Type used to match 'all' message types. 1012 * Type used to match 'all' message types.
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index 9a7093a10..607389ae7 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -645,6 +645,22 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
645 GNUNET_TRANSPORT_AddressLookUpCallback aluc, 645 GNUNET_TRANSPORT_AddressLookUpCallback aluc,
646 void *aluc_cls); 646 void *aluc_cls);
647 647
648/**
649 * Return all the known addresses for a peer.
650 *
651 * @param cfg configuration to use
652 * @param peer peer identity to look up the addresses of
653 * @param timeout how long is the lookup allowed to take at most
654 * @param peer_address_callback function to call with the results
655 * @param peer_address_callback_cls closure for peer_address_callback
656 */
657void
658GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
659 const struct GNUNET_PeerIdentity *peer,
660 struct GNUNET_TIME_Relative timeout,
661 GNUNET_TRANSPORT_AddressLookUpCallback peer_address_callback,
662 void *peer_address_callback_cls);
663
648 664
649 665
650/** 666/**