How to make the right ARP request?

Good day! I'm new to programming and not yet understand it all, so please forgive a stupid question, but can someone help with this problem

import scapy.all as scapy

def scan(ip):
arp_request = scapy.(ARP)
arp_request.pdst = ip
print(arp_request.summary())
scapy.ls(scapy.(ARP))
scan ("10.0.2.2/24")

And the answer is:
0.0.0.0 ARP who has says 10.0.2.15

in the terminal the first time was the same answer, and now:
ARP who has ?? says ??

It's probably not true, but I think that in a function def scan (ip) and scan ("10.0.2.2/24") IP address why it is not connected, this idea originated from the fact that in PyCharm when I click either ip or via 10.0.2.2/24 together they do not stand out, although def scan and the scan stand out. But like I said I actually have no idea what the problem is
5e4911057a82d176818628.png
April 7th 20 at 15:16
0 answer

Find more questions by tags Python