Kernel-side infrastructure to implement nvlist-based set/get ifcaps

Reviewed by:	hselasky, jhb, kp (previous version)
Sponsored by:	NVIDIA Networking
MFC after:	3 weeks
Differential revision:	https://reviews.freebsd.org/D32551
This commit is contained in:
Konstantin Belousov 2021-10-17 18:00:34 +03:00 committed by Sebastian Huber
parent 5f0e04113f
commit 66923c7b02

View File

@ -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 */