Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166788530
D39493.id120112.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
809 B
Referenced Files
None
Subscribers
None
D39493.id120112.diff
View Options
diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4675,6 +4675,22 @@
return (count);
}
+u_int
+if_maddr_count(if_t ifp)
+{
+ struct epoch_tracker et;
+ struct ifmultiaddr *ifma;
+ u_int count;
+
+ count = 0;
+ NET_EPOCH_ENTER(et);
+ CK_STAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link)
+ count++;
+ NET_EPOCH_EXIT(et);
+
+ return (count);
+}
+
u_int
if_foreach_llmaddr(if_t ifp, iflladdr_cb_t cb, void *cb_arg)
{
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -656,6 +656,7 @@
u_int if_foreach_llmaddr(if_t, iflladdr_cb_t, void *);
u_int if_lladdr_count(if_t);
u_int if_llmaddr_count(if_t);
+u_int if_maddr_count(if_t ifp);
int if_getamcount(const if_t ifp);
struct ifaddr * if_getifaddr(const if_t ifp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 17, 4:07 PM (7 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36858996
Default Alt Text
D39493.id120112.diff (809 B)
Attached To
Mode
D39493: IfAPI: Add if_maddr_empty() to check for any maddrs
Attached
Detach File
Event Timeline
Log In to Comment