Contents

ifnet_set_capabilities_supported

Declaration

errno_t ifnet_set_capabilities_supported(ifnet_t interface, u_int32_t new_caps, u_int32_t mask);

Parameters

  • interface:

    Interface to set the capabilities on.

  • new_caps:

    The value of the capabilities that should be set or unset. These flags are defined in net/if.h

  • mask:

    Which capabilities that should be affected. These flags are defined in net/if.h

Return Value

0 on success otherwise the errno error.

Discussion

This function lets you specify which capabilities are supported by the interface. Typically this function is called by the driver when the interface gets attached to the system. The mask allows to control which capability to set or unset. The kernel will effectively take the lock, then set the interface's flags to (if_capabilities & ~mask) | (new_caps & mask).

This function is intended to be called by the driver. A kext must not call this function on an interface the kext does not own.

See Also

Network Kernel Extensions