]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
sync constant and attributes names with
[ppp.git] / pppd / main.c
index 124f6404e6dcac22d312e4a0001c52c73677573a..c6ba438a43576f021ce86721a0171a51b55d043b 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: main.c,v 1.111 2002/01/22 16:02:58 dfs Exp $"
+#define RCSID  "$Id: main.c,v 1.113 2002/05/21 17:26:49 dfs Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -53,6 +53,7 @@
 #include "upap.h"
 #include "chap.h"
 #include "ccp.h"
+#include "ecp.h"
 #include "pathnames.h"
 
 #ifdef USE_TDB
@@ -108,6 +109,8 @@ char db_key[32];
 
 int (*holdoff_hook) __P((void)) = NULL;
 int (*new_phase_hook) __P((int)) = NULL;
+void (*snoop_recv_hook) __P((unsigned char *p, int len)) = NULL;
+void (*snoop_send_hook) __P((unsigned char *p, int len)) = NULL;
 
 static int conn_running;       /* we have a [dis]connector running */
 static int devfd;              /* fd of underlying device */
@@ -220,6 +223,7 @@ struct protent *protocols[] = {
     &ipv6cp_protent,
 #endif
     &ccp_protent,
+    &ecp_protent,
 #ifdef IPX_CHANGE
     &ipxcp_protent,
 #endif
@@ -968,6 +972,7 @@ get_input()
     }
 
     dump_packet("rcvd", p, len);
+    if (snoop_recv_hook) snoop_recv_hook(p, len);
 
     p += 2;                            /* Skip address and control */
     GETSHORT(protocol, p);
@@ -1668,7 +1673,7 @@ remove_notifier(notif, func, arg)
 }
 
 /*
- * notify - call a set of functions registered with add_notify.
+ * notify - call a set of functions registered with add_notifier.
  */
 void
 notify(notif, val)