IONetworkGetPacketFiltersMask

Function IONetworkGetPacketFiltersMask 

Source
pub unsafe extern "C-unwind" fn IONetworkGetPacketFiltersMask(
    connect: io_connect_t,
    filter_group: *mut [c_char; 128],
    filters_mask: *mut u32,
    options: IOOptionBits,
) -> IOReturn
Available on crate features libc and network only.
Expand description

Get the packet filters for a given filter group.

A network controller may support a number of packets filters that can accept or reject a type of packet seen on the network. A filter group identifies a set of related filters, such as all filters that will allow a packet to pass upstream based on the destination address encoded within the packet. This function allows an user-space program to get the filtering performed by a given filter group.

Parameter connect: The connection object returned from IONetworkOpen().

Parameter filterGroup: The name of the packet filter group.

Parameter filtersMask: Pointer to the return value containing a mask of packet filters.

Parameter options: kIONetworkSupportedPacketFilters may be set to fetch the filters that are supported by the hardware.

Returns: An IOReturn error code.

ยงSafety

  • filter_group Array TODO.
  • filters_mask must be a valid pointer.