 +ServerSettings::configurePortForwarding()
 +{
 +  init_upnp();
++  upnp_add_redir(lanaddr, getORPort());
 +}
 +
  /** Virtual method called when we retrieve a server-related setting from Tor.

+ServerSettings::init_upnp()
+{
+  struct UPNPDev * devlist;
+  char lanaddr[256];
+  int retval;
+
+  printf("TB : init_upnp()\n");

 
 class ServerSettings : public AbstractTorSettings
 {
@@ -89,9 +93,21 @@
   virtual QVariant torValue(const QString &key) const;
 
 private:
+  /** Used by miniupnpc library */
+  struct UPNPUrls urls;
+  struct IGDdatas data;
+  char lanaddr[16];
+  void init_upnp();
+  void upnp_add_redir (const char * addr, int port);
+  void upnp_rem_redir(int port);
