def create_dhcp_ack_packet(self): return testutils.dhcp_ack_packet(eth_client=self.client_iface_mac, eth_server=self.relay_iface_mac, ip_server=self.relay_iface_ip, ip_offered=self.client_ip, netmask_client=self.client_subnet, ip_gateway=self.relay_iface_ip, dhcp_lease=self.LEASE_TIME, padding_bytes=0)
def create_dhcp_ack_packet(self): return testutils.dhcp_ack_packet(eth_server=self.server_iface_mac, eth_dst=self.relay_iface_mac, eth_client=self.client_mac, ip_server=self.server_ip, ip_dst=self.relay_iface_ip, ip_offered=self.client_ip, port_dst=self.DHCP_SERVER_PORT, ip_gateway=self.relay_iface_ip, netmask_client=self.client_subnet, dhcp_lease=self.LEASE_TIME, padding_bytes=0, set_broadcast_bit=True)
def createDhcpAckPacket(self, dutMac): """ Helper function that creates DHCP Discover ACK destined to DUT Args: dutMac(str): MAC address of DUT Returns: packet: DHCP ACK packet """ return testutils.dhcp_ack_packet( eth_dst=dutMac, eth_server=self.DHCP_RELAY["mac"], eth_client=self.DHCP_CLIENT["mac"], ip_server=self.DHCP_SERVER["ip"], ip_dst=self.DHCP_RELAY["ip"], ip_offered=self.DHCP_CLIENT["ip"], port_dst=self.DHCP_SERVER["port"], ip_gateway=self.DHCP_RELAY["ip"], netmask_client=self.DHCP_CLIENT["subnet"], dhcp_lease=self.LEASE_TIME_SEC, padding_bytes=0, set_broadcast_bit=True)