[haiku-development] Fwd: Re: Question : Haiku + Transmission

  • From: Matt Madia <mattmadia@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 8 Mar 2009 16:36:55 -0400

---------- Forwarded message ----------
From: Matt Madia <mattmadia@xxxxxxxxx>
Date: Sun, Mar 8, 2009 at 4:34 PM
Subject: Re: [haiku-development] Re: Question : Haiku + Transmission
To: François Revol <revol@xxxxxxx>


On Sun, Mar 8, 2009 at 4:23 PM, François Revol <revol@xxxxxxx> wrote:
>> Judging by the following discussion, Transmission's svn trunk is
>> being
>> blocked by :
>>  - proper port of libnatpmp (part of MiniUPnP)
>
> does it require IPv6 ?
>
libnatpmp does not appear to require IPv6.
here's the file that needs to be modified:
http://trac.transmissionbt.com/browser/trunk/third-party/libnatpmp/getgateway.c

Heres a snippet from my patch/hack:
diff -Naur transmission-1.42-original/third-party/libnatpmp/getgateway.c
transmission-1.42/third-party/libnatpmp/getgateway.c
--- transmission-1.42-original/third-party/libnatpmp/getgateway.c
 2009-01-10
18:03:59.000000000 +0000
+++ transmission-1.42/third-party/libnatpmp/getgateway.c        2009-01-10
19:34:17.000000000 +0000
@@ -37,6 +37,18 @@
 #undef USE_SYSCTL_NET_ROUTE
 #endif

+#ifdef __HAIKU__
+#undef USE_PROC_NET_ROUTE
+#undef USE_SOCKET_ROUTE
+#undef USE_SYSCTL_NET_ROUTE
+/* Note: 2009-jan-10
+ *
+ * Haiku uses a BSD-like network stack.
+ * However its network stack is not yet feature complete.
+ * So for now, a workaround is needed */
+#define USE_HAIKU_WORKAROUND
+#endif
+
 #ifdef __APPLE__
 #undef USE_PROC_NET_ROUTE
 #undef USE_SOCKET_ROUTE
@@ -82,6 +94,14 @@
 #define FAILED  (-1)
 #endif

+
+#ifdef USE_HAIKU_WORKAROUND
+int getdefaultgateway(in_addr_t * addr)
+{
+       return FAILED;
+}
+#endif
+
 #ifdef USE_PROC_NET_ROUTE
 int getdefaultgateway(in_addr_t * addr)
 {

>> <mmadia> sorry if i came across that way,  i just feel like you're
>> shutting haiku out simply because it doesn't support IPv6.
>> <BentMyWookie> there are multiple problems with haiku currently,
>> namely that it doesn't support ipv6 and miniupnp doesn't work
>
> You can send a patch.
>
Me or he?   Need i remind you of my lacking c/c++ skills.
( yes, i know i could learn c/c++, but currently i'm able to keep
myself productive enough without it )
If you're referring to BentMyWookie, there's a better chance of M$
giving up it's monopoly than him contributing to Haiku.  Namely,
because no matter how many times I tell him that my MiniUPnP -hack- is
temporary and is only used to allow the porting effort to continue, he
insists in using it as part of his reasoning to ignore Haiku.


--mmadia

Other related posts: