Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pim6sd Eliminate a bunch more // annotations.
details: https://anonhg.NetBSD.org/src/rev/d00eb4c7fc8d
branches: trunk
changeset: 495179:d00eb4c7fc8d
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sun Jul 23 23:05:38 2000 +0000
description:
Eliminate a bunch more // annotations.
diffstat:
usr.sbin/pim6sd/main.c | 6 +++-
usr.sbin/pim6sd/route.c | 4 +-
usr.sbin/pim6sd/routesock.c | 4 +-
usr.sbin/pim6sd/rp.c | 56 +++++++++++++++++++++-----------------------
4 files changed, 35 insertions(+), 35 deletions(-)
diffs (158 lines):
diff -r a8e9508f0b49 -r d00eb4c7fc8d usr.sbin/pim6sd/main.c
--- a/usr.sbin/pim6sd/main.c Sun Jul 23 22:59:56 2000 +0000
+++ b/usr.sbin/pim6sd/main.c Sun Jul 23 23:05:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.2 2000/05/19 10:43:48 itojun Exp $ */
+/* $NetBSD: main.c,v 1.3 2000/07/23 23:05:38 mycroft Exp $ */
/*
* Copyright (c) 1998 by the University of Southern California.
@@ -375,7 +375,9 @@
#ifdef LOG_DAEMON
(void) openlog("pim6sd", LOG_PID, LOG_DAEMON);
-// (void) setlogmask(LOG_UPTO(LOG_NOTICE));
+#if 0
+ (void) setlogmask(LOG_UPTO(LOG_NOTICE));
+#endif
#else
(void) openlog("pim6sd", LOG_PID);
#endif /* LOG_DAEMON */
diff -r a8e9508f0b49 -r d00eb4c7fc8d usr.sbin/pim6sd/route.c
--- a/usr.sbin/pim6sd/route.c Sun Jul 23 22:59:56 2000 +0000
+++ b/usr.sbin/pim6sd/route.c Sun Jul 23 23:05:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.1 2000/01/28 19:32:50 itojun Exp $ */
+/* $NetBSD: route.c,v 1.2 2000/07/23 23:05:38 mycroft Exp $ */
/*
* Copyright (c) 1998 by the University of Southern California.
@@ -993,8 +993,8 @@
else
rp_addr = mrtentry_ptr->group->rpaddr;
mfc_source = source;
+#ifdef KERNEL_MFC_WC_G
// TODO
-#ifdef KERNEL_MFC_WC_G
if (mrtentry_ptr->flags & (MRTF_WC | MRTF_PMBR))
if (!(mrtentry_ptr->flags & MRTF_MFC_CLONE_SG))
mfc_source = IN6ADDR_ANY_N;
diff -r a8e9508f0b49 -r d00eb4c7fc8d usr.sbin/pim6sd/routesock.c
--- a/usr.sbin/pim6sd/routesock.c Sun Jul 23 22:59:56 2000 +0000
+++ b/usr.sbin/pim6sd/routesock.c Sun Jul 23 23:05:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: routesock.c,v 1.1 2000/01/28 19:32:51 itojun Exp $ */
+/* $NetBSD: routesock.c,v 1.2 2000/07/23 23:05:38 mycroft Exp $ */
/*
* Copyright (c) 1998 by the University of Southern California.
@@ -134,8 +134,8 @@
log(LOG_ERR, 0, "\n Routing socket error");
return -1;
}
+#if 0
// TODO : UTILITY ?
-#if 0
{
int off;
diff -r a8e9508f0b49 -r d00eb4c7fc8d usr.sbin/pim6sd/rp.c
--- a/usr.sbin/pim6sd/rp.c Sun Jul 23 22:59:56 2000 +0000
+++ b/usr.sbin/pim6sd/rp.c Sun Jul 23 23:05:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rp.c,v 1.2 2000/05/19 10:43:51 itojun Exp $ */
+/* $NetBSD: rp.c,v 1.3 2000/07/23 23:05:38 mycroft Exp $ */
/*
* Copyright (C) 1999 LSIIT Laboratory.
@@ -195,11 +195,13 @@
u_int16
bootstrap_initial_delay()
{
-// long AddrDelay;
-// long Delay;
-// long log_mask;
-// int log_of_2;
-// u_int8 bestPriority;
+#if 0
+ long AddrDelay;
+ long Delay;
+ long log_mask;
+ int log_of_2;
+ u_int8 bestPriority;
+#endif
/*
* The bootstrap timer initial value (if Cand-BSR). It depends of the
@@ -212,52 +214,48 @@
* 2 - (myAddr/2^31);
*/
-// bestPriority = max(curr_bsr_priority, my_bsr_priority);
-// if (bestPriority == my_bsr_priority)
- // {
-// AddrDelay = ntohl(curr_bsr_address) - ntohl(my_bsr_address);
+#if 0
+ bestPriority = max(curr_bsr_priority, my_bsr_priority);
+ if (bestPriority == my_bsr_priority)
+ {
+ AddrDelay = ntohl(curr_bsr_address) - ntohl(my_bsr_address);
/* Calculate the integer part of log_2 of (bestAddr - myAddr) */
/*
* To do so, have to find the position number of the first bit from
* left which is `1`
*/
-// log_mask = sizeof(AddrDelay) << 3;
-// log_mask = (1 << (log_mask - 1)); /* Set the leftmost bit to
-// * `1` */
-/* for (log_of_2 = (sizeof(AddrDelay) << 3) - 1; log_of_2; log_of_2--)
+ log_mask = sizeof(AddrDelay) << 3;
+ log_mask = (1 << (log_mask - 1)); /* Set the leftmost bit to
+ * `1` */
+ for (log_of_2 = (sizeof(AddrDelay) << 3) - 1; log_of_2; log_of_2--)
{
if (AddrDelay & log_mask)
break;
else
-*/
-// log_mask >>= 1; /* Start shifting `1` on right */
-/* }
+ log_mask >>= 1; /* Start shifting `1` on right */
+ }
AddrDelay = log_of_2 / 16;
}
else
AddrDelay = 2 - (ntohl(my_bsr_address) / (1 << 31));
Delay = 1 + bestPriority - my_bsr_priority;
- */
- /* Calculate log_2(Delay) */
-// log_mask = sizeof(Delay) << 3;
-// log_mask = (1 << (log_mask - 1));
-/* Set the leftmost bit to `1`
-*/
+ /* Calculate log_2(Delay) */
+ /* Set the leftmost bit to `1` */
+ log_mask = sizeof(Delay) << 3;
+ log_mask = (1 << (log_mask - 1));
- /* for (log_of_2 = (sizeof(Delay) << 3) - 1; log_of_2; log_of_2--)
+ for (log_of_2 = (sizeof(Delay) << 3) - 1; log_of_2; log_of_2--)
{
if (Delay & log_mask)
break;
else
-*/
-// log_mask >>= 1; /* Start shifting `1` on right */
-
-/* }
+ log_mask >>= 1; /* Start shifting `1` on right */
+ }
Delay = 5 + 2 * Delay + AddrDelay;
return (u_int16) Delay;
-*/
+#endif
/* Temporary implementation */
return (RANDOM()%my_bsr_period);
Home |
Main Index |
Thread Index |
Old Index