Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pim6dd sync with recent KAME.
details: https://anonhg.NetBSD.org/src/rev/aacab6a327b9
branches: trunk
changeset: 476009:aacab6a327b9
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Sep 03 04:49:23 1999 +0000
description:
sync with recent KAME.
- added more friendly debugging code
- fix to make assert looser correctly stop forwarding
- fixed SIGHUP support
diffstat:
usr.sbin/pim6dd/LICENSE.pimd | 2 +-
usr.sbin/pim6dd/debug.c | 37 +++++++++++++++++++++++++++++++++++--
usr.sbin/pim6dd/defs.h | 8 +++++---
usr.sbin/pim6dd/mrt.c | 5 +++--
usr.sbin/pim6dd/mrt.h | 5 +++--
usr.sbin/pim6dd/pim6_proto.c | 24 ++++++++++++++++--------
usr.sbin/pim6dd/pim6dd.8 | 2 +-
usr.sbin/pim6dd/pim6dd.conf.5 | 2 +-
usr.sbin/pim6dd/route.c | 21 ++++++++++++++-------
usr.sbin/pim6dd/timer.c | 7 ++++---
usr.sbin/pim6dd/trace.c | 6 +++---
usr.sbin/pim6dd/vif.h | 6 +++---
12 files changed, 89 insertions(+), 36 deletions(-)
diffs (truncated from 465 to 300 lines):
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/LICENSE.pimd
--- a/usr.sbin/pim6dd/LICENSE.pimd Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/LICENSE.pimd Fri Sep 03 04:49:23 1999 +0000
@@ -34,7 +34,7 @@
* Questions concerning this software should be directed to
* Pavlin Ivanov Radoslavov (pavlin%catarina.usc.edu@localhost)
*
- * KAME Id: LICENSE.pimd,v 1.1.1.1 1999/08/08 23:30:50 itojun Exp
+ * $Id: LICENSE.pimd,v 1.3 1999/09/03 04:49:23 itojun Exp $
*/
/*
* Part of this program has been derived from mrouted.
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/debug.c
--- a/usr.sbin/pim6dd/debug.c Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/debug.c Fri Sep 03 04:49:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.3 1999/08/19 17:31:06 itojun Exp $ */
+/* $NetBSD: debug.c,v 1.4 1999/09/03 04:49:23 itojun Exp $ */
/*
* Copyright (c) 1998 by the University of Southern California.
@@ -36,7 +36,7 @@
* Questions concerning this software should be directed to
* Pavlin Ivanov Radoslavov (pavlin%catarina.usc.edu@localhost)
*
- * KAME Id: debug.c,v 1.1.1.1 1999/08/08 23:30:51 itojun Exp
+ * KAME Id: debug.c,v 1.3 1999/08/24 16:45:22 jinmei Exp
*/
/*
* Part of this program has been derived from mrouted.
@@ -199,6 +199,7 @@
if (fp != NULL) {
dump_vifs(fp);
dump_pim_mrt(fp);
+ dump_lcl_grp(fp);
(void) fclose(fp);
}
}
@@ -395,6 +396,7 @@
u_int number_of_groups = 0;
char oifs[(sizeof(if_set)<<3)+1];
char pruned_oifs[(sizeof(if_set)<<3)+1];
+ char asserted_oifs[(sizeof(if_set)<<3)+1];
char leaves_oifs[(sizeof(if_set)<<3)+1];
char filter_oifs[(sizeof(if_set)<<3)+1];
char incoming_iif[(sizeof(if_set)<<3)+1];
@@ -417,6 +419,8 @@
IF_ISSET(vifi, &r->oifs) ? 'o' : '.';
pruned_oifs[vifi] =
IF_ISSET(vifi, &r->pruned_oifs) ? 'p' : '.';
+ asserted_oifs[vifi] =
+ IF_ISSET(vifi, &r->pruned_oifs) ? 'a' : '.';
filter_oifs[vifi] =
IF_ISSET(vifi, &r->filter_oifs) ? 'f' : '.';
leaves_oifs[vifi] =
@@ -445,6 +449,7 @@
fprintf(fp, "\n");
fprintf(fp, "Pruned oifs: %-20s\n", pruned_oifs);
+ fprintf(fp, "Asserted oifs: %-20s\n", pruned_oifs);
fprintf(fp, "Filtered oifs: %-20s\n", filter_oifs);
fprintf(fp, "Leaves oifs: %-20s\n", leaves_oifs);
fprintf(fp, "Outgoing oifs: %-20s\n", oifs);
@@ -466,3 +471,31 @@
fprintf(fp, "Number of Groups: %u\n", number_of_groups);
}
+void
+dump_lcl_grp(fp)
+ FILE *fp;
+{
+ vifi_t vifi;
+ struct uvif *v;
+ struct listaddr *g;
+
+ fprintf(fp, "\nList of local listner information per interface\n");
+ for (vifi = 0, v = uvifs; vifi < numvifs; vifi++, v++) {
+ int first = 1;
+
+ for (g = v->uv_groups; g != NULL; g = g->al_next) {
+ if (first) {
+ fprintf(fp, " Mif %d(%s)\n", vifi, v->uv_name);
+ first = 0;
+ }
+ fprintf(fp, " %s", inet6_fmt(&g->al_addr.sin6_addr));
+ if (g->al_timerid)
+ fprintf(fp, " timeout: %d",
+ timer_leftTimer(g->al_timerid));
+ if (g->al_query)
+ fprintf(fp, " querytimer: %d",
+ timer_leftTimer(g->al_timerid));
+ fputc('\n', fp);
+ }
+ }
+}
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/defs.h
--- a/usr.sbin/pim6dd/defs.h Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/defs.h Fri Sep 03 04:49:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.2 1999/08/19 17:31:06 itojun Exp $ */
+/* $NetBSD: defs.h,v 1.3 1999/09/03 04:49:24 itojun Exp $ */
/*
* Copyright (c) 1998 by the University of Oregon.
@@ -35,7 +35,7 @@
* Questions concerning this software should be directed to
* Kurt Windisch (kurtw%antc.uoregon.edu@localhost)
*
- * KAME Id: defs.h,v 1.1.1.1 1999/08/08 23:30:52 itojun Exp
+ * KAME Id: defs.h,v 1.3 1999/08/24 16:45:23 jinmei Exp
*/
/*
* Part of this program has been derived from PIM sparse-mode pimd.
@@ -330,6 +330,7 @@
extern void cdump __P((int i));
extern void dump_vifs __P((FILE *fp));
extern void dump_pim_mrt __P((FILE *fp));
+extern void dump_lcl_grp __P((FILE *fp));
/* dvmrp_proto.c */
extern void dvmrp_accept_probe __P((u_int32 src, u_int32 dst,
@@ -550,7 +551,8 @@
extern int change_interfaces __P((mrtentry_t *mrtentry_ptr,
vifi_t new_iif,
if_set *new_pruned_oifs,
- if_set *new_leaves_));
+ if_set *new_leaves_,
+ if_set *new_asserted_oifs));
extern void calc_oifs __P((mrtentry_t *mrtentry_ptr,
if_set *oifs_ptr));
extern void process_kernel_call __P((void));
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/mrt.c
--- a/usr.sbin/pim6dd/mrt.c Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/mrt.c Fri Sep 03 04:49:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mrt.c,v 1.2 1999/08/19 17:31:07 itojun Exp $ */
+/* $NetBSD: mrt.c,v 1.3 1999/09/03 04:49:24 itojun Exp $ */
/*
* Copyright (c) 1998 by the University of Oregon.
@@ -35,7 +35,7 @@
* Questions concerning this software should be directed to
* Kurt Windisch (kurtw%antc.uoregon.edu@localhost)
*
- * KAME Id: mrt.c,v 1.1.1.1 1999/08/08 23:30:52 itojun Exp
+ * KAME Id: mrt.c,v 1.2 1999/08/24 10:04:56 jinmei Exp
*/
/*
* Part of this program has been derived from PIM sparse-mode pimd.
@@ -614,6 +614,7 @@
IF_ZERO(&mrtentry_ptr->pruned_oifs);
IF_ZERO(&mrtentry_ptr->oifs);
IF_ZERO(&mrtentry_ptr->filter_oifs);
+ IF_ZERO(&mrtentry_ptr->asserted_oifs);
mrtentry_ptr->upstream = (pim_nbr_entry_t *)NULL;
mrtentry_ptr->metric = 0;
mrtentry_ptr->preference = 0;
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/mrt.h
--- a/usr.sbin/pim6dd/mrt.h Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/mrt.h Fri Sep 03 04:49:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mrt.h,v 1.2 1999/08/19 17:31:07 itojun Exp $ */
+/* $NetBSD: mrt.h,v 1.3 1999/09/03 04:49:24 itojun Exp $ */
/*
* Copyright (c) 1998 by the University of Oregon.
@@ -35,7 +35,7 @@
* Questions concerning this software should be directed to
* Kurt Windisch (kurtw%antc.uoregon.edu@localhost)
*
- * KAME Id: mrt.h,v 1.1.1.1 1999/08/08 23:30:52 itojun Exp
+ * KAME Id: mrt.h,v 1.2 1999/08/24 10:04:56 jinmei Exp
*/
/*
* Part of this program has been derived from PIM sparse-mode pimd.
@@ -171,6 +171,7 @@
if_set oifs; /* The current result oifs */
if_set pruned_oifs; /* The pruned oifs (Prune received) */
+ if_set asserted_oifs; /* The asserted oifs (Lost Assert) */
if_set filter_oifs; /* The filtered oifs */
if_set leaves; /* Has directly connected members */
struct pim_nbr_entry *upstream; /* upstream router, needed because
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/pim6_proto.c
--- a/usr.sbin/pim6dd/pim6_proto.c Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/pim6_proto.c Fri Sep 03 04:49:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pim6_proto.c,v 1.2 1999/08/19 17:31:07 itojun Exp $ */
+/* $NetBSD: pim6_proto.c,v 1.3 1999/09/03 04:49:24 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -63,7 +63,7 @@
* Questions concerning this software should be directed to
* Kurt Windisch (kurtw%antc.uoregon.edu@localhost)
*
- * KAME Id: pim6_proto.c,v 1.2 1999/08/13 06:24:06 jinmei Exp
+ * KAME Id: pim6_proto.c,v 1.3 1999/08/24 10:04:56 jinmei Exp
*/
/*
* Part of this program has been derived from PIM sparse-mode pimd.
@@ -241,7 +241,8 @@
change_interfaces(mrtentry_ptr,
srcentry_ptr->incoming,
&mrtentry_ptr->pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
if(state_change == 1)
trigger_join_alert(mrtentry_ptr);
}
@@ -333,7 +334,8 @@
change_interfaces(mrtentry_ptr,
srcentry_ptr->incoming,
&mrtentry_ptr->pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
if(state_change == -1) {
trigger_prune_alert(mrtentry_ptr);
} else if(state_change == 1) {
@@ -546,7 +548,8 @@
change_interfaces(mrtentry_ptr,
mrtentry_ptr->incoming,
&new_pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
/* Handle transition to negative cache */
if(state_change == -1)
@@ -857,7 +860,8 @@
change_interfaces(mrtentry_ptr,
mrtentry_ptr->incoming,
&new_pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
/* Handle transition to negative cache */
if(state_change == -1)
@@ -1148,6 +1152,7 @@
IF_COPY(&mrtentry_ptr->pruned_oifs, &new_pruned_oifs);
IF_SET(mifi, &new_pruned_oifs);
+ IF_SET(mifi, &mrtentry_ptr->asserted_oifs);
SET_TIMER(mrtentry_ptr->prune_timers[mifi],
PIM_JOIN_PRUNE_HOLDTIME);
@@ -1155,7 +1160,8 @@
change_interfaces(mrtentry_ptr,
mrtentry_ptr->incoming,
&new_pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
/* Handle transition to negative cache */
if(state_change == -1)
@@ -1494,12 +1500,14 @@
/* Add to oiflist (unprune) */
if (IF_ISSET(mifi, &mrtentry_ptr->pruned_oifs)) {
IF_CLR(mifi, &mrtentry_ptr->pruned_oifs);
+ IF_CLR(mifi, &mrtentry_ptr->asserted_oifs);
SET_TIMER(mrtentry_ptr->prune_timers[mifi], 0);
state_change =
change_interfaces(mrtentry_ptr,
mrtentry_ptr->incoming,
&mrtentry_ptr->pruned_oifs,
- &mrtentry_ptr->leaves);
+ &mrtentry_ptr->leaves,
+ &mrtentry_ptr->asserted_oifs);
if(state_change == 1)
trigger_join_alert(mrtentry_ptr);
}
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/pim6dd.8
--- a/usr.sbin/pim6dd/pim6dd.8 Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/pim6dd.8 Fri Sep 03 04:49:23 1999 +0000
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $NetBSD: pim6dd.8,v 1.3 1999/08/19 17:31:07 itojun Exp $
+.\" $NetBSD: pim6dd.8,v 1.4 1999/09/03 04:49:24 itojun Exp $
.\" KAME Id: pim6dd.8,v 1.3 1999/08/13 09:20:43 jinmei Exp
.\"
.Dd Nov 17, 1998
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/pim6dd.conf.5
--- a/usr.sbin/pim6dd/pim6dd.conf.5 Fri Sep 03 04:34:34 1999 +0000
+++ b/usr.sbin/pim6dd/pim6dd.conf.5 Fri Sep 03 04:49:23 1999 +0000
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $NetBSD: pim6dd.conf.5,v 1.2 1999/08/19 17:31:07 itojun Exp $
+.\" $NetBSD: pim6dd.conf.5,v 1.3 1999/09/03 04:49:24 itojun Exp $
.\" KAME Id: pim6dd.conf.5,v 1.1.1.1 1999/08/08 23:30:53 itojun Exp
.\"
.Dd Nov 17, 1998
diff -r 6ab424b49f5e -r aacab6a327b9 usr.sbin/pim6dd/route.c
Home |
Main Index |
Thread Index |
Old Index