[libbsd 5/7] Kernel-side infrastructure to implement nvlist-based set/get ifcaps

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 7 12:02:46 UTC 2022


From: Konstantin Belousov <kib at FreeBSD.org>

Reviewed by:	hselasky, jhb, kp (previous version)
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
---
 rtemsbsd/include/machine/_kernel_if.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/rtemsbsd/include/machine/_kernel_if.h b/rtemsbsd/include/machine/_kernel_if.h
index f89adc13..16733fe3 100644
--- a/rtemsbsd/include/machine/_kernel_if.h
+++ b/rtemsbsd/include/machine/_kernel_if.h
@@ -43,6 +43,18 @@ MALLOC_DECLARE(M_IFMADDR);
 
 extern struct sx ifnet_detach_sxlock;
 
+struct nvlist;
+struct ifcap_nv_bit_name;
+int if_capnv_to_capint(const struct nvlist *nv, int *old_cap,
+    const struct ifcap_nv_bit_name *nn, bool all);
+void if_capint_to_capnv(struct nvlist *nv,
+    const struct ifcap_nv_bit_name *nn, int ifr_cap, int ifr_req);
+struct siocsifcapnv_driver_data {
+	int reqcap;
+	int reqcap2;
+	struct nvlist *nvcap;
+};
+
 #define	ifr_buffer	ifr_ifru.ifru_buffer	/* user supplied buffer with its length */
 #define	ifr_data	ifr_ifru.ifru_data	/* for use by interface */
 
-- 
2.35.3



More information about the devel mailing list