'filter: data info sended DHCPD request'

def GetDHCPRequests(self, data):

    if (len(data) == 8):
        device = sub('[)|(]', '', data[5])
        if (len(device) == 0):
            device = 'unknown'
        if Refactor.check_is_mac(data[4]):
            if (data[4] not in self.APclients.keys()):
                self.APclients[data[4]] = {'IP': data[2], 'device': device, 'in_tables': False}
                self.StatusDHCPRequests(data[4], self.APclients[data[4]])
    elif (len(data) == 9):
        device = sub('[)|(]', '', data[6])
        if (len(device) == 0):
            device = 'unknown'
        if Refactor.check_is_mac(data[5]):
            if (data[5] not in self.APclients.keys()):
                self.APclients[data[5]] = {'IP': data[2], 'device': device, 'in_tables': False}
                self.StatusDHCPRequests(data[5], self.APclients[data[5]])
    elif (len(data) == 7):
        if Refactor.check_is_mac(data[4]):
            if (data[4] not in self.APclients.keys()):
                leases = IscDhcpLeases('/var/lib/dhcp/dhcpd.leases')
                hostname = None
                try:
                    for item in leases.get():
                        if (item.ethernet == data[4]):
                            hostname = item.hostname
                    if (hostname == None):
                        item = leases.get_current()
                        hostname = item[data[4]]
                except:
                    hostname = 'unknown'
                if ((hostname == None) or (len(hostname) == 0)):
                    hostname = 'unknown'
                self.APclients[data[4]] = {'IP': data[2], 'device': hostname, 'in_tables': False}
                self.StatusDHCPRequests(data[4], self.APclients[data[4]])
    self.Add_data_into_QTableWidget(self.APclients)
