How to use the ethtool.IFF_PROMISC function in ethtool

To help you get started, we’ve selected a few ethtool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oVirt / vdsm / tests / tcTests.py View on Github external
def testTogglePromisc(self):
        tc.set_promisc(self._bridge.devName, True)
        self.assertTrue(ethtool.get_flags(self._bridge.devName) &
                        ethtool.IFF_PROMISC,
                        "Could not enable promiscuous mode.")

        tc.set_promisc(self._bridge.devName, False)
        self.assertFalse(ethtool.get_flags(self._bridge.devName) &
                         ethtool.IFF_PROMISC,
                         "Could not disable promiscuous mode.")
github uyuni-project / uyuni / client / debian / packages-already-in-debian / python-ethtool / pifconfig.py View on Github external
string += "UP "
        if flags & ethtool.IFF_BROADCAST:
                string += "BROADCAST "
        if flags & ethtool.IFF_DEBUG:
                string += "DEBUG "
        if flags & ethtool.IFF_LOOPBACK:
                string += "LOOPBACK "
        if flags & ethtool.IFF_POINTOPOINT:
                string += "POINTOPOINT "
        if flags & ethtool.IFF_NOTRAILERS:
                string += "NOTRAILERS "
        if flags & ethtool.IFF_RUNNING:
                string += "RUNNING "
        if flags & ethtool.IFF_NOARP:
                string += "NOARP "
        if flags & ethtool.IFF_PROMISC:
                string += "PROMISC "
        if flags & ethtool.IFF_ALLMULTI:
                string += "ALLMULTI "
        if flags & ethtool.IFF_MASTER:
                string += "MASTER "
        if flags & ethtool.IFF_SLAVE:
                string += "SLAVE "
        if flags & ethtool.IFF_MULTICAST:
                string += "MULTICAST "
        if flags & ethtool.IFF_PORTSEL:
                string += "PORTSEL "
        if flags & ethtool.IFF_AUTOMEDIA:
                string += "AUTOMEDIA "
        if flags & ethtool.IFF_DYNAMIC:
                string += "DYNAMIC "