2 This file is part of GNUnet
3 (C) 2006 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file include/gnunet_upnp_service.h
23 * @brief API for UPnP access
24 * @author Christian Grothoff
27 #ifndef GNUNET_UPNP_SERVICE_H
28 #define GNUNET_UPNP_SERVICE_H
30 #include "gnunet_resolver_service.h"
35 #if 0 /* keep Emacsens' auto-indent happy */
42 * Get the external IP address for the local machine and
43 * install a port mapping if possible. The external port
44 * will be returned as part of the address.
46 * @param sched scheduler to use
47 * @param cfg configuration to use
48 * @param domain communication domain (i.e. PF_INET or PF_INET6)
49 * @param type communication semantics (SOCK_STREAM, SOCK_DGRAM)
50 * @param protocol protocol to use, 0 for default (see protocols(5))
51 * @param port port to map
52 * @param timeout after how long should we give up (and call
53 * notify with buf NULL and size 0)?
54 * @param callback function to call with the external address;
55 * function will be called with NULL on error
56 * @param cls closure for callback
58 int GNUNET_UPNP_get_ip (struct GNUNET_SCHEDULER_Handle *sched,
59 struct GNUNET_CONFIGURATION_Handle *cfg,
64 struct GNUNET_TIME_Relative timeout,
65 GNUNET_RESOLVER_AddressCallback callback, void *cls);
68 #if 0 /* keep Emacsens' auto-indent happy */