The value you passed to the layer ARP is just fine.
But your code is not sending/receiving any packets to the network.
let's fix your code:
from scapy.all import ARP, Ether, srp
import scapy.all as scapy
def scan(ip):
arp_request = scapy.ARP(pdst=ip)
broadcast = scapy.Ether(dst="ff:ff:ff:ff:ff:ff")
arp_request_broadcast = broadcast/arp_request
# send packet to the network, wait for replies for 3 secondes, then return all the answers
result = srp(arp_request_broadcast, timeout=3, verbose=0)[0]
# for each replay,
for sent, received in result:
print(received.summary())
scan("192.168.1.1/24")
gives me that in my network:
Ether / ARP is at 00:24:46:03:87:11 says 192.168.1.195 / Padding
Ether / ARP is at f8:75:a4:76:68:36 says 192.168.1.216 / Padding
Ether / ARP is at 78:96:84:9c:13:20 says 192.168.1.254 / Padding
note that you need to run that code in sudo, because it needs to read/write to the network
you can see the complete solution here: https://www.thepythoncode.com/article/building-network-scanner-using-scapy