Deleted Added
full compact
print-sl.c (75118) print-sl.c (98527)
1/*
2 * Copyright (c) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997
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

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

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
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 *
1/*
2 * Copyright (c) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997
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

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

13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
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 * $FreeBSD: head/contrib/tcpdump/print-sl.c 75118 2001-04-03 07:50:46Z fenner $
21 * $FreeBSD: head/contrib/tcpdump/print-sl.c 98527 2002-06-21 00:49:02Z fenner $
22 */
23
24#ifndef lint
25static const char rcsid[] =
22 */
23
24#ifndef lint
25static const char rcsid[] =
26 "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.56 2000/10/10 05:06:10 guy Exp $ (LBL)";
26 "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.57 2001/07/05 18:54:17 guy Exp $ (LBL)";
27#endif
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include <sys/param.h>
34#include <sys/time.h>

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

57
58void
59sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
60{
61 register u_int caplen = h->caplen;
62 register u_int length = h->len;
63 register const struct ip *ip;
64
27#endif
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include <sys/param.h>
34#include <sys/time.h>

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

57
58void
59sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
60{
61 register u_int caplen = h->caplen;
62 register u_int length = h->len;
63 register const struct ip *ip;
64
65 ++infodelay;
65 ts_print(&h->ts);
66
67 if (caplen < SLIP_HDRLEN) {
68 printf("[|slip]");
69 goto out;
70 }
71 /*
72 * Some printers want to get back at the link level addresses,

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

95 default:
96 printf ("ip v%d", IP_V(ip));
97 }
98
99 if (xflag)
100 default_print((u_char *)ip, caplen - SLIP_HDRLEN);
101 out:
102 putchar('\n');
66 ts_print(&h->ts);
67
68 if (caplen < SLIP_HDRLEN) {
69 printf("[|slip]");
70 goto out;
71 }
72 /*
73 * Some printers want to get back at the link level addresses,

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

96 default:
97 printf ("ip v%d", IP_V(ip));
98 }
99
100 if (xflag)
101 default_print((u_char *)ip, caplen - SLIP_HDRLEN);
102 out:
103 putchar('\n');
104 --infodelay;
105 if (infoprint)
106 info(0);
103}
104
105
106void
107sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
108{
109 register u_int caplen = h->caplen;
110 register u_int length = h->len;
111 register const struct ip *ip;
112
107}
108
109
110void
111sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
112{
113 register u_int caplen = h->caplen;
114 register u_int length = h->len;
115 register const struct ip *ip;
116
117 ++infodelay;
113 ts_print(&h->ts);
114
115 if (caplen < SLIP_HDRLEN) {
116 printf("[|slip]");
117 goto out;
118 }
119 /*
120 * Some printers want to get back at the link level addresses,

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

134#endif
135
136 ip_print((u_char *)ip, length);
137
138 if (xflag)
139 default_print((u_char *)ip, caplen - SLIP_HDRLEN);
140 out:
141 putchar('\n');
118 ts_print(&h->ts);
119
120 if (caplen < SLIP_HDRLEN) {
121 printf("[|slip]");
122 goto out;
123 }
124 /*
125 * Some printers want to get back at the link level addresses,

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

139#endif
140
141 ip_print((u_char *)ip, length);
142
143 if (xflag)
144 default_print((u_char *)ip, caplen - SLIP_HDRLEN);
145 out:
146 putchar('\n');
147 --infodelay;
148 if (infoprint)
149 info(0);
142}
143
144static void
145sliplink_print(register const u_char *p, register const struct ip *ip,
146 register u_int length)
147{
148 int dir;
149 u_int hlen;

--- 122 unchanged lines hidden ---
150}
151
152static void
153sliplink_print(register const u_char *p, register const struct ip *ip,
154 register u_int length)
155{
156 int dir;
157 u_int hlen;

--- 122 unchanged lines hidden ---