summaryrefslogtreecommitdiffstats
path: root/thirdparty/miniupnpc/upnpdev.c
diff options
context:
space:
mode:
authormhilbrunner <m.hilbrunner@gmail.com>2018-05-11 02:00:16 +0200
committermhilbrunner <m.hilbrunner@gmail.com>2018-06-07 01:52:04 +0200
commitc21da40de5fb20ade5b07dcc961c9364ba3815af (patch)
tree0afa8202296f30dcd939bc24492e97d4864f4fb1 /thirdparty/miniupnpc/upnpdev.c
parente854a71fac776cf49a0d65468e8130401eff3c6b (diff)
downloadredot-engine-c21da40de5fb20ade5b07dcc961c9364ba3815af.tar.gz
Add UPnP support (port forwarding, querying external IP)
Diffstat (limited to 'thirdparty/miniupnpc/upnpdev.c')
-rw-r--r--thirdparty/miniupnpc/upnpdev.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/thirdparty/miniupnpc/upnpdev.c b/thirdparty/miniupnpc/upnpdev.c
new file mode 100644
index 0000000000..d89a9934c3
--- /dev/null
+++ b/thirdparty/miniupnpc/upnpdev.c
@@ -0,0 +1,23 @@
+/* $Id: upnpdev.c,v 1.1 2015/08/28 12:14:19 nanard Exp $ */
+/* Project : miniupnp
+ * Web : http://miniupnp.free.fr/
+ * Author : Thomas BERNARD
+ * copyright (c) 2005-2015 Thomas Bernard
+ * This software is subjet to the conditions detailed in the
+ * provided LICENSE file. */
+#include <stdlib.h>
+#include "upnpdev.h"
+
+/* freeUPNPDevlist() should be used to
+ * free the chained list returned by upnpDiscover() */
+void freeUPNPDevlist(struct UPNPDev * devlist)
+{
+ struct UPNPDev * next;
+ while(devlist)
+ {
+ next = devlist->pNext;
+ free(devlist);
+ devlist = next;
+ }
+}
+