Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102198676
D38201.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38201.diff
View Options
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -345,6 +345,31 @@
return (MCAST_PASS);
}
+/*
+ * Look up an in6_multi record for an IPv6 multicast address
+ * on the interface ifp.
+ * If no record found, return NULL.
+ *
+ * SMPng: The IN6_MULTI_LOCK and must be held and must be in network epoch.
+ */
+struct in6_multi *
+in6m_lookup_locked(struct ifnet *ifp, const struct in6_addr *mcaddr)
+{
+ struct ifmultiaddr *ifma;
+ struct in6_multi *inm;
+
+ NET_EPOCH_ASSERT();
+
+ CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
+ inm = in6m_ifmultiaddr_get_inm(ifma);
+ if (inm == NULL)
+ continue;
+ if (IN6_ARE_ADDR_EQUAL(&inm->in6m_addr, mcaddr))
+ return (inm);
+ }
+ return (NULL);
+}
+
/*
* Find and return a reference to an in6_multi record for (ifp, group),
* and bump its reference count.
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -776,35 +776,13 @@
in6m_ifmultiaddr_get_inm(struct ifmultiaddr *ifma)
{
- NET_EPOCH_ASSERT();
-
return ((ifma->ifma_addr->sa_family != AF_INET6 ||
(ifma->ifma_flags & IFMA_F_ENQUEUED) == 0) ? NULL :
ifma->ifma_protospec);
}
-/*
- * Look up an in6_multi record for an IPv6 multicast address
- * on the interface ifp.
- * If no record found, return NULL.
- *
- * SMPng: The IN6_MULTI_LOCK and must be held and must be in network epoch.
- */
-static __inline struct in6_multi *
-in6m_lookup_locked(struct ifnet *ifp, const struct in6_addr *mcaddr)
-{
- struct ifmultiaddr *ifma;
- struct in6_multi *inm;
-
- CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
- inm = in6m_ifmultiaddr_get_inm(ifma);
- if (inm == NULL)
- continue;
- if (IN6_ARE_ADDR_EQUAL(&inm->in6m_addr, mcaddr))
- return (inm);
- }
- return (NULL);
-}
+struct in6_multi *
+in6m_lookup_locked(struct ifnet *ifp, const struct in6_addr *mcaddr);
/*
* Wrapper for in6m_lookup_locked().
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 8:38 PM (18 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14565479
Default Alt Text
D38201.diff (1 KB)
Attached To
Mode
D38201: IfAPI: Hide the in6m_lookup_locked() implementation.
Attached
Detach File
Event Timeline
Log In to Comment