if not set requested address,
after set a fake mac address and create a mapping in switch,
it just loading and timeout and no content in reply packet in responsepkt
why can not get one more new ip address?
def custom_action(packet):
packet[Ether].src = '82:d2:44:25:5d:83'
#packet[DHCP].requested_addr = '10.126.0.38'
send(Ether(src="82:d2:44:25:5d:83", dst="ff:ff:ff:ff:ff:ff")/IP(src="10.126.0.160", dst="8.8.8.8")/UDP(dport=53)/b"hello")
sendp(Ether(src="82:d2:44:25:5d:83",dst="FF:FF:FF:FF:FF:FF")/ARP(op=2, psrc="0.0.0.0", hwdst="FF:FF:FF:FF:FF:FF")/Padding(load="X"*18))
packets2 = sniff(offline=r'C:\Users\martlee2\Downloads\dhcp.pcap', prn=custom_action)
responsepkt = sr1(packets2[0],timeout=2,verbose=0)
responsepkt