+/**
+ * Function that will be called to update metrics for an address
+ *
+ * @param cls closure
+ * @param address address to update metrics for
+ * @param session the session
+ * @param distance new distance
+ */
+static void
+plugin_env_update_distance (void *cls,
+ const struct GNUNET_HELLO_Address *address,
+ uint32_t distance)
+{
+ GST_ats_update_distance (address,
+ distance);
+}
+
+
+/**
+ * Function that will be called to figure if an address is an loopback,
+ * LAN, WAN etc. address
+ *
+ * @param cls closure
+ * @param addr binary address
+ * @param addrlen length of the @a addr
+ * @return type of the network @a addr belongs to
+ */
+static enum GNUNET_NetworkType
+plugin_env_address_to_type (void *cls,
+ const struct sockaddr *addr,
+ size_t addrlen)
+{
+ if (NULL == GST_is)
+ {
+ GNUNET_break(0);
+ return GNUNET_NT_UNSPECIFIED;
+ }
+ return GNUNET_NT_scanner_get_type (GST_is,
+ addr,
+ addrlen);
+}
+
+