2 * @file upnp/upnp.h Universal Plug N Play API
7 * Gaim is the legal property of its developers, whose names are too numerous
8 * to list here. Please refer to the COPYRIGHT file distributed with this
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #include <libxml/parser.h>
31 #include "gnunet_util_lib.h"
36 #if 0 /* keep Emacsens' auto-indent happy */
42 * Sends a discovery request to search for a UPnP enabled IGD that
43 * contains the WANIPConnection service that will allow us to receive the
44 * public IP address of the IGD, and control it for forwarding ports.
45 * The result will be cached for further use.
47 int gaim_upnp_discover (struct GNUNET_CONFIGURATION_Handle *cfg, int sock);
50 * Gets the IP address from a UPnP enabled IGD that sits on the local
51 * network, so when getting the network IP, instead of returning the
52 * local network IP, the public IP is retrieved. This is a cached value from
53 * the time of the UPnP discovery.
55 * @return The IP address of the network, or NULL if something went wrong
57 const char *gaim_upnp_get_public_ip (void);
60 * Maps Ports in a UPnP enabled IGD that sits on the local network to
61 * this gaim client. Essentially, this function takes care of the port
62 * forwarding so things like file transfers can work behind NAT firewalls
64 * @param cfg configuration to use
65 * @param do_add TRUE/GNUNET_YES to add, FALSE/GNUNET_NO to remove
66 * @param portmap The port to map to this client
67 * @param protocol The protocol to map, either "TCP" or "UDP"
69 int gaim_upnp_change_port_mapping (struct GNUNET_CONFIGURATION_Handle *cfg,
71 uint16_t portmap, const char *protocol);
73 #if 0 /* keep Emacsens' auto-indent happy */
80 #endif /* _GAIM_UPNP_H_ */