summaryrefslogtreecommitdiffstats
path: root/lib/interface.py
blob: 8f185592765faa1e35412a1f0b3be839d3ea8345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import string

class Interface(object):
    def __init__(self, interface):
        """ Store the NIC in the form "<if name> <MAC address> """
        self.nic_info = string.split(interface, " ")

    def get_interface(self):
        return self.nic_info[0]

    def get_mac_addr(self):
        return self.nic_info[1]