X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fipcp.c;h=64d67fee85454b3d34a6df2d1493e5058fd07da3;hp=5236244ac35627786277be4bae209d954076e9ff;hb=aac99e2604e20409d9f0538ceb8590c2f75220a0;hpb=d53d8e8a31da10c5072ca4418f6f211e908d3d8c diff --git a/pppd/ipcp.c b/pppd/ipcp.c index 5236244..64d67fe 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: ipcp.c,v 1.57 2001/03/08 05:11:12 paulus Exp $" +#define RCSID "$Id: ipcp.c,v 1.58 2001/04/27 23:13:06 paulus Exp $" /* * TODO: @@ -59,6 +59,10 @@ void (*ip_down_hook) __P((void)) = NULL; /* Hook for a plugin to choose the remote IP address */ void (*ip_choose_hook) __P((u_int32_t *)) = NULL; +/* Notifiers for when IPCP goes up and down */ +struct notifier *ip_up_notifier = NULL; +struct notifier *ip_down_notifier = NULL; + /* local vars */ static int default_route_set[NUM_PPP]; /* Have set up a default route */ static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */ @@ -1709,6 +1713,7 @@ ipcp_up(f) np_up(f->unit, PPP_IP); ipcp_is_up = 1; + notify(ip_up_notifier, 0); if (ip_up_hook) ip_up_hook(); @@ -1737,6 +1742,7 @@ ipcp_down(f) /* XXX a bit IPv4-centric here, we only need to get the stats * before the interface is marked down. */ update_link_stats(f->unit); + notify(ip_down_notifier, 0); if (ip_down_hook) ip_down_hook(); if (ipcp_is_up) {