Home | History | Annotate | Download | only in netinet6

Lines Matching refs:ifp

93 get_hostid_ifid(struct ifnet *ifp, struct in6_addr *in6)
169 in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6)
181 IFADDR_READER_FOREACH(ifa, ifp) {
188 if (sdl == NULL || ifa == ifp->if_dl || ifa == ifp->if_hwdl) {
193 if (ifa == ifp->if_hwdl)
201 switch (ifp->if_type) {
213 switch (ifp->if_type) {
311 struct ifnet *ifp;
330 IFNET_READER_FOREACH(ifp) {
331 if (ifp == ifp0)
333 if (in6_get_hw_ifid(ifp, in6) != 0)
343 if_name(ifp0), if_name(ifp));
352 if (get_hostid_ifid(ifp, in6) == 0) {
384 in6_ifattach_linklocal(struct ifnet *ifp, struct ifnet *altifp)
398 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
404 if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
408 if (get_ifid(ifp, altifp, &ifra.ifra_addr.sin6_addr) != 0) {
410 "%s: no ifid available\n", if_name(ifp));
414 if (in6_setscope(&ifra.ifra_addr.sin6_addr, ifp, NULL))
428 if ((error = in6_update_ifa(ifp, &ifra, IN6_IFAUPDATE_DADDELAY)) != 0) {
439 if_name(ifp), error);
447 * ifp - must be IFT_LOOP
451 in6_ifattach_loopback(struct ifnet *ifp)
462 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
485 if ((error = in6_update_ifa(ifp, &ifra, 0)) != 0) {
488 if_name(ifp), error);
499 * when ifp == NULL, the caller is responsible for filling scopeid.
502 in6_nigroup(struct ifnet *ifp, const char *name, int namelen,
542 if (in6_setscope(&sa6->sin6_addr, ifp, NULL))
556 in6_ifattach(struct ifnet *ifp, struct ifnet *altifp)
561 KASSERT(IFNET_LOCKED(ifp));
564 switch (ifp->if_type) {
574 ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL;
575 ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED;
584 if (ifp->if_mtu < IPV6_MMTU) {
586 if_name(ifp));
593 switch (ifp->if_type) {
602 ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL;
614 if ((ifp->if_flags & IFF_MULTICAST) == 0) {
617 if_name(ifp));
625 if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
628 if (in6ifa_ifpwithaddr(ifp, &in6) == NULL) {
629 if (in6_ifattach_loopback(ifp) != 0)
637 if (!(ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) &&
638 ND_IFINFO(ifp)->flags & ND6_IFF_AUTO_LINKLOCAL) {
641 ia = in6ifa_ifpforlinklocal_psref(ifp, 0, &psref);
642 if (ia == NULL && in6_ifattach_linklocal(ifp, altifp) != 0) {
644 ifp->if_xname);
657 in6_ifdetach(struct ifnet *ifp)
661 if_purgeaddrs(ifp, AF_INET6, in6_purgeaddr);
663 in6_purge_multi(ifp);
666 ip6_mrouter_detach(ifp);
669 nd6_purge(ifp, NULL);