Contents

ifnet_set_promiscuous

Declaration

errno_t ifnet_set_promiscuous(ifnet_t interface, int on);

Parameters

  • interface:

    The interface to toggle promiscuous mode on.

  • on:

    If set, the number of promicuous on requests will be incremented. If this is the first requrest, promiscuous mode will be enabled. If this is not set, the number of promiscous clients will be decremented. If this causes the number to reach zero, promiscuous mode will be disabled.

Return Value

0 on success otherwise the errno error.

Discussion

Enable or disable promiscuous mode on the interface. The interface keeps an internal count of the number of times promiscuous mode has been enabled. Promiscuous mode is only disabled when this count reaches zero. Be sure to disable promiscuous mode only once for every time you enable it.

See Also

Network Kernel Extensions