"Sarel J. Botha" wrote:

> On Fri, Feb 04, 2000 at 05:00:27PM +0600, Dmitry Gercog wrote:
> > It's right.
> > But, need get ip addres in my plugin for pppd
> > in function "void ip_up_hook(void)".
>
> By doing a grep for ip-up in the sources I found _PATH_IPUP, the grepped
> for _PATH_IPUP and found ipcp_script() which is called in ipcp.c to execute
> the scripts.
>
> ---
>     slprintf(strspeed, sizeof(strspeed), "%d", baud_rate);
>     slprintf(strlocal, sizeof(strlocal), "%I", ipcp_gotoptions[0].ouraddr);
>     slprintf(strremote, sizeof(strremote), "%I", ipcp_hisoptions[0].hisaddr);
> ---
>
> Pretty simple to see how ipcp_script() finds out what the remote address
> is: ipcp_gotoptions[0].ouraddr.
>

Thanks, it work.

But, i see that it right now, while "NUM_PPP"
defined in "pppd.h" equal "1".
And if in next version it will be was changed,
such code will not be correct.

Dmitry Gercog.



-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to