Deleted Added
full compact
print-atm.c (75118) print-atm.c (98527)
1/*
2 * Copyright (c) 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) 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-atm.c 75118 2001-04-03 07:50:46Z fenner $
21 * $FreeBSD: head/contrib/tcpdump/print-atm.c 98527 2002-06-21 00:49:02Z fenner $
22 */
23#ifndef lint
24static const char rcsid[] =
22 */
23#ifndef lint
24static const char rcsid[] =
25 "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.20 2000/12/22 22:45:09 guy Exp $ (LBL)";
25 "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.21 2001/07/05 18:54:14 guy Exp $ (LBL)";
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <sys/param.h>
33#include <sys/time.h>

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

50 */
51void
52atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
53{
54 u_int caplen = h->caplen;
55 u_int length = h->len;
56 u_short ethertype, extracted_ethertype;
57
26#endif
27
28#ifdef HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <sys/param.h>
33#include <sys/time.h>

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

50 */
51void
52atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
53{
54 u_int caplen = h->caplen;
55 u_int length = h->len;
56 u_short ethertype, extracted_ethertype;
57
58 ++infodelay;
58 ts_print(&h->ts);
59
60 if (caplen < 8) {
61 printf("[|atm]");
62 goto out;
63 }
64
65 if (p[4] == 0xaa || p[5] == 0xaa || p[6] == 0x03) {

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

152 /* default_print(p, caplen); */
153 llc_print(p-8,length+8,caplen+8,"000000","000000", &extracted_ethertype);
154 }
155 }
156 if (xflag)
157 default_print(p, caplen);
158 out:
159 putchar('\n');
59 ts_print(&h->ts);
60
61 if (caplen < 8) {
62 printf("[|atm]");
63 goto out;
64 }
65
66 if (p[4] == 0xaa || p[5] == 0xaa || p[6] == 0x03) {

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

153 /* default_print(p, caplen); */
154 llc_print(p-8,length+8,caplen+8,"000000","000000", &extracted_ethertype);
155 }
156 }
157 if (xflag)
158 default_print(p, caplen);
159 out:
160 putchar('\n');
161 --infodelay;
162 if (infoprint)
163 info(0);
160}
164}