aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 6f1aa7431..3024d8bc1 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -1561,6 +1561,26 @@ GST_neighbour_get_latency (const struct GNUNET_PeerIdentity *peer)
1561 return n->latency; 1561 return n->latency;
1562} 1562}
1563 1563
1564/**
1565 * Obtain current address information for the given neighbour.
1566 *
1567 * @param peer
1568 * @return address currently used
1569 */
1570struct GNUNET_HELLO_Address *
1571GST_neighbour_get_current_address (const struct GNUNET_PeerIdentity *peer)
1572{
1573 struct NeighbourMapEntry *n;
1574
1575 n = lookup_neighbour (peer);
1576 if ( (NULL == n) ||
1577 ( (n->address == NULL) && (n->session == NULL) ) )
1578 return NULL;
1579
1580 return n->address;
1581}
1582
1583
1564 1584
1565/** 1585/**
1566 * Create an entry in the neighbour map for the given peer 1586 * Create an entry in the neighbour map for the given peer