summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_ats_plugin.h4
-rw-r--r--src/include/gnunet_ats_service.h93
-rw-r--r--src/include/gnunet_dv_service.h4
-rw-r--r--src/include/gnunet_hello_lib.h10
-rw-r--r--src/include/gnunet_transport_communication_service.h4
-rw-r--r--src/include/gnunet_transport_hello_service.h2
-rw-r--r--src/include/gnunet_transport_monitor_service.h2
-rw-r--r--src/include/gnunet_transport_plugin.h8
8 files changed, 16 insertions, 111 deletions
diff --git a/src/include/gnunet_ats_plugin.h b/src/include/gnunet_ats_plugin.h
index d414d5f4c..16711c852 100644
--- a/src/include/gnunet_ats_plugin.h
+++ b/src/include/gnunet_ats_plugin.h
@@ -467,13 +467,13 @@ struct GNUNET_ATS_PluginEnvironment
* Array of configured outbound quotas
* Order according to networks in network array
*/
- unsigned long long out_quota[GNUNET_ATS_NetworkTypeCount];
+ unsigned long long out_quota[GNUNET_NT_COUNT];
/**
* Array of configured inbound quotas
* Order according to networks in network array
*/
- unsigned long long in_quota[GNUNET_ATS_NetworkTypeCount];
+ unsigned long long in_quota[GNUNET_NT_COUNT];
};
#endif
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index a9fd519d4..b25cf3ec0 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -36,48 +36,6 @@
#include "gnunet_util_lib.h"
#include "gnunet_hello_lib.h"
-/**
- * Types of networks (with separate quotas) we support.
- */
-enum GNUNET_ATS_Network_Type
-{
- /**
- * Category of last resort.
- */
- GNUNET_ATS_NET_UNSPECIFIED = 0,
-
- /**
- * Loopback (same host).
- */
- GNUNET_ATS_NET_LOOPBACK = 1,
-
- /**
- * Local area network.
- */
- GNUNET_ATS_NET_LAN = 2,
-
- /**
- * Wide area network (i.e. Internet)
- */
- GNUNET_ATS_NET_WAN = 3,
-
- /**
- * Wireless LAN (i.e. 802.11abgn)
- */
- GNUNET_ATS_NET_WLAN = 4,
-
- /**
- * Bluetooth LAN
- */
- GNUNET_ATS_NET_BT = 5,
-
-/**
- * Number of network types supported by ATS
- */
-#define GNUNET_ATS_NetworkTypeCount 6
-
-};
-
/**
* Default bandwidth assigned to a network : 64 KB/s
@@ -143,7 +101,7 @@ struct GNUNET_ATS_Properties
* Which network scope does the respective address belong to?
* This property does not change.
*/
- enum GNUNET_ATS_Network_Type scope;
+ enum GNUNET_NetworkType scope;
};
@@ -220,55 +178,6 @@ GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo,
-/**
- * Convert a `enum GNUNET_ATS_Network_Type` to a string
- *
- * @param net the network type
- * @return a string or NULL if invalid
- */
-const char *
-GNUNET_ATS_print_network_type (enum GNUNET_ATS_Network_Type net);
-
-
-/**
- * Handle for the LAN Characterization library.
- */
-struct GNUNET_ATS_InterfaceScanner;
-
-
-/**
- * Returns where the address is located: loopback, LAN or WAN.
- *
- * @param is handle from #GNUNET_ATS_interface_scanner_init()
- * @param addr address
- * @param addrlen address length
- * @return type of the network the address belongs to
- */
-enum GNUNET_ATS_Network_Type
-GNUNET_ATS_scanner_address_get_type (struct GNUNET_ATS_InterfaceScanner *is,
- const struct sockaddr *addr,
- socklen_t addrlen);
-
-
-/**
- * Initialize the ATS address characterization client handle.
- *
- * @return scanner handle, NULL on error
- */
-struct GNUNET_ATS_InterfaceScanner *
-GNUNET_ATS_scanner_init (void);
-
-
-/**
- * Terminate interface scanner.
- *
- * @param is scanner we are done with
- */
-void
-GNUNET_ATS_scanner_done (struct GNUNET_ATS_InterfaceScanner *is);
-
-
-
/* ********************Connection Suggestion API ***************************** */
/**
diff --git a/src/include/gnunet_dv_service.h b/src/include/gnunet_dv_service.h
index aa8d6af61..b97a2629f 100644
--- a/src/include/gnunet_dv_service.h
+++ b/src/include/gnunet_dv_service.h
@@ -47,7 +47,7 @@ typedef void
(*GNUNET_DV_ConnectCallback)(void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance,
- enum GNUNET_ATS_Network_Type network);
+ enum GNUNET_NetworkType network);
/**
@@ -63,7 +63,7 @@ typedef void
(*GNUNET_DV_DistanceChangedCallback)(void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance,
- enum GNUNET_ATS_Network_Type network);
+ enum GNUNET_NetworkType network);
/**
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index ceaa60466..8a405a25e 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -474,11 +474,7 @@ GNUNET_HELLO_parse_uri (const char *uri,
/* NG API */
-/**
- * Defined in gnunet_ats_service.h, but here we do not care about
- * the details so are just giving the declaration.
- */
-enum GNUNET_ATS_Network_Type;
+#include "gnunet_nt_lib.h"
/**
@@ -493,7 +489,7 @@ enum GNUNET_ATS_Network_Type;
*/
void
GNUNET_HELLO_sign_address (const char *address,
- enum GNUNET_ATS_Network_Type nt,
+ enum GNUNET_NetworkType nt,
struct GNUNET_TIME_Absolute expiration,
const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key,
void **result,
@@ -514,7 +510,7 @@ char *
GNUNET_HELLO_extract_address (const void *raw,
size_t raw_size,
const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
- enum GNUNET_ATS_Network_Type *nt,
+ enum GNUNET_NetworkType *nt,
struct GNUNET_TIME_Absolute *expiration);
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index e80ba85cf..1d0add99f 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -226,7 +226,7 @@ GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle
const struct GNUNET_PeerIdentity *peer,
const char *address,
uint32_t mtu,
- enum GNUNET_ATS_Network_Type nt,
+ enum GNUNET_NetworkType nt,
uint32_t distance,
enum GNUNET_TRANSPORT_ConnectionStatus cs,
struct GNUNET_MQ_Handle *mq);
@@ -261,7 +261,7 @@ struct GNUNET_TRANSPORT_AddressIdentifier;
struct GNUNET_TRANSPORT_AddressIdentifier *
GNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
const char *address,
- enum GNUNET_ATS_Network_Type nt,
+ enum GNUNET_NetworkType nt,
struct GNUNET_TIME_Relative expiration);
diff --git a/src/include/gnunet_transport_hello_service.h b/src/include/gnunet_transport_hello_service.h
index a21358a9c..50734f957 100644
--- a/src/include/gnunet_transport_hello_service.h
+++ b/src/include/gnunet_transport_hello_service.h
@@ -166,7 +166,7 @@ typedef void
(*GNUNET_TRANSPORT_AddressCallback) (void *cls,
const struct GNUNET_PeerIdentity *peer,
const char *address,
- enum GNUNET_ATS_Network_Type nt,
+ enum GNUNET_NetworkType nt,
struct GNUNET_TIME_Absolute expiration);
diff --git a/src/include/gnunet_transport_monitor_service.h b/src/include/gnunet_transport_monitor_service.h
index 799434016..ef599f902 100644
--- a/src/include/gnunet_transport_monitor_service.h
+++ b/src/include/gnunet_transport_monitor_service.h
@@ -65,7 +65,7 @@ struct GNUNET_TRANSPORT_MonitorInformation
/**
* Network type of the address.
*/
- enum GNUNET_ATS_Network_Type nt;
+ enum GNUNET_NetworkType nt;
/**
* Connection status.
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index 1f7b46baa..d1f8db445 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -89,7 +89,7 @@ typedef void
(*GNUNET_TRANSPORT_SessionStart) (void *cls,
const struct GNUNET_HELLO_Address *address,
struct GNUNET_ATS_Session *session,
- enum GNUNET_ATS_Network_Type net);
+ enum GNUNET_NetworkType net);
/**
@@ -131,7 +131,7 @@ typedef struct GNUNET_TIME_Relative
* @param addrlen length of the @a addr
* @return type of the network the address belongs to
*/
-typedef enum GNUNET_ATS_Network_Type
+typedef enum GNUNET_NetworkType
(*GNUNET_TRANSPORT_AddressToType) (void *cls,
const struct sockaddr *addr,
size_t addrlen);
@@ -547,7 +547,7 @@ typedef int
* @param session the session
* @return the network type
*/
-typedef enum GNUNET_ATS_Network_Type
+typedef enum GNUNET_NetworkType
(*GNUNET_TRANSPORT_GetNetworkType) (void *cls,
struct GNUNET_ATS_Session *session);
@@ -559,7 +559,7 @@ typedef enum GNUNET_ATS_Network_Type
* @param address the address
* @return the network type
*/
-typedef enum GNUNET_ATS_Network_Type
+typedef enum GNUNET_NetworkType
(*GNUNET_TRANSPORT_GetNetworkTypeForAddress) (void *cls,
const struct GNUNET_HELLO_Address *address);