]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ipcp.c
long -> u_int32_t, extra param for ip-up/down scripts
[ppp.git] / pppd / ipcp.c
index f20257931721952fb8b7a967c7d3d739f12c35eb..310f869067ef2b3484e4106d52ff1e1a63d7dbee 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.13 1994/10/22 11:54:04 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.15 1995/04/24 05:58:38 paulus Exp $";
 #endif
 
 /*
@@ -38,13 +38,13 @@ static char rcsid[] = "$Id: ipcp.c,v 1.13 1994/10/22 11:54:04 paulus Exp $";
 #include "pathnames.h"
 
 /* global vars */
-ipcp_options ipcp_wantoptions[N_PPP];  /* Options that we want to request */
-ipcp_options ipcp_gotoptions[N_PPP];   /* Options that peer ack'd */
-ipcp_options ipcp_allowoptions[N_PPP]; /* Options we allow peer to request */
-ipcp_options ipcp_hisoptions[N_PPP];   /* Options that we ack'd */
+ipcp_options ipcp_wantoptions[NUM_PPP];        /* Options that we want to request */
+ipcp_options ipcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
+ipcp_options ipcp_allowoptions[NUM_PPP];       /* Options we allow peer to request */
+ipcp_options ipcp_hisoptions[NUM_PPP]; /* Options that we ack'd */
 
 /* local vars */
-static int cis_received[N_PPP];                /* # Conf-Reqs received */
+static int cis_received[NUM_PPP];              /* # Conf-Reqs received */
 
 /*
  * Callbacks for fsm code.  (CI = Configuration Information)
@@ -60,7 +60,7 @@ static void ipcp_up __P((fsm *));             /* We're UP */
 static void ipcp_down __P((fsm *));            /* We're DOWN */
 static void ipcp_script __P((fsm *, char *)); /* Run an up/down script */
 
-fsm ipcp_fsm[N_PPP];           /* IPCP fsm structure */
+fsm ipcp_fsm[NUM_PPP];         /* IPCP fsm structure */
 
 static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
     ipcp_resetci,              /* Reset our Configuration Information */
@@ -774,7 +774,7 @@ ipcp_reqci(f, inp, len, reject_if_disagree)
                && (ciaddr1 == 0 || !wo->accept_remote)) {
                orc = CONFNAK;
                if (!reject_if_disagree) {
-                   DECPTR(sizeof (long), p);
+                   DECPTR(sizeof(u_int32_t), p);
                    tl = ntohl(wo->hisaddr);
                    PUTLONG(tl, p);
                }
@@ -791,7 +791,7 @@ ipcp_reqci(f, inp, len, reject_if_disagree)
                if (ciaddr2 == 0 || !wo->accept_local) {
                    orc = CONFNAK;
                    if (!reject_if_disagree) {
-                       DECPTR(sizeof (long), p);
+                       DECPTR(sizeof(u_int32_t), p);
                        tl = ntohl(wo->ouraddr);
                        PUTLONG(tl, p);
                    }
@@ -828,7 +828,7 @@ ipcp_reqci(f, inp, len, reject_if_disagree)
                && (ciaddr1 == 0 || !wo->accept_remote)) {
                orc = CONFNAK;
                if (!reject_if_disagree) {
-                   DECPTR(sizeof (long), p);
+                   DECPTR(sizeof(u_int32_t), p);
                    tl = ntohl(wo->hisaddr);
                    PUTLONG(tl, p);
                }
@@ -1083,7 +1083,8 @@ ipcp_script(f, script)
     argv[3] = strspeed;
     argv[4] = strlocal;
     argv[5] = strremote;
-    argv[6] = NULL;
+    argv[6] = ipparam;
+    argv[7] = NULL;
     run_program(script, argv, 0);
 }