diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-08 10:23:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-08 10:23:45 +0000 |
commit | 95d933d6e52f1c8d8dda1f6e1d8e8f8dc03d3c17 (patch) | |
tree | 928642b2b203443dce8d34e1901ddeb54b64ad19 /src/include | |
parent | 87d5236ee8d5a3cb04082aa0bbdb94e5df2ce5df (diff) | |
download | gnunet-95d933d6e52f1c8d8dda1f6e1d8e8f8dc03d3c17.tar.gz gnunet-95d933d6e52f1c8d8dda1f6e1d8e8f8dc03d3c17.zip |
towards UPnP support
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_nat_lib.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index 357758677..57eaac606 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h | |||
@@ -201,6 +201,44 @@ int | |||
201 | GNUNET_NAT_mini_get_external_ipv4 (struct in_addr *addr); | 201 | GNUNET_NAT_mini_get_external_ipv4 (struct in_addr *addr); |
202 | 202 | ||
203 | 203 | ||
204 | /** | ||
205 | * Handle to a mapping created with upnpc. | ||
206 | */ | ||
207 | struct GNUNET_NAT_MiniHandle; | ||
208 | |||
209 | |||
210 | /** | ||
211 | * Start mapping the given port using (mini)upnpc. This function | ||
212 | * should typically not be used directly (it is used within the | ||
213 | * general-purpose 'GNUNET_NAT_register' code). However, it can be | ||
214 | * used if specifically UPnP-based NAT traversal is to be used or | ||
215 | * tested. | ||
216 | * | ||
217 | * @param port port to map | ||
218 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP | ||
219 | * @param ac function to call with mapping result | ||
220 | * @param ac_cls closure for 'ac' | ||
221 | * @return NULL on error | ||
222 | */ | ||
223 | struct GNUNET_NAT_MiniHandle * | ||
224 | GNUNET_NAT_mini_map_start (uint16_t port, | ||
225 | int is_tcp, | ||
226 | GNUNET_NAT_AddressCallback ac, | ||
227 | void *ac_cls); | ||
228 | |||
229 | |||
230 | /** | ||
231 | * Remove a mapping created with (mini)upnpc. Calling | ||
232 | * this function will give 'upnpc' 1s to remove tha mapping, | ||
233 | * so while this function is non-blocking, a task will be | ||
234 | * left with the scheduler for up to 1s past this call. | ||
235 | * | ||
236 | * @param mini the handle | ||
237 | */ | ||
238 | void | ||
239 | GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini); | ||
240 | |||
241 | |||
204 | #endif | 242 | #endif |
205 | 243 | ||
206 | /* end of gnunet_nat_lib.h */ | 244 | /* end of gnunet_nat_lib.h */ |