Deleted Added
sdiff udiff text old ( 38638 ) new ( 39300 )
full compact
1/*
2 * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning

--- 5 unchanged lines hidden (view full) ---

16 * written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 */
21
22#ifndef lint
23static const char rcsid[] =
24 "@(#) $Header: print-ppp.c,v 1.24 96/12/10 23:23:12 leres Exp $ (LBL)";
25#endif
26
27#ifdef PPP
28#include <sys/param.h>
29#include <sys/time.h>
30#include <sys/socket.h>
31#include <sys/file.h>
32#include <sys/ioctl.h>
33
34#if __STDC__
35struct mbuf;
36struct rtentry;
37#endif
38#include <net/if.h>
39
40#include <netinet/in.h>
41#include <netinet/in_systm.h>
42#include <netinet/ip.h>
43
44#include <ctype.h>
45#include <netdb.h>
46#include <pcap.h>
47#include <signal.h>
48#include <stdio.h>
49
50#include <net/ethernet.h>
51#include "ethertype.h"
52
53#include <net/ppp_defs.h>
54#include "interface.h"
55#include "addrtoname.h"
56
57struct protonames {
58 u_short protocol;
59 char *name;
60};
61
62static struct protonames protonames[] = {
63 /*

--- 127 unchanged lines hidden (view full) ---

191#define IPCP_ADDR 3
192
193static int handle_lcp(const u_char *p, int length);
194static int print_lcp_config_options(u_char *p);
195static int handle_chap(const u_char *p, int length);
196static int handle_ipcp(const u_char *p, int length);
197static int handle_pap(const u_char *p, int length);
198
199void
200ppp_hdlc_print(const u_char *p, int length)
201{
202 int proto = PPP_PROTOCOL(p);
203 int i, j, x;
204 u_char *ptr;
205
206 printf("ID-%03d ", *(p+5));

--- 320 unchanged lines hidden (view full) ---

527 }
528
529 if (xflag)
530 default_print((const u_char *)(p + PPP_HDRLEN),
531 caplen - PPP_HDRLEN);
532out:
533 putchar('\n');
534}
535#else
536#include <sys/types.h>
537#include <sys/time.h>
538
539#include <stdio.h>
540
541#include "interface.h"
542void
543ppp_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
544{
545 error("not configured for ppp");
546 /* NOTREACHED */
547}
548#endif