aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_hello_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_transport_hello_service.h')
-rw-r--r--src/include/gnunet_transport_hello_service.h59
1 files changed, 57 insertions, 2 deletions
diff --git a/src/include/gnunet_transport_hello_service.h b/src/include/gnunet_transport_hello_service.h
index 8573613ac..86ff67415 100644
--- a/src/include/gnunet_transport_hello_service.h
+++ b/src/include/gnunet_transport_hello_service.h
@@ -52,6 +52,61 @@ extern "C"
52 52
53 53
54/** 54/**
55 * Some addresses contain sensitive information or are
56 * not suitable for global distribution. We use address
57 * classes to filter addresses by which domain they make
58 * sense to be used in. These are used in a bitmask.
59 */
60enum GNUNET_TRANSPORT_AddressClass
61{
62
63 /**
64 * No address.
65 */
66 GNUNET_TRANSPORT_AC_NONE = 0,
67
68 /**
69 * Addresses that fall into no other category
70 * (i.e. incoming which we cannot use elsewhere).
71 */
72 GNUNET_TRANSPORT_AC_OTHER = 1,
73
74 /**
75 * Addresses that are global and are insensitive
76 * (i.e. IPv4).
77 */
78 GNUNET_TRANSPORT_AC_GLOBAL = 2,
79
80 /**
81 * Addresses that are global and are sensitive
82 * (i.e. IPv6 with our MAC).
83 */
84 GNUNET_TRANSPORT_AC_GLOBAL_PRIVATE = 4,
85
86 /**
87 * Addresses useful in the local wired network,
88 * i.e. a MAC. Sensitive, but obvious to people nearby.
89 * Useful for broadcasts.
90 */
91 GNUNET_TRANSPORT_AC_LAN = 8,
92
93 /**
94 * Addresses useful in the local wireless network,
95 * i.e. a MAC. Sensitive, but obvious to people nearby.
96 * Useful for broadcasts.
97 */
98 GNUNET_TRANSPORT_AC_WLAN = 16,
99
100 /**
101 * Addresses useful in the local bluetooth network. Sensitive, but
102 * obvious to people nearby. Useful for broadcasts.
103 */
104 GNUNET_TRANSPORT_AC_BT = 32
105
106};
107
108
109/**
55 * Function called whenever there is an update to the 110 * Function called whenever there is an update to the
56 * HELLO of this peer. 111 * HELLO of this peer.
57 * 112 *
@@ -74,14 +129,14 @@ struct GNUNET_TRANSPORT_HelloGetHandle;
74 * given in this function is never called synchronously. 129 * given in this function is never called synchronously.
75 * 130 *
76 * @param cfg configuration to use 131 * @param cfg configuration to use
77 * @param nt which network type should the addresses from the HELLO belong to? 132 * @param ac which network type should the addresses from the HELLO belong to?
78 * @param rec function to call with the HELLO 133 * @param rec function to call with the HELLO
79 * @param rec_cls closure for @a rec 134 * @param rec_cls closure for @a rec
80 * @return handle to cancel the operation 135 * @return handle to cancel the operation
81 */ 136 */
82struct GNUNET_TRANSPORT_HelloGetHandle * 137struct GNUNET_TRANSPORT_HelloGetHandle *
83GNUNET_TRANSPORT_hello_get (const struct GNUNET_CONFIGURATION_Handle *cfg, 138GNUNET_TRANSPORT_hello_get (const struct GNUNET_CONFIGURATION_Handle *cfg,
84 enum GNUNET_ATS_Network_Type nt, 139 enum GNUNET_TRANSPORT_AddressClass ac,
85 GNUNET_TRANSPORT_HelloUpdateCallback rec, 140 GNUNET_TRANSPORT_HelloUpdateCallback rec,
86 void *rec_cls); 141 void *rec_cls);
87 142