X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmain.c;h=16231db75ead75a846022061d3a9a4d4c2395306;hb=dbab7400abf57617a9334735a64ff00c6552cec5;hp=124f6404e6dcac22d312e4a0001c52c73677573a;hpb=d95598c16f6a3feb4846db669601856bad15bb74;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index 124f640..16231db 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -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.112 2002/02/12 20:07:09 dfs Exp $" #include #include @@ -108,6 +108,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 */ @@ -968,6 +970,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);