Deleted Added
full compact
print-ip.c (172686) print-ip.c (190207)
1/*
2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 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) 1988, 1989, 1990, 1991, 1992, 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-ip.c 172686 2007-10-16 02:31:48Z mlaier $
21 * $FreeBSD: head/contrib/tcpdump/print-ip.c 190207 2009-03-21 18:30:25Z rpaulo $
22 */
23
24#ifndef lint
25static const char rcsid[] _U_ =
22 */
23
24#ifndef lint
25static const char rcsid[] _U_ =
26 "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.149.2.9 2007/09/14 01:30:02 guy Exp $ (LBL)";
26 "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp $ (LBL)";
27#endif
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include <tcpdump-stdinc.h>
34

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

663 sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
664 if (sum != 0) {
665 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);
666 (void)printf(", bad cksum %x (->%x)!", ip_sum,
667 in_cksum_shouldbe(ip_sum, sum));
668 }
669 }
670
27#endif
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include <tcpdump-stdinc.h>
34

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

663 sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
664 if (sum != 0) {
665 ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);
666 (void)printf(", bad cksum %x (->%x)!", ip_sum,
667 in_cksum_shouldbe(ip_sum, sum));
668 }
669 }
670
671 printf(") ");
671 printf(")\n ");
672 }
673
674 /*
675 * If this is fragment zero, hand it to the next higher
676 * level protocol.
677 */
678 if ((ipds->off & 0x1fff) == 0) {
679 ipds->cp = (const u_char *)ipds->ip + hlen;

--- 63 unchanged lines hidden ---
672 }
673
674 /*
675 * If this is fragment zero, hand it to the next higher
676 * level protocol.
677 */
678 if ((ipds->off & 0x1fff) == 0) {
679 ipds->cp = (const u_char *)ipds->ip + hlen;

--- 63 unchanged lines hidden ---