Subject: Re: pppd questions
To: Steve Quint <Squint@flash.net>
From: Armen Babikyan <armenb@xeo.net>
List: port-mac68k
Date: 07/22/1997 18:39:54
At 2:01 PM -0700 7/22/97, Steve Quint wrote:
>Can anyone explain why the defaultroute option in pppd doesn't work on some
>configurations.  Is it simply a matter of running gated?
>
>Also, I've written a Perl script (invoked from the 'ppp-up' script) that
>performs a 'netstat -rn' to obtain the IP numbers of the server and my
>assigned IP, so that the script can run the 'route add default xxx' command
>as well as a ipnat script.  My questions is:  Is there a more efficient way
>of getting those IP number?
>

hi
i don't know if this is quite the answer you are looking for, but these
shell commands should get you your local IP #:
`ifconfig ppp0 | grep inet | cut -d ' ' -f 2`  <-local IP address
`ifconfig ppp0 | grep inet | cut -d ' ' -f 4`  <-remote IP address
this is a pretty hacked way of doing it, but it gets the job done :-)
  - a