Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/traceroute Fix build failure, the structure is alre...
details: https://anonhg.NetBSD.org/src/rev/170df92e311c
branches: trunk
changeset: 358850:170df92e311c
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Jan 19 14:30:09 2018 +0000
description:
Fix build failure, the structure is already defined now.
diffstat:
usr.sbin/traceroute/traceroute.c | 37 ++++++++-----------------------------
1 files changed, 8 insertions(+), 29 deletions(-)
diffs (83 lines):
diff -r 77ff29e2998a -r 170df92e311c usr.sbin/traceroute/traceroute.c
--- a/usr.sbin/traceroute/traceroute.c Fri Jan 19 14:15:35 2018 +0000
+++ b/usr.sbin/traceroute/traceroute.c Fri Jan 19 14:30:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: traceroute.c,v 1.83 2016/02/17 19:57:01 christos Exp $ */
+/* $NetBSD: traceroute.c,v 1.84 2018/01/19 14:30:09 maxv Exp $ */
/*
* Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000
@@ -30,7 +30,7 @@
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997,\
1998, 1999, 2000\
The Regents of the University of California. All rights reserved.");
-__RCSID("$NetBSD: traceroute.c,v 1.83 2016/02/17 19:57:01 christos Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.84 2018/01/19 14:30:09 maxv Exp $");
#endif
#endif
@@ -292,34 +292,13 @@
*
* http://www.ietf.org/proceedings/01aug/I-D/draft-ietf-mpls-icmp-02.txt
*/
+#ifdef ICMP_EXT_OFFSET
+#undef ICMP_EXT_OFFSET
+#endif
#define ICMP_EXT_OFFSET 8 /* ICMP type, code, checksum, unused */ + \
128 /* original datagram */
-#define ICMP_EXT_VERSION 2
-/*
- * ICMP extensions, common header
- */
-struct icmp_ext_cmn_hdr {
-#if BYTE_ORDER == BIG_ENDIAN
- unsigned char version:4;
- unsigned char reserved1:4;
-#else
- unsigned char reserved1:4;
- unsigned char version:4;
-#endif
- unsigned char reserved2;
- unsigned short checksum;
-};
-
-/*
- * ICMP extensions, object header
- */
-struct icmp_ext_obj_hdr {
- u_short length;
- u_char class_num;
#define MPLS_STACK_ENTRY_CLASS 1
- u_char c_type;
#define MPLS_STACK_ENTRY_C_TYPE 1
-};
struct mpls_header {
#if BYTE_ORDER == BIG_ENDIAN
@@ -1124,7 +1103,7 @@
static void
decode_extensions(unsigned char *buf, int ip_len)
{
- struct icmp_ext_cmn_hdr *cmn_hdr;
+ struct icmp_ext_hdr *cmn_hdr;
struct icmp_ext_obj_hdr *obj_hdr;
union {
struct mpls_header mpls;
@@ -1136,7 +1115,7 @@
ip = (struct ip *)buf;
if (ip_len < (int)((ip->ip_hl << 2) + ICMP_EXT_OFFSET +
- sizeof(struct icmp_ext_cmn_hdr))) {
+ sizeof(struct icmp_ext_hdr))) {
/*
* No support for ICMP extensions on this host
*/
@@ -1147,7 +1126,7 @@
* Move forward to the start of the ICMP extensions, if present
*/
buf += (ip->ip_hl << 2) + ICMP_EXT_OFFSET;
- cmn_hdr = (struct icmp_ext_cmn_hdr *)buf;
+ cmn_hdr = (struct icmp_ext_hdr *)buf;
if (cmn_hdr->version != ICMP_EXT_VERSION) {
/*
Home |
Main Index |
Thread Index |
Old Index