Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/traceroute6 Remove dead code.



details:   https://anonhg.NetBSD.org/src/rev/c720ff9efe1d
branches:  trunk
changeset: 318428:c720ff9efe1d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Apr 23 09:58:35 2018 +0000
description:
Remove dead code.

diffstat:

 usr.sbin/traceroute6/traceroute6.c |  25 ++-----------------------
 1 files changed, 2 insertions(+), 23 deletions(-)

diffs (53 lines):

diff -r fe7339c23ebf -r c720ff9efe1d usr.sbin/traceroute6/traceroute6.c
--- a/usr.sbin/traceroute6/traceroute6.c        Mon Apr 23 09:47:03 2018 +0000
+++ b/usr.sbin/traceroute6/traceroute6.c        Mon Apr 23 09:58:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: traceroute6.c,v 1.46 2018/04/23 09:47:03 maxv Exp $    */
+/*     $NetBSD: traceroute6.c,v 1.47 2018/04/23 09:58:35 maxv Exp $    */
 /*     $KAME: traceroute6.c,v 1.67 2004/01/25 03:24:39 itojun Exp $    */
 
 /*
@@ -75,7 +75,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: traceroute6.c,v 1.46 2018/04/23 09:47:03 maxv Exp $");
+__RCSID("$NetBSD: traceroute6.c,v 1.47 2018/04/23 09:58:35 maxv Exp $");
 #endif
 #endif
 
@@ -319,9 +319,6 @@
 #endif
 static void send_probe(int, u_long);
 static struct udphdr *get_udphdr(struct ip6_hdr *, u_char *);
-#if 0
-static int get_hoplim(struct msghdr *);
-#endif
 static double deltaT(struct timeval *, struct timeval *);
 static const char *pr_type(int);
 static int packet_ok(struct msghdr *, ssize_t, int);
@@ -915,24 +912,6 @@
        }
 }
 
-#if 0
-static int
-get_hoplim(struct msghdr *mhdr)
-{
-       struct cmsghdr *cm;
-
-       for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(mhdr); cm;
-           cm = (struct cmsghdr *)CMSG_NXTHDR(mhdr, cm)) {
-               if (cm->cmsg_level == IPPROTO_IPV6 &&
-                   cm->cmsg_type == IPV6_HOPLIMIT &&
-                   cm->cmsg_len == CMSG_LEN(sizeof(int)))
-                       return *(int *)CMSG_DATA(cm);
-       }
-
-       return -1;
-}
-#endif
-
 static double
 deltaT(struct timeval *t1p, struct timeval *t2p)
 {



Home | Main Index | Thread Index | Old Index