/ethip

Python library that can discover an ip address from the mac address

Primary LanguagePythonMIT LicenseMIT

ethip
=====

Python library that can discover an ip address from the mac address

To install on openSUSE:

    sudo zypper ar http://download.opensuse.org/repositories/home:/dmulder/openSUSE_13.1/ ethip
    sudo zypper in ethip

To use:

    >>> from ethip import ethip
    >>> print ethip.getip('00:1E:C9:56:3C:8E', '10.5.42.255')
    10.5.42.3
    >>> print ethip.getmac('10.5.42.3')
    00:1e:c9:56:3c:8e

It needs to run as root to get full functionality. Only root has rights to make arp requests. If not run as root, you'll only get responses relative to your current arp table (arp -n).