Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/pim6sd $KAME$ cleanup. address PR 11615 (CMSG_SPAC...



details:   https://anonhg.NetBSD.org/src/rev/887aad0892ae
branches:  trunk
changeset: 500042:887aad0892ae
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Dec 04 07:09:35 2000 +0000

description:
$KAME$ cleanup.  address PR 11615 (CMSG_SPACE should be CMSG_LEN).
lots of stabilization/spec cleanup.  sync with kame.

diffstat:

 usr.sbin/pim6sd/BUGS.TODO     |    2 +-
 usr.sbin/pim6sd/LICENSE.pimd  |    5 +-
 usr.sbin/pim6sd/README        |    2 +-
 usr.sbin/pim6sd/callout.c     |    6 +-
 usr.sbin/pim6sd/callout.h     |    5 +-
 usr.sbin/pim6sd/cfparse.h     |    3 +-
 usr.sbin/pim6sd/cfparse.y     |   23 ++-
 usr.sbin/pim6sd/cftoken.l     |    3 +-
 usr.sbin/pim6sd/config.c      |   35 ++++--
 usr.sbin/pim6sd/config.h      |    3 +-
 usr.sbin/pim6sd/crc.c         |    3 +-
 usr.sbin/pim6sd/crc.h         |    3 +-
 usr.sbin/pim6sd/debug.c       |   45 ++++++-
 usr.sbin/pim6sd/debug.h       |    6 +-
 usr.sbin/pim6sd/defs.h        |    5 +-
 usr.sbin/pim6sd/inet6.c       |    9 +-
 usr.sbin/pim6sd/inet6.h       |    4 +-
 usr.sbin/pim6sd/kern.c        |   19 ++-
 usr.sbin/pim6sd/kern.h        |    5 +-
 usr.sbin/pim6sd/main.c        |   28 ++++-
 usr.sbin/pim6sd/mld6.c        |   33 +++--
 usr.sbin/pim6sd/mld6.h        |    8 +-
 usr.sbin/pim6sd/mld6_proto.c  |   11 +-
 usr.sbin/pim6sd/mld6_proto.h  |    5 +-
 usr.sbin/pim6sd/mrt.c         |   16 ++-
 usr.sbin/pim6sd/mrt.h         |   35 ++----
 usr.sbin/pim6sd/pathnames.h   |    5 +-
 usr.sbin/pim6sd/pim6.c        |   15 +-
 usr.sbin/pim6sd/pim6.h        |   11 +-
 usr.sbin/pim6sd/pim6_proto.c  |  240 ++++++++++++++++++++++++++++++++++-------
 usr.sbin/pim6sd/pim6_proto.h  |    6 +-
 usr.sbin/pim6sd/pim6sd.8      |   14 +-
 usr.sbin/pim6sd/pim6sd.conf.5 |    6 +-
 usr.sbin/pim6sd/pim6stat.1    |    7 +-
 usr.sbin/pim6sd/pimd.h        |   11 +-
 usr.sbin/pim6sd/route.c       |   90 +++++++++------
 usr.sbin/pim6sd/route.h       |    5 +-
 usr.sbin/pim6sd/routesock.c   |    7 +-
 usr.sbin/pim6sd/routesock.h   |    3 +-
 usr.sbin/pim6sd/rp.c          |   27 +++-
 usr.sbin/pim6sd/rp.h          |    6 +-
 usr.sbin/pim6sd/timer.c       |   32 ++++-
 usr.sbin/pim6sd/timer.h       |    3 +-
 usr.sbin/pim6sd/trace.c       |   20 +-
 usr.sbin/pim6sd/trace.h       |    5 +-
 usr.sbin/pim6sd/var.h         |    6 +-
 usr.sbin/pim6sd/vers.c        |    3 +-
 usr.sbin/pim6sd/vif.c         |   15 ++-
 usr.sbin/pim6sd/vif.h         |   14 +--
 usr.sbin/pim6sd/vmbuf.h       |    5 +-
 50 files changed, 585 insertions(+), 293 deletions(-)

diffs (truncated from 2140 to 300 lines):

diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/BUGS.TODO
--- a/usr.sbin/pim6sd/BUGS.TODO Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/BUGS.TODO Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,4 @@
-KAME Id: BUGS.TODO,v 1.1.1.1 1999/08/08 23:30:57 itojun Exp
+$KAME: BUGS.TODO,v 1.2 2000/07/24 01:00:28 itojun Exp $
 
 THIS LIST IS FAR AWAY FROM BEING COMPLETE, so these are the few things 
 that came up at the right moment to be written down.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/LICENSE.pimd
--- a/usr.sbin/pim6sd/LICENSE.pimd      Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/LICENSE.pimd      Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,7 @@
 /*
+/*     $NetBSD: LICENSE.pimd,v 1.2 2000/12/04 07:09:35 itojun Exp $    */
+/*     $KAME: LICENSE.pimd,v 1.2 2000/07/24 01:00:28 itojun Exp $      */
+
  *  Copyright (c) 1998 by the University of Southern California.
  *  All rights reserved.
  *
@@ -33,8 +36,6 @@
 /*
  *  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:57 itojun Exp
  */
 /*
  * Part of this program has been derived from mrouted.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/README
--- a/usr.sbin/pim6sd/README    Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/README    Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,4 @@
-KAME Id: README,v 1.1.1.1 1999/08/08 23:30:57 itojun Exp
+$KAME: README,v 1.2 2000/07/24 01:00:28 itojun Exp $
 
 WARNING! WARNING! WARNING!
 THIS RELEASE IS VERY ALPHA, SO PLEASE DO NOT REDISTRIBUTE AND
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/callout.c
--- a/usr.sbin/pim6sd/callout.c Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/callout.c Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: callout.c,v 1.1 2000/01/28 19:32:46 itojun Exp $       */
+/*     $NetBSD: callout.c,v 1.2 2000/12/04 07:09:35 itojun Exp $       */
+/*     $KAME: callout.c,v 1.6 2000/12/04 06:45:28 itojun Exp $ */
 
 /*
  * The mrouted program is covered by the license in the accompanying file
@@ -32,8 +33,9 @@
 #include <stdio.h>
 #include <syslog.h>
 #include <stdlib.h>
+#include <unistd.h>
+#include "defs.h"
 #include "debug.h"
-#include "defs.h"
 #include "callout.h"
 
 /* the code below implements a callout queue */
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/callout.h
--- a/usr.sbin/pim6sd/callout.h Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/callout.h Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: callout.h,v 1.1 2000/01/28 19:32:46 itojun Exp $       */
+/*     $NetBSD: callout.h,v 1.2 2000/12/04 07:09:35 itojun Exp $       */
+/*     $KAME: callout.h,v 1.4 2000/12/04 06:45:28 itojun Exp $ */
 
 /*
  * Copyright (C) 1999 LSIIT Laboratory.
@@ -50,8 +51,6 @@
 #ifndef CALLOUT_H
 #define CALLOUT_H
 
-#include "defs.h"
-
 extern void     callout_init      __P((void));
 extern void     free_all_callouts __P((void));
 extern void     age_callout_queue __P((int));
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/cfparse.h
--- a/usr.sbin/pim6sd/cfparse.h Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/cfparse.h Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: cfparse.h,v 1.1 2000/01/28 19:32:46 itojun Exp $       */
+/*     $NetBSD: cfparse.h,v 1.2 2000/12/04 07:09:35 itojun Exp $       */
+/*     $KAME: cfparse.h,v 1.2 2000/12/04 06:45:28 itojun Exp $ */
 
 /*
  * Copyright (C) 1999 WIDE Project.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/cfparse.y
--- a/usr.sbin/pim6sd/cfparse.y Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/cfparse.y Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: cfparse.y,v 1.2 2000/05/19 10:43:46 itojun Exp $       */
+/*     $NetBSD: cfparse.y,v 1.3 2000/12/04 07:09:35 itojun Exp $       */
+/*     $KAME: cfparse.y,v 1.13 2000/12/04 06:45:28 itojun Exp $        */
 
 /*
  * Copyright (C) 1999 WIDE Project.
@@ -30,17 +31,21 @@
  */
 %{
 #include <sys/types.h>
-
+#include <sys/socket.h>
+#include <net/if.h>
+#include <net/route.h>
 #include <netinet/in.h>
-
+#include <netinet/ip_mroute.h>
+#include <netinet6/ip6_mroute.h>
 #include <arpa/inet.h>
-
 #include <string.h>
 #include <syslog.h>
+#include <stdio.h>
 
 #include "defs.h"
+#include "vif.h"
+#include "mrt.h"
 #include "rp.h"
-#include "vif.h"
 
 #include "var.h"
 #include "vmbuf.h"
@@ -641,6 +646,10 @@
                }
        }
 
+       /* IPv6 PIM needs one global unicast address (at least for now) */
+       if (max_global_address() == NULL)
+               log(LOG_ERR, 0, "There's no global address available");
+
        return(0);
 }
 
@@ -689,7 +698,7 @@
        }
 
        if (!sa6_rp)
-               sa6_rp = max_global_address(); /* this MUST suceed */
+               sa6_rp = max_global_address(); /* this MUST succeed */
        my_cand_rp_address = *sa6_rp;
 
        /*
@@ -790,7 +799,7 @@
        }
 
        if (!sa6_bsr)
-               sa6_bsr = max_global_address(); /* this MUST suceed */
+               sa6_bsr = max_global_address(); /* this MUST succeed */
        my_bsr_address = *sa6_bsr;
        MASKLEN_TO_MASK6(my_bsr_hash_masklen, my_bsr_hash_mask);
 
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/cftoken.l
--- a/usr.sbin/pim6sd/cftoken.l Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/cftoken.l Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: cftoken.l,v 1.3 2000/10/06 00:13:02 itojun Exp $       */
+/*     $NetBSD: cftoken.l,v 1.4 2000/12/04 07:09:35 itojun Exp $       */
+/*     $KAME: cftoken.l,v 1.8 2000/12/04 06:45:29 itojun Exp $ */
 
 %{
 /*
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/config.c
--- a/usr.sbin/pim6sd/config.c  Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/config.c  Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: config.c,v 1.3 2000/05/19 10:43:47 itojun Exp $        */
+/*     $NetBSD: config.c,v 1.4 2000/12/04 07:09:35 itojun Exp $        */
+/*     $KAME: config.c,v 1.22 2000/12/04 06:45:29 itojun Exp $ */
 
 /*
  *  Copyright (c) 1998 by the University of Southern California.
@@ -59,29 +60,39 @@
  */
 
 
+#include <sys/types.h>
 #include <sys/ioctl.h>
-#include <syslog.h>
-#include <stdlib.h>
-#include "vif.h"
-#include "pim6.h"
-#include "inet6.h"
-#include "rp.h"
-#include "pimd.h"
-#include "timer.h"
-#include "route.h"
+#include <sys/socket.h>
+#include <sys/queue.h>
+#include <net/if.h>
 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
 #include <net/if_var.h>
 #endif
+#include <net/route.h>
+#include <netinet/in.h>
+#include <netinet/ip_mroute.h>
+#include <netinet6/ip6_mroute.h>
 #include <netinet6/in6_var.h>
+#include <arpa/inet.h>
+#include <syslog.h>
+#include <stdlib.h>
 #ifdef HAVE_GETIFADDRS
 #include <ifaddrs.h>
 #endif 
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
+#include <stdio.h>
+#include "defs.h"
 #include "config.h"
-#include <arpa/inet.h>
-#include <stdio.h>
+#include "vif.h"
+#include "pim6.h"
+#include "inet6.h"
+#include "mrt.h"
+#include "rp.h"
+#include "pimd.h"
+#include "timer.h"
+#include "route.h"
 #include "debug.h"
 
 void add_phaddr(struct uvif *v, struct sockaddr_in6 *addr,
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/config.h
--- a/usr.sbin/pim6sd/config.h  Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/config.h  Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: config.h,v 1.1 2000/01/28 19:32:47 itojun Exp $        */
+/*     $NetBSD: config.h,v 1.2 2000/12/04 07:09:35 itojun Exp $        */
+/*     $KAME: config.h,v 1.4 2000/12/04 06:45:29 itojun Exp $  */
 
 /*
  * Copyright (C) 1999 LSIIT Laboratory.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/crc.c
--- a/usr.sbin/pim6sd/crc.c     Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/crc.c     Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: crc.c,v 1.1 2000/01/28 19:32:47 itojun Exp $   */
+/*     $NetBSD: crc.c,v 1.2 2000/12/04 07:09:35 itojun Exp $   */
+/*     $KAME: crc.c,v 1.4 2000/12/04 06:45:29 itojun Exp $     */
 
 /*
  * Copyright (C) 1999 LSIIT Laboratory.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/crc.h
--- a/usr.sbin/pim6sd/crc.h     Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/crc.h     Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: crc.h,v 1.1 2000/01/28 19:32:47 itojun Exp $   */
+/*     $NetBSD: crc.h,v 1.2 2000/12/04 07:09:35 itojun Exp $   */
+/*     $KAME: crc.h,v 1.4 2000/12/04 06:45:29 itojun Exp $     */
 
 /*
  * Copyright (C) 1999 LSIIT Laboratory.
diff -r 1837436a2596 -r 887aad0892ae usr.sbin/pim6sd/debug.c
--- a/usr.sbin/pim6sd/debug.c   Mon Dec 04 07:05:47 2000 +0000
+++ b/usr.sbin/pim6sd/debug.c   Mon Dec 04 07:09:35 2000 +0000
@@ -1,4 +1,5 @@
-/*     $NetBSD: debug.c,v 1.6 2000/10/12 06:33:23 augustss Exp $       */
+/*     $NetBSD: debug.c,v 1.7 2000/12/04 07:09:35 itojun Exp $ */
+/*     $KAME: debug.c,v 1.44 2000/12/04 06:45:29 itojun Exp $  */
 
 /*
  *  Copyright (c) 1998 by the University of Southern California.
@@ -58,21 +59,22 @@
  *
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/time.h>
-#include <errno.h>
+#include <net/if.h>
 #include <net/route.h>
 #include <netinet/in.h>
 #include <netinet/ip_mroute.h>
 #include <netinet/icmp6.h>
+#include <netinet6/ip6_mroute.h>
 #include <netinet6/pim6.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+#include "defs.h"
 #include "pathnames.h"
-#include "defs.h"
 #include "pimd.h"
 #include "debug.h"
 #include "mrt.h"
@@ -512,6 +514,7 @@
        struct uvif *v;
        vifi_t vifi;
        pim_nbr_entry_t *n;
+       struct phaddr *pa;
 
        fprintf(fp, "PIM Neighbor List\n");
        fprintf(fp, " %-3s %6s %-40s %-5s\n",



Home | Main Index | Thread Index | Old Index