MCPcopy Index your code
hub / github.com/secdev/scapy / dst_from_pkt

Method dst_from_pkt

scapy/fields.py:779–788  ·  view source on GitHub ↗
(self, pkt)

Source from the content-addressed store, hash-verified

777 self.defaultdst = default
778
779 def dst_from_pkt(self, pkt):
780 # type: (Packet) -> str
781 for addr, condition in self.bindings.get(pkt.payload.__class__, []):
782 try:
783 if all(pkt.payload.getfieldval(field) == value
784 for field, value in condition.items()):
785 return addr # type: ignore
786 except AttributeError:
787 pass
788 return self.defaultdst
789
790 @classmethod
791 def bind_addr(cls, layer, addr, **condition):

Callers 4

i2mMethod · 0.80
i2hMethod · 0.80
i2mMethod · 0.80
i2hMethod · 0.80

Calls 3

itemsMethod · 0.80
getMethod · 0.45
getfieldvalMethod · 0.45

Tested by

no test coverage detected