[BACK]Return to in6_ifattach.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet6

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet6/in6_ifattach.c between version 1.30.4.2 and 1.31

version 1.30.4.2, 2003/08/05 12:50:09 version 1.31, 2000/10/01 10:56:02
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
 /*      $KAME: in6_ifattach.c,v 1.56 2000/05/05 06:54:33 itojun Exp $   */  /*      $KAME: in6_ifattach.c,v 1.67 2000/10/01 10:51:54 itojun Exp $   */
   
 /*  /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.   * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Line 51 
Line 51 
 #include <netinet6/in6_ifattach.h>  #include <netinet6/in6_ifattach.h>
 #include <netinet6/ip6_var.h>  #include <netinet6/ip6_var.h>
 #include <netinet6/nd6.h>  #include <netinet6/nd6.h>
 #include <netinet6/ip6_mroute.h>  
   
 #include <net/net_osdep.h>  #include <net/net_osdep.h>
   
Line 270  get_ifid(ifp0, altifp, in6)
Line 269  get_ifid(ifp0, altifp, in6)
         if (altifp && get_hw_ifid(altifp, in6) == 0) {          if (altifp && get_hw_ifid(altifp, in6) == 0) {
 #ifdef ND6_DEBUG  #ifdef ND6_DEBUG
                 printf("%s: got interface identifier from %s\n",                  printf("%s: got interface identifier from %s\n",
                     if_name(ifp0), ifname(altifp));                      if_name(ifp0), if_name(altifp));
 #endif  #endif
                 goto success;                  goto success;
         }          }
Line 306  get_ifid(ifp0, altifp, in6)
Line 305  get_ifid(ifp0, altifp, in6)
                 goto success;                  goto success;
         }          }
   
         printf("%s: failed to get interface identifier", if_name(ifp0));          printf("%s: failed to get interface identifier\n", if_name(ifp0));
         return -1;          return -1;
   
 success:  success:
Line 662  in6_ifattach(ifp, altifp)
Line 661  in6_ifattach(ifp, altifp)
                 ia = in6ifa_ifpforlinklocal(ifp, 0);                  ia = in6ifa_ifpforlinklocal(ifp, 0);
   
                 if (ia == NULL) {                  if (ia == NULL) {
                         printf("%s: failed to add link-local address",                          printf("%s: failed to add link-local address\n",
                             if_name(ifp));                              if_name(ifp));
   
                         /* we can't initialize multicasts without link-local */                          /* we can't initialize multicasts without link-local */
Line 802  in6_ifdetach(ifp)
Line 801  in6_ifdetach(ifp)
         /* nuke prefix list.  this may try to remove some of ifaddrs as well */          /* nuke prefix list.  this may try to remove some of ifaddrs as well */
         in6_purgeprefix(ifp);          in6_purgeprefix(ifp);
   
         /* remove ip6_mrouter stuff */  
         ip6_mrouter_detach(ifp);  
   
         /* remove neighbor management table */          /* remove neighbor management table */
         nd6_purge(ifp);          nd6_purge(ifp);
   
Line 877  in6_ifdetach(ifp)
Line 873  in6_ifdetach(ifp)
         sin6.sin6_family = AF_INET6;          sin6.sin6_family = AF_INET6;
         sin6.sin6_addr = in6addr_linklocal_allnodes;          sin6.sin6_addr = in6addr_linklocal_allnodes;
         sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);          sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
         rt = rtalloc1((struct sockaddr *)&sin6, 0);          if ((rt = rtalloc1((struct sockaddr *)&sin6, 0)) != NULL) {
         if (rt && rt->rt_ifp == ifp) {  
                 rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt),                  rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt),
                         rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);                          rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);
                 rtfree(rt);                  rtfree(rt);

Legend:
Removed from v.1.30.4.2  
changed lines
  Added in v.1.31

CVSweb <webmaster@jp.NetBSD.org>