ArpFile¶
- class getmac.getmac.ArpFile[source]¶
Bases:
MethodUse the contents of
/proc/net/arpto find the MAC address of a host.Only complete entries are used. Incomplete, failed and proxy ARP entries are ignored, since the kernel keeps the last known (possibly stale) MAC for failed entries, and proxy ARP entries don’t have a real MAC.
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 = 'ip4'¶
The type of method, e.g. does it get the MAC of a interface.
Allowed values:
ip
ip4
ip6
iface
default_iface
Methods Documentation