]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/upap.h
Large patch from Frank Cusack <fcusack@fcusack.com> to add proper
[ppp.git] / pppd / upap.h
index 10c3414a0afa78b90144c624438370e0658ac0ab..0d38f3bf6e66a7a3be821291a3af550ebd15753b 100644 (file)
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * $Id: upap.h,v 1.2 1994/04/11 07:13:44 paulus Exp $
+ * $Id: upap.h,v 1.7 1999/11/15 01:51:54 paulus Exp $
  */
 
 /*
  * Packet header = Code, id, length.
  */
-#define UPAP_HEADERLEN (sizeof (u_char) + sizeof (u_char) + sizeof (u_short))
+#define UPAP_HEADERLEN 4
 
 
 /*
@@ -45,9 +45,10 @@ typedef struct upap_state {
     int us_clientstate;                /* Client state */
     int us_serverstate;                /* Server state */
     u_char us_id;              /* Current id */
-    int us_timeouttime;                /* Timeout time in milliseconds */
+    int us_timeouttime;                /* Timeout (seconds) for auth-req retrans. */
     int us_transmits;          /* Number of auth-reqs sent */
     int us_maxtransmits;       /* Maximum number of auth-reqs to send */
+    int us_reqtimeout;         /* Time to wait for auth-req from peer */
 } upap_state;
 
 
@@ -75,17 +76,12 @@ typedef struct upap_state {
 /*
  * Timeouts.
  */
-#define UPAP_DEFTIMEOUT        3       /* Timeout time in seconds */
-
+#define UPAP_DEFTIMEOUT        3       /* Timeout (seconds) for retransmitting req */
+#define UPAP_DEFREQTIME        30      /* Time to wait for auth-req from peer */
 
 extern upap_state upap[];
 
-void upap_init __ARGS((int));
-void upap_authwithpeer __ARGS((int, char *, char *));
-void upap_authpeer __ARGS((int));
-void upap_lowerup __ARGS((int));
-void upap_lowerdown __ARGS((int));
-void upap_input __ARGS((int, u_char *, int));
-void upap_protrej __ARGS((int));
-int  upap_printpkt __ARGS((u_char *, int,
-                          void (*) __ARGS((void *, char *, ...)), void *));
+void upap_authwithpeer __P((int, char *, char *));
+void upap_authpeer __P((int));
+
+extern struct protent pap_protent;