Deleted Added
full compact
print-cip.c (127668) print-cip.c (146773)
1/*
2 * Marko Kiiskila carnil@cs.tut.fi
3 *
4 * Tampere University of Technology - Telecommunications Laboratory
5 *
6 * Permission to use, copy, modify and distribute this
7 * software and its documentation is hereby granted,
8 * provided that both the copyright notice and this

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

17 * CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS
19 * SOFTWARE.
20 *
21 */
22
23#ifndef lint
24static const char rcsid[] _U_ =
1/*
2 * Marko Kiiskila carnil@cs.tut.fi
3 *
4 * Tampere University of Technology - Telecommunications Laboratory
5 *
6 * Permission to use, copy, modify and distribute this
7 * software and its documentation is hereby granted,
8 * provided that both the copyright notice and this

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

17 * CONDITION AND DISCLAIMS ANY LIABILITY OF ANY KIND FOR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS
19 * SOFTWARE.
20 *
21 */
22
23#ifndef lint
24static const char rcsid[] _U_ =
25 "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.21.2.2 2003/11/16 08:51:15 guy Exp $ (LBL)";
25 "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.25 2005/04/06 21:32:39 mcr Exp $ (LBL)";
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <string.h>
33

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

58 * There is no MAC-layer header, so just print the length.
59 */
60 printf("%d: ", length);
61}
62
63/*
64 * This is the top level routine of the printer. 'p' points
65 * to the LLC/SNAP or raw header of the packet, 'h->ts' is the timestamp,
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <string.h>
33

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

58 * There is no MAC-layer header, so just print the length.
59 */
60 printf("%d: ", length);
61}
62
63/*
64 * This is the top level routine of the printer. 'p' points
65 * to the LLC/SNAP or raw header of the packet, 'h->ts' is the timestamp,
66 * 'h->length' is the length of the packet off the wire, and 'h->caplen'
66 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
67 * is the number of bytes actually captured.
68 */
69u_int
70cip_if_print(const struct pcap_pkthdr *h, const u_char *p)
71{
72 u_int caplen = h->caplen;
73 u_int length = h->len;
74 u_short extracted_ethertype;

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

96 }
97 if (!xflag && !qflag)
98 default_print(p, caplen);
99 }
100 } else {
101 /*
102 * LLC header is absent; treat it as just IP.
103 */
67 * is the number of bytes actually captured.
68 */
69u_int
70cip_if_print(const struct pcap_pkthdr *h, const u_char *p)
71{
72 u_int caplen = h->caplen;
73 u_int length = h->len;
74 u_short extracted_ethertype;

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

96 }
97 if (!xflag && !qflag)
98 default_print(p, caplen);
99 }
100 } else {
101 /*
102 * LLC header is absent; treat it as just IP.
103 */
104 ip_print(p, length);
104 ip_print(gndo, p, length);
105 }
106
107 return (0);
108}
105 }
106
107 return (0);
108}
109
110
111/*
112 * Local Variables:
113 * c-style: whitesmith
114 * c-basic-offset: 8
115 * End:
116 */