Created
August 20, 2015 16:08
-
-
Save codecaffeine/97adab97839c75ef1be9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct NetworkInterfaceFlags : OptionSetType { | |
let rawValue: UInt | |
static let None = NetworkInterfaceFlags(rawValue: 0) | |
static let Up = NetworkInterfaceFlags(rawValue: 1 << 0) | |
static let Broadcast = NetworkInterfaceFlags(rawValue: 1 << 1) | |
static let Debug = NetworkInterfaceFlags(rawValue: 1 << 2) | |
static let Loopback = NetworkInterfaceFlags(rawValue: 1 << 3) | |
static let PointToPoint = NetworkInterfaceFlags(rawValue: 1 << 4) | |
static let Smart = NetworkInterfaceFlags(rawValue: 1 << 5) | |
static let Running = NetworkInterfaceFlags(rawValue: 1 << 6) | |
static let NoARP = NetworkInterfaceFlags(rawValue: 1 << 7) | |
static let Promisc = NetworkInterfaceFlags(rawValue: 1 << 8) | |
static let AllMulti = NetworkInterfaceFlags(rawValue: 1 << 9) | |
static let OActive = NetworkInterfaceFlags(rawValue: 1 << 10) | |
static let Simplex = NetworkInterfaceFlags(rawValue: 1 << 11) | |
static let Link0 = NetworkInterfaceFlags(rawValue: 1 << 12) | |
static let Link1 = NetworkInterfaceFlags(rawValue: 1 << 13) | |
static let Link2 = NetworkInterfaceFlags(rawValue: 1 << 14) | |
static let Multicast = NetworkInterfaceFlags(rawValue: 1 << 15) | |
static let AltPhys = Link2 | |
} | |
let flags: NetworkInterfaceFlags = [.Up, .Running, .Multicast] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment