DarwinNetworksetupIface¶
- class getmac.getmac.DarwinNetworksetupIface[source]¶
Bases:
MethodUse
networksetupon MacOS (Darwin) to get the MAC address of a specific interface.I think that this is or was a BSD utility, but I haven’t seen it on other BSDs (FreeBSD, OpenBSD, etc.). So, I’m treating it as a Darwin-specific utility until further notice. If you know otherwise, please open a PR :)
If the command is present, it should always work, though naturally that is contingent upon the whims of Apple in newer MacOS releases.
Man page: networksetup (8)
Attributes Summary
The type of method, e.g. does it get the MAC of a interface.
Platforms supported by a method.
Methods Summary
get(arg)Core logic of the method that performs the lookup.
test()Low-impact test that the method is feasible, e.g. a command exists.
Attributes Documentation
-
method_type:
str= 'iface'¶ The type of method, e.g. does it get the MAC of a interface.
Allowed values:
ip
ip4
ip6
iface
default_iface
Methods Documentation
-
method_type: