diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-03-04 21:42:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-03-04 21:42:35 +0000 |
commit | 1a4116176c28e1edc534a568fc1e9085e3b6b3ce (patch) | |
tree | af09722a944cf05b12d292d9bb6f15e837e74d66 | |
parent | dd5c9a16d543a336adec30723215a3125e842bac (diff) | |
download | gnunet-1a4116176c28e1edc534a568fc1e9085e3b6b3ce.tar.gz gnunet-1a4116176c28e1edc534a568fc1e9085e3b6b3ce.zip |
-doxygen
-rw-r--r-- | po/POTFILES.in | 5 | ||||
-rw-r--r-- | src/include/gnunet_hello_lib.h | 59 |
2 files changed, 39 insertions, 25 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in index 5e917d135..0e683b682 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -5,6 +5,7 @@ src/arm/gnunet-service-arm.c | |||
5 | src/arm/mockup-service.c | 5 | src/arm/mockup-service.c |
6 | src/ats/ats_api_performance.c | 6 | src/ats/ats_api_performance.c |
7 | src/ats/ats_api_scheduling.c | 7 | src/ats/ats_api_scheduling.c |
8 | src/ats/gnunet-ats-solver-eval.c | ||
8 | src/ats/gnunet-service-ats_addresses.c | 9 | src/ats/gnunet-service-ats_addresses.c |
9 | src/ats/gnunet-service-ats.c | 10 | src/ats/gnunet-service-ats.c |
10 | src/ats/gnunet-service-ats_normalization.c | 11 | src/ats/gnunet-service-ats_normalization.c |
@@ -17,8 +18,10 @@ src/ats/plugin_ats_ril.c | |||
17 | src/ats-tests/ats-testing.c | 18 | src/ats-tests/ats-testing.c |
18 | src/ats-tests/ats-testing-experiment.c | 19 | src/ats-tests/ats-testing-experiment.c |
19 | src/ats-tests/ats-testing-log.c | 20 | src/ats-tests/ats-testing-log.c |
21 | src/ats-tests/ats-testing-preferences.c | ||
20 | src/ats-tests/ats-testing-traffic.c | 22 | src/ats-tests/ats-testing-traffic.c |
21 | src/ats-tests/gnunet-ats-sim.c | 23 | src/ats-tests/gnunet-ats-sim.c |
24 | src/ats-tests/gnunet-solver-eval.c | ||
22 | src/ats-tool/gnunet-ats.c | 25 | src/ats-tool/gnunet-ats.c |
23 | src/block/block.c | 26 | src/block/block.c |
24 | src/block/plugin_block_template.c | 27 | src/block/plugin_block_template.c |
@@ -182,6 +185,7 @@ src/mesh/gnunet-service-mesh.c | |||
182 | src/mesh/gnunet-service-mesh_channel.c | 185 | src/mesh/gnunet-service-mesh_channel.c |
183 | src/mesh/gnunet-service-mesh_connection.c | 186 | src/mesh/gnunet-service-mesh_connection.c |
184 | src/mesh/gnunet-service-mesh_dht.c | 187 | src/mesh/gnunet-service-mesh_dht.c |
188 | src/mesh/gnunet-service-mesh_hello.c | ||
185 | src/mesh/gnunet-service-mesh_local.c | 189 | src/mesh/gnunet-service-mesh_local.c |
186 | src/mesh/gnunet-service-mesh_peer.c | 190 | src/mesh/gnunet-service-mesh_peer.c |
187 | src/mesh/gnunet-service-mesh_tunnel.c | 191 | src/mesh/gnunet-service-mesh_tunnel.c |
@@ -190,7 +194,6 @@ src/mesh/mesh_common.c | |||
190 | src/mesh/mesh_path.c | 194 | src/mesh/mesh_path.c |
191 | src/mesh/mesh_test_lib.c | 195 | src/mesh/mesh_test_lib.c |
192 | src/mesh/mesh_tunnel_tree.c | 196 | src/mesh/mesh_tunnel_tree.c |
193 | src/mesh/plugin_block_mesh.c | ||
194 | src/multicast/gnunet-multicast.c | 197 | src/multicast/gnunet-multicast.c |
195 | src/multicast/gnunet-service-multicast.c | 198 | src/multicast/gnunet-service-multicast.c |
196 | src/multicast/multicast_api.c | 199 | src/multicast/multicast_api.c |
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 694dfe066..8e96b5879 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h | |||
@@ -85,18 +85,6 @@ struct GNUNET_HELLO_Address | |||
85 | struct GNUNET_PeerIdentity peer; | 85 | struct GNUNET_PeerIdentity peer; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * Extended information about address | ||
89 | * | ||
90 | * This field contains additional #GNUNET_HELLO_AddressInfo flags e.g. | ||
91 | * to indicate an address is inbound and cannot be used to initiate an | ||
92 | * outbound connection. | ||
93 | * | ||
94 | * These information are only valid for the local peer and are not serialized | ||
95 | * when a #GNUNET_HELLO_Message is created | ||
96 | */ | ||
97 | enum GNUNET_HELLO_AddressInfo local_info; | ||
98 | |||
99 | /** | ||
100 | * Name of the transport plugin enabling the communication using | 88 | * Name of the transport plugin enabling the communication using |
101 | * this address. | 89 | * this address. |
102 | */ | 90 | */ |
@@ -108,28 +96,43 @@ struct GNUNET_HELLO_Address | |||
108 | const void *address; | 96 | const void *address; |
109 | 97 | ||
110 | /** | 98 | /** |
111 | * Number of bytes in 'address'. | 99 | * Number of bytes in @e address. |
112 | */ | 100 | */ |
113 | size_t address_length; | 101 | size_t address_length; |
114 | 102 | ||
103 | /** | ||
104 | * Extended information about address | ||
105 | * | ||
106 | * This field contains additional #GNUNET_HELLO_AddressInfo flags e.g. | ||
107 | * to indicate an address is inbound and cannot be used to initiate an | ||
108 | * outbound connection. | ||
109 | * | ||
110 | * These information are only valid for the local peer and are not serialized | ||
111 | * when a #GNUNET_HELLO_Message is created | ||
112 | */ | ||
113 | enum GNUNET_HELLO_AddressInfo local_info; | ||
114 | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | |||
117 | /** | 118 | /** |
118 | * Allocate an address struct. | 119 | * Allocate an address struct. |
119 | * | 120 | * |
120 | * @param peer the peer | 121 | * @param peer the peer |
121 | * @param transport_name plugin name | 122 | * @param transport_name plugin name |
122 | * @param address binary address | 123 | * @param address binary address |
123 | * @param address_length number of bytes in 'address' | 124 | * @param address_length number of bytes in @a address |
124 | * @param local_info additional local information for the address | 125 | * @param local_info additional local information for the address |
125 | * @return the address struct | 126 | * @return the address struct |
126 | */ | 127 | */ |
127 | struct GNUNET_HELLO_Address * | 128 | struct GNUNET_HELLO_Address * |
128 | GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, | 129 | GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer, |
129 | const char *transport_name, const void *address, | 130 | const char *transport_name, |
131 | const void *address, | ||
130 | size_t address_length, | 132 | size_t address_length, |
131 | enum GNUNET_HELLO_AddressInfo local_info); | 133 | enum GNUNET_HELLO_AddressInfo local_info); |
132 | 134 | ||
135 | |||
133 | /** | 136 | /** |
134 | * Copy an address struct. | 137 | * Copy an address struct. |
135 | * | 138 | * |
@@ -146,12 +149,13 @@ GNUNET_HELLO_address_copy (const struct GNUNET_HELLO_Address *address); | |||
146 | * | 149 | * |
147 | * @param a1 first address | 150 | * @param a1 first address |
148 | * @param a2 second address | 151 | * @param a2 second address |
149 | * @return 0 if the addresses are equal, -1 if a1<a2, 1 if a1>a2. | 152 | * @return 0 if the addresses are equal, -1 if @a a1< @a a2, 1 if @a a1> @a a2. |
150 | */ | 153 | */ |
151 | int | 154 | int |
152 | GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, | 155 | GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, |
153 | const struct GNUNET_HELLO_Address *a2); | 156 | const struct GNUNET_HELLO_Address *a2); |
154 | 157 | ||
158 | |||
155 | /** | 159 | /** |
156 | * Get the size of an address struct. | 160 | * Get the size of an address struct. |
157 | * | 161 | * |
@@ -161,16 +165,17 @@ GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1, | |||
161 | size_t | 165 | size_t |
162 | GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address); | 166 | GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address); |
163 | 167 | ||
168 | |||
164 | /** | 169 | /** |
165 | * Check if an address has a local option set | 170 | * Check if an address has a local option set |
166 | * | 171 | * |
167 | * @param address the address to check | 172 | * @param address the address to check |
168 | * @param option the respective option to check for | 173 | * @param option the respective option to check for |
169 | * @return GNUNET_YES or GNUNET_NO | 174 | * @return #GNUNET_YES or #GNUNET_NO |
170 | */ | 175 | */ |
171 | int | 176 | int |
172 | GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address * address, | 177 | GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address *address, |
173 | enum GNUNET_HELLO_AddressInfo option); | 178 | enum GNUNET_HELLO_AddressInfo option); |
174 | 179 | ||
175 | 180 | ||
176 | /** | 181 | /** |
@@ -184,7 +189,7 @@ GNUNET_HELLO_address_check_option (const struct GNUNET_HELLO_Address * address, | |||
184 | /** | 189 | /** |
185 | * A HELLO message is used to exchange information about | 190 | * A HELLO message is used to exchange information about |
186 | * transports with other peers. This struct is guaranteed | 191 | * transports with other peers. This struct is guaranteed |
187 | * to start with a "GNUNET_MessageHeader", everything else | 192 | * to start with a `struct GNUNET_MessageHeader`, everything else |
188 | * should be internal to the HELLO library. | 193 | * should be internal to the HELLO library. |
189 | */ | 194 | */ |
190 | struct GNUNET_HELLO_Message; | 195 | struct GNUNET_HELLO_Message; |
@@ -213,7 +218,8 @@ GNUNET_HELLO_is_friend_only (const struct GNUNET_HELLO_Message *h); | |||
213 | */ | 218 | */ |
214 | size_t | 219 | size_t |
215 | GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address, | 220 | GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address, |
216 | struct GNUNET_TIME_Absolute expiration, char *target, | 221 | struct GNUNET_TIME_Absolute expiration, |
222 | char *target, | ||
217 | size_t max); | 223 | size_t max); |
218 | 224 | ||
219 | 225 | ||
@@ -239,9 +245,13 @@ typedef size_t | |||
239 | * expiration time and an iterator that spews the | 245 | * expiration time and an iterator that spews the |
240 | * transport addresses. | 246 | * transport addresses. |
241 | * | 247 | * |
242 | * If friend only is set to #GNUNET_YES we create a FRIEND_HELLO which will | 248 | * If friend only is set to #GNUNET_YES we create a FRIEND_HELLO which |
243 | * not be gossiped to other peers | 249 | * will not be gossiped to other peers. |
244 | * | 250 | * |
251 | * @param publicKey public key to include in the HELLO | ||
252 | * @param addrgen callback to invoke to get addresses | ||
253 | * @param addrgen_cls closure for @a addrgen | ||
254 | * @param friend_only should the returned HELLO be only visible to friends? | ||
245 | * @return the hello message | 255 | * @return the hello message |
246 | */ | 256 | */ |
247 | struct GNUNET_HELLO_Message * | 257 | struct GNUNET_HELLO_Message * |
@@ -349,7 +359,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg, | |||
349 | * @param expiration_limit ignore addresses in old_hello | 359 | * @param expiration_limit ignore addresses in old_hello |
350 | * that expired before the given time stamp | 360 | * that expired before the given time stamp |
351 | * @param it iterator to call on each address | 361 | * @param it iterator to call on each address |
352 | * @param it_cls closure for it | 362 | * @param it_cls closure for @a it |
353 | */ | 363 | */ |
354 | void | 364 | void |
355 | GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message *new_hello, | 365 | GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message *new_hello, |
@@ -410,6 +420,7 @@ char * | |||
410 | GNUNET_HELLO_compose_uri (const struct GNUNET_HELLO_Message *hello, | 420 | GNUNET_HELLO_compose_uri (const struct GNUNET_HELLO_Message *hello, |
411 | GNUNET_HELLO_TransportPluginsFind plugins_find); | 421 | GNUNET_HELLO_TransportPluginsFind plugins_find); |
412 | 422 | ||
423 | |||
413 | /** | 424 | /** |
414 | * Parse a hello URI string to a hello message. | 425 | * Parse a hello URI string to a hello message. |
415 | * | 426 | * |