aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_nat_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-07 16:03:59 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-07 16:03:59 +0100
commitc6bf6b89b5c1556590eadc3d64676d2f023e6da4 (patch)
treedbc378b6ac024e73972b0ac0015b60b3f3ca5c5f /src/include/gnunet_nat_service.h
parent5c59b1796e462b468321ce1200eb4a6972340cce (diff)
downloadgnunet-c6bf6b89b5c1556590eadc3d64676d2f023e6da4.tar.gz
gnunet-c6bf6b89b5c1556590eadc3d64676d2f023e6da4.zip
make sure nat-auto code uses NAT_AUTO prefix
Diffstat (limited to 'src/include/gnunet_nat_service.h')
-rw-r--r--src/include/gnunet_nat_service.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/include/gnunet_nat_service.h b/src/include/gnunet_nat_service.h
index 94f8a8555..e75845207 100644
--- a/src/include/gnunet_nat_service.h
+++ b/src/include/gnunet_nat_service.h
@@ -425,6 +425,58 @@ GNUNET_NAT_stun_handle_packet (struct GNUNET_NAT_Handle *nh,
425 size_t data_size); 425 size_t data_size);
426 426
427 427
428/**
429 * Handle to a request given to the resolver. Can be used to cancel
430 * the request prior to the timeout or successful execution. Also
431 * used to track our internal state for the request.
432 */
433struct GNUNET_NAT_STUN_Handle;
434
435
436/**
437 * Function called to report success or failure for
438 * NAT configuration test.
439 *
440 * @param cls closure
441 * @param result #GNUNET_NAT_ERROR_SUCCESS on success, otherwise the specific error code
442 */
443typedef void
444(*GNUNET_NAT_TestCallback) (void *cls,
445 enum GNUNET_NAT_StatusCode result);
446
447
448/**
449 * Make Generic STUN request. Sends a generic stun request to the
450 * server specified using the specified socket. If we do this,
451 * we need to watch for possible responses and call
452 * #GNUNET_NAT_stun_handle_packet() on incoming packets.
453 *
454 * @param server the address of the stun server
455 * @param port port of the stun server, in host byte order
456 * @param sock the socket used to send the request, must be a
457 * UDP socket
458 * @param cb callback in case of error
459 * @param cb_cls closure for @a cb
460 * @return NULL on error
461 */
462struct GNUNET_NAT_STUN_Handle *
463GNUNET_NAT_stun_make_request (const char *server,
464 uint16_t port,
465 struct GNUNET_NETWORK_Handle *sock,
466 GNUNET_NAT_TestCallback cb,
467 void *cb_cls);
468
469
470/**
471 * Cancel active STUN request. Frees associated resources
472 * and ensures that the callback is no longer invoked.
473 *
474 * @param rh request to cancel
475 */
476void
477GNUNET_NAT_stun_make_request_cancel (struct GNUNET_NAT_STUN_Handle *rh);
478
479
428#endif 480#endif
429 481
430/** @} */ /* end of group */ 482/** @} */ /* end of group */