How to use the ethtool.IFF_RUNNING 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 uyuni-project / uyuni / client / debian / packages-already-in-debian / python-ethtool / pifconfig.py View on Github external
def flags2str(flags):
        string = ""
        if flags & ethtool.IFF_UP:
                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: