print-ip6.c (147904) | print-ip6.c (162021) |
---|---|
1/* 2 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 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 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-ip6.c 147904 2005-07-11 04:14:02Z sam $ | 21 * $FreeBSD: head/contrib/tcpdump/print-ip6.c 162021 2006-09-04 20:25:04Z sam $ |
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-ip6.c,v 1.47.2.2 2005/07/03 20:36:33 hannes Exp $"; | 26 "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.47.2.3 2005/09/20 06:05:38 guy Exp $"; |
27#endif 28 29#ifdef HAVE_CONFIG_H 30#include "config.h" 31#endif 32 33#ifdef INET6 34 --- 78 unchanged lines hidden (view full) --- 113 advance = sizeof(struct ip6_hdr); 114 nh = ip6->ip6_nxt; 115 while (cp < snapend && advance > 0) { 116 cp += advance; 117 len -= advance; 118 119 if (cp == (const u_char *)(ip6 + 1) && 120 nh != IPPROTO_TCP && nh != IPPROTO_UDP && | 27#endif 28 29#ifdef HAVE_CONFIG_H 30#include "config.h" 31#endif 32 33#ifdef INET6 34 --- 78 unchanged lines hidden (view full) --- 113 advance = sizeof(struct ip6_hdr); 114 nh = ip6->ip6_nxt; 115 while (cp < snapend && advance > 0) { 116 cp += advance; 117 len -= advance; 118 119 if (cp == (const u_char *)(ip6 + 1) && 120 nh != IPPROTO_TCP && nh != IPPROTO_UDP && |
121 nh != IPPROTO_SCTP) { | 121 nh != IPPROTO_DCCP && nh != IPPROTO_SCTP) { |
122 (void)printf("%s > %s: ", ip6addr_string(&ip6->ip6_src), 123 ip6addr_string(&ip6->ip6_dst)); 124 } 125 126 switch (nh) { 127 case IPPROTO_HOPOPTS: 128 advance = hbhopt_print(cp); 129 nh = *cp; --- 27 unchanged lines hidden (view full) --- 157 return; 158 case IPPROTO_ROUTING: 159 advance = rt6_print(cp, (const u_char *)ip6); 160 nh = *cp; 161 break; 162 case IPPROTO_SCTP: 163 sctp_print(cp, (const u_char *)ip6, len); 164 return; | 122 (void)printf("%s > %s: ", ip6addr_string(&ip6->ip6_src), 123 ip6addr_string(&ip6->ip6_dst)); 124 } 125 126 switch (nh) { 127 case IPPROTO_HOPOPTS: 128 advance = hbhopt_print(cp); 129 nh = *cp; --- 27 unchanged lines hidden (view full) --- 157 return; 158 case IPPROTO_ROUTING: 159 advance = rt6_print(cp, (const u_char *)ip6); 160 nh = *cp; 161 break; 162 case IPPROTO_SCTP: 163 sctp_print(cp, (const u_char *)ip6, len); 164 return; |
165 case IPPROTO_DCCP: 166 dccp_print(cp, (const u_char *)ip6, len); 167 return; |
|
165 case IPPROTO_TCP: 166 tcp_print(cp, len, (const u_char *)ip6, fragmented); 167 return; 168 case IPPROTO_UDP: 169 udp_print(cp, len, (const u_char *)ip6, fragmented); 170 return; 171 case IPPROTO_ICMPV6: 172 icmp6_print(cp, len, (const u_char *)ip6, fragmented); --- 65 unchanged lines hidden --- | 168 case IPPROTO_TCP: 169 tcp_print(cp, len, (const u_char *)ip6, fragmented); 170 return; 171 case IPPROTO_UDP: 172 udp_print(cp, len, (const u_char *)ip6, fragmented); 173 return; 174 case IPPROTO_ICMPV6: 175 icmp6_print(cp, len, (const u_char *)ip6, fragmented); --- 65 unchanged lines hidden --- |