aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2023-01-23 14:34:43 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2023-01-31 20:02:15 +0000
commit30af2c131bb05528f9b14518a7ed3e98c590b55e (patch)
tree56e394b45aea65c0d13c4d56f612f9db6156acbb /sys/net/if.c
parent113af4fd2bcb464307daf8ca053dc728db8da61d (diff)
downloadsrc-30af2c131bb05528f9b14518a7ed3e98c590b55e.tar.gz
src-30af2c131bb05528f9b14518a7ed3e98c590b55e.zip
IfAPI: Add if_get/setmaclabel() and use it.
Summary: Port the MAC modules to use the IfAPI APIs as part of this. Sponsored by: Juniper Networks, Inc. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D38197
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 96093d0a2aa3..a6cf6d050875 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4809,6 +4809,18 @@ if_setdebugnet_methods(if_t ifp, struct debugnet_methods *m)
ifp->if_debugnet_methods = m;
}
+struct label *
+if_getmaclabel(if_t ifp)
+{
+ return (ifp->if_label);
+}
+
+void
+if_setmaclabel(if_t ifp, struct label *label)
+{
+ ifp->if_label = label;
+}
+
int
if_gettype(if_t ifp)
{