doc: gnunet-c-tutorial: Add nodes.
[oweals/gnunet.git] / src / nat / gnunet-service-nat_helper.h
index c3074d9ade901bed45019ddef2ea779948bb40b6..026526b05579e2f8fb1992f534d93349dbf98526 100644 (file)
@@ -56,7 +56,7 @@ typedef void
  * @return NULL on error
  */
 struct HelperContext *
-GN_start_gnunet_nat_server_ (const char *internal_address,
+GN_start_gnunet_nat_server_ (const struct in_addr *internal_address,
                             GN_ReversalCallback cb,
                             void *cb_cls);
 
@@ -71,4 +71,21 @@ void
 GN_stop_gnunet_nat_server_ (struct HelperContext *h);
 
 
+/**
+ * We want to connect to a peer that is behind NAT.  Run the
+ * gnunet-helper-nat-client to send dummy ICMP responses to cause
+ * that peer to connect to us (connection reversal).
+ *
+ * @param internal_address out internal address to use
+ * @param internal_port internal port to use
+ * @param remote_v4 the address of the peer (IPv4-only)
+ * @return #GNUNET_SYSERR on error,
+ *         #GNUNET_OK otherwise
+ */
+int
+GN_request_connection_reversal (const struct in_addr *internal_address,
+                               uint16_t internal_port,
+                               const struct in_addr *sa);
+
+
 /* end of gnunet-service-nat_helper.h */