enum GNUNET_ATS_Network_Type
{
- GNUNET_ATS_NET_UNSPECIFIED,
- GNUNET_ATS_NET_LOOPBACK,
- GNUNET_ATS_NET_LAN,
- GNUNET_ATS_NET_WAN
+ GNUNET_ATS_NET_UNSPECIFIED = 0,
+ GNUNET_ATS_NET_LOOPBACK = 1,
+ GNUNET_ATS_NET_LAN = 2,
+ GNUNET_ATS_NET_WAN = 3,
+ GNUNET_ATS_NET_WLAN = 4,
};
/**
// GNUNET_ATS_AVAILABILITY_CONNECTED = 2049
};
+/**
+ * Number of ATS quality properties
+ */
+#define GNUNET_ATS_QualityPropertiesCount 2
+
+/**
+ * ATS quality properties as array initializer
+ */
+#define GNUNET_ATS_QualityProperties {GNUNET_ATS_QUALITY_NET_DELAY, GNUNET_ATS_QUALITY_NET_DISTANCE}
+
+/**
+ * Number of ATS quality properties
+ */
+#define GNUNET_ATS_NetworkTypeCount 5
+
+/**
+ * ATS quality properties as array initializer
+ */
+#define GNUNET_ATS_NetworkType {GNUNET_ATS_NET_UNSPECIFIED, GNUNET_ATS_NET_LOOPBACK, GNUNET_ATS_NET_LAN, GNUNET_ATS_NET_WAN, GNUNET_ATS_NET_WLAN}
+
+GNUNET_NETWORK_STRUCT_BEGIN
/**
* struct used to communicate the transport's properties like cost and
*/
uint32_t value GNUNET_PACKED;
};
-
+GNUNET_NETWORK_STRUCT_END
/* ******************************** Scheduling API ***************************** */
/**
* Returns where the address is located: LAN or WAN or ...
+ * @param sh the GNUNET_ATS_SchedulingHandle handle
* @param addr address
* @param addrlen address length
* @return location as GNUNET_ATS_Information
*/
-struct GNUNET_ATS_Information
+const struct GNUNET_ATS_Information
GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle *sh,
const struct sockaddr * addr,
socklen_t addrlen);