Deleted Added
full compact
print-null.c (21262) print-null.c (26183)
1/*
2 * Copyright (c) 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

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

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
22#ifndef lint
1/*
2 * Copyright (c) 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

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

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
22#ifndef lint
23static char rcsid[] =
24 "@(#)$Header: print-null.c,v 1.19 96/07/14 19:39:02 leres Exp $ (LBL)";
23static const char rcsid[] =
24 "@(#) $Header: print-null.c,v 1.22 96/12/10 23:18:58 leres Exp $ (LBL)";
25#endif
26
27#include <sys/param.h>
28#include <sys/time.h>
29#include <sys/socket.h>
30#include <sys/file.h>
31#include <sys/ioctl.h>
32

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

41#include <netinet/ip.h>
42#include <net/ethernet.h>
43#include <netinet/ip_var.h>
44#include <netinet/udp.h>
45#include <netinet/udp_var.h>
46#include <netinet/tcp.h>
47#include <netinet/tcpip.h>
48
25#endif
26
27#include <sys/param.h>
28#include <sys/time.h>
29#include <sys/socket.h>
30#include <sys/file.h>
31#include <sys/ioctl.h>
32

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

41#include <netinet/ip.h>
42#include <net/ethernet.h>
43#include <netinet/ip_var.h>
44#include <netinet/udp.h>
45#include <netinet/udp_var.h>
46#include <netinet/tcp.h>
47#include <netinet/tcpip.h>
48
49#include <pcap.h>
49#include <stdio.h>
50#include <string.h>
51
50#include <stdio.h>
51#include <string.h>
52
52#include "interface.h"
53#include "addrtoname.h"
53#include "addrtoname.h"
54#include "pcap.h"
54#include "interface.h"
55
56#define NULL_HDRLEN 4
57
55
56#define NULL_HDRLEN 4
57
58#ifndef AF_NS
59#define AF_NS 6 /* XEROX NS protocols */
60#endif
61
58static void
59null_print(const u_char *p, const struct ip *ip, u_int length)
60{
61 u_int family;
62
63 memcpy((char *)&family, (char *)p, sizeof(family));
64
65 if (nflag) {

--- 50 unchanged lines hidden ---
62static void
63null_print(const u_char *p, const struct ip *ip, u_int length)
64{
65 u_int family;
66
67 memcpy((char *)&family, (char *)p, sizeof(family));
68
69 if (nflag) {

--- 50 unchanged lines hidden ---