Skip to content
Snippets Groups Projects
Commit ef3d1a2e authored by Phil's avatar Phil
Browse files

Improved ARP.my_summary()

parent f30f46c4
No related branches found
No related tags found
No related merge requests found
...@@ -340,11 +340,11 @@ class ARP(Packet): ...@@ -340,11 +340,11 @@ class ARP(Packet):
return "",s return "",s
def mysummary(self): def mysummary(self):
if self.op == self.is_at: if self.op == self.is_at:
return "ARP is at %s says %s" % (self.hwsrc, self.psrc) return self.sprintf("ARP is at %hwsrc% says %psrc%")
elif self.op == self.who_has: elif self.op == self.who_has:
return "ARP who has %s says %s" % (self.pdst, self.psrc) return self.sprintf("ARP who has %pdst% says %psrc%")
else: else:
return "ARP %ARP.op% %ARP.psrc% > %ARP.pdst%" return self.sprintf("ARP %op% %psrc% > %pdst%")
conf.neighbor.register_l3(Ether, ARP, lambda l2,l3: getmacbyip(l3.pdst)) conf.neighbor.register_l3(Ether, ARP, lambda l2,l3: getmacbyip(l3.pdst))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment