summaryrefslogtreecommitdiffstats
path: root/regress/sys/netinet/arp/arp_request.py
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sys/netinet/arp/arp_request.py')
-rw-r--r--regress/sys/netinet/arp/arp_request.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/regress/sys/netinet/arp/arp_request.py b/regress/sys/netinet/arp/arp_request.py
index d974c6330c2..327d8dcdfd0 100644
--- a/regress/sys/netinet/arp/arp_request.py
+++ b/regress/sys/netinet/arp/arp_request.py
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python2.7
+#!/usr/local/bin/python3
# send Address Resolution Protocol Request
# expect Address Resolution Protocol response and check all fields
# RFC 826 An Ethernet Address Resolution Protocol
@@ -17,34 +17,34 @@ e=srp1(eth, iface=LOCAL_IF, timeout=2)
if e and e.type == ETH_P_ARP:
a=e.payload
if a.hwtype != ARPHDR_ETHER:
- print "HWTYPE=%#0.4x != ARPHDR_ETHER" % (a.hwtype)
+ print("HWTYPE=%#0.4x != ARPHDR_ETHER" % (a.hwtype))
exit(1)
if a.ptype != ETH_P_IP:
- print "PTYPE=%#0.4x != ETH_P_IP" % (a.ptype)
+ print("PTYPE=%#0.4x != ETH_P_IP" % (a.ptype))
exit(1)
if a.hwlen != 6:
- print "HWLEN=%d != 6" % (a.hwlen)
+ print("HWLEN=%d != 6" % (a.hwlen))
exit(1)
if a.plen != 4:
- print "PLEN=%d != 4" % (a.plen)
+ print("PLEN=%d != 4" % (a.plen))
exit(1)
if a.op != 2:
- print "OP=%s != is-at" % (a.op)
+ print("OP=%s != is-at" % (a.op))
exit(1)
if a.hwsrc != REMOTE_MAC:
- print "HWLOCAL=%s != REMOTE_MAC" % (a.hwsrc)
+ print("HWLOCAL=%s != REMOTE_MAC" % (a.hwsrc))
exit(1)
if a.psrc != REMOTE_ADDR:
- print "PLOCAL=%s != REMOTE_ADDR" % (a.psrc)
+ print("PLOCAL=%s != REMOTE_ADDR" % (a.psrc))
exit(1)
if a.hwdst != LOCAL_MAC:
- print "HWREMOTE=%s != LOCAL_MAC" % (a.hwdst)
+ print("HWREMOTE=%s != LOCAL_MAC" % (a.hwdst))
exit(1)
if a.pdst != LOCAL_ADDR:
- print "PREMOTE=%s != LOCAL_ADDR" % (a.pdst)
+ print("PREMOTE=%s != LOCAL_ADDR" % (a.pdst))
exit(1)
- print "arp reply"
+ print("arp reply")
exit(0)
-print "NO ARP REPLY"
+print("NO ARP REPLY")
exit(2)