Hi,

I finally managed to make it work! KSE threading was the solution! I guess 
only freebsd 5 will do.. Here's the recipe:

1 - Install libkse. for this you have to have the sources installed.

> cd /usr/src/lib/libpthread
> make all install

2 - Create the file /usr/ports/net/pppoa/files/patch_ab with the following 
content (thanks Francois Rogler!):

*** src/pppoa3.c        Fri Jun 27 23:03:28 2003
--- src/pppoa3.c.orig   Mon Jul 14 13:57:57 2003
***************
*** 29,35 ****
  #ifndef _PPPOA3_C_
  #define _PPPOA3_C_
  
! #ifdef __linux__
  #define BRIDGING_ENABLED
  #endif
  
--- 29,35 ----
  #ifndef _PPPOA3_C_
  #define _PPPOA3_C_
  
! #if defined (__FreeBSD__) || defined (__linux__)
  #define BRIDGING_ENABLED
  #endif
  
***************
*** 66,73 ****
--- 66,75 ----
  #include <sys/sem.h>
  
  #ifdef BRIDGING_ENABLED
+ #ifdef __linux__
  #include <linux/if_tun.h>
  #include <linux/if.h>
+ #endif /* Linux */
  #endif
  
  #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
***************
*** 1545,1550 ****
--- 1547,1561 ----
  #ifdef BRIDGING_ENABLED
  static int tap_open()
  {
+ 
+ #if defined (__FreeBSD__)
+     int fd;
+ /* Note: probably have to check for tap1, 2 ... if it fails on the first */
+     if( (fd = open("/dev/tap0", O_RDWR | O_FSYNC)) < 0 )
+        return -1;
+ #endif /* BSD */
+ 
+ #ifdef __linux__
      struct ifreq ifr;
      int fd, err;
  
***************
*** 1558,1563 ****
--- 1569,1575 ----
         close(fd);
         return err;
      }
+ #endif /* Linux */
  
      return fd;
  }

3 - Make the port

> cd /usr/ports/net/pppoa/
> make

4 - Edit /usr/ports/net/pppoa/work/speedtouch-1.2-beta2/src/Makefile with 
your favorite editor and change:

THREAD_LIBS=-pthread

into:

THREAD_LIBS=-lkse

5 - remove pppoa3 (the binary) from that directory

6 - remake in the same directory (/usr/ports/net/pppoa/work/speedtouch-1.2-
beta2/src/)

> make

7 - pppoa3 will be built but this time linked to libkse. this binary may now 
be used to do the bridging.

> ./pppoa3 -b -c -v 1 -vpi 0 -vci 35

It would be probably a good idea to patch the port to do this all at once..

8 - start ppp

> ppp -ddial <your_ppp_profile_here>

the profile I used was very similar to the one in my last post.


Good luck!

Cheers,
Nuno Antunes


Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]

        

Reply via email to