METHODS

getmac.getmac.METHODS: list[type[Method]] = [<class 'getmac.getmac.CtypesHost'>, <class 'getmac.getmac.ArpFile'>, <class 'getmac.getmac.ArpingHost'>, <class 'getmac.getmac.SysIfaceFile'>, <class 'getmac.getmac.FcntlIface'>, <class 'getmac.getmac.LanscanIface'>, <class 'getmac.getmac.DladmIface'>, <class 'getmac.getmac.GetmacExe'>, <class 'getmac.getmac.IpconfigExe'>, <class 'getmac.getmac.WmicExe'>, <class 'getmac.getmac.ArpExe'>, <class 'getmac.getmac.NetshNeighbors'>, <class 'getmac.getmac.NetstatNetToMedia'>, <class 'getmac.getmac.DarwinNetworksetupIface'>, <class 'getmac.getmac.NdpNeighbors'>, <class 'getmac.getmac.ArpFreebsd'>, <class 'getmac.getmac.ArpOpenbsd'>, <class 'getmac.getmac.IfconfigWithIfaceArg'>, <class 'getmac.getmac.IfconfigEther'>, <class 'getmac.getmac.IfconfigOther'>, <class 'getmac.getmac.IpLinkIface'>, <class 'getmac.getmac.NetstatIface'>, <class 'getmac.getmac.IpNeighborShow'>, <class 'getmac.getmac.ArpVariousArgs'>, <class 'getmac.getmac.DefaultIfaceLinuxRouteFile'>, <class 'getmac.getmac.DefaultIfaceIpRoute'>, <class 'getmac.getmac.DefaultIfaceRouteCommand'>, <class 'getmac.getmac.DefaultIfaceRouteGetCommand'>, <class 'getmac.getmac.DefaultIfaceOpenBsd'>, <class 'getmac.getmac.DefaultIfaceFreeBsd'>, <class 'getmac.getmac.DefaultIfaceNetsh'>]

All of the methods getmac knows about, in the order they’re tried.

For each lookup type, the first method that passes its test is the primary method, and the rest are fallbacks, in this order. The goal is to put them in order of:

  • Platform and version

  • Performance (a file read before a command)

  • Reliability (how well I know the command works)