Re: DUND pre-pppd script

"Brad Midgley" <[email protected]> Thu, 29 May 2008 20:10:40 -0600
Newsgroups gmane.linux.bluez.user
Message-ID <[email protected]>
Aras

> I think that I can solve this problem by configuring dund to call a pppd
> wrapper which calculates the correct, non-colliding, subnet and then
> passed on the arguments to pppd.

although there is no way to coax dund to pass the remote btaddr
address on to a wrapper script, we should be able to figure it out.

tell dund to use the wrapper:
dund --pppd=mypppd ...

in the mypppd wrapper:
#!/bin/sh
BTADDR=`rfcomm show $2 | cut -d ' ' -f2`
# set LOCAL, REMOTE based on the BTADDR
pppd LOCAL:REMOTE $*

if dund were changed then the tty might no longer be on $2.
in my scenario at least, LOCAL would always be 0.0.0.0 and something
like /etc/ppp/ip-up.d/bridge would bridge pppX:

#!/bin/sh
# $2 is the ppp interface name
brctl addif pan0 $2

should be fun to see if any of this works :)

-- 
Brad

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/