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

Method any2i

scapy/fields.py:1756–1767  ·  view source on GitHub ↗
(self, pkt, x)

Source from the content-addressed store, hash-verified

1754 self.max_count = max_count
1755
1756 def any2i(self, pkt, x):
1757 # type: (Optional[Packet], Any) -> List[BasePacket]
1758 if not isinstance(x, list):
1759 if x and pkt and hasattr(x, "add_parent"):
1760 x.add_parent(pkt)
1761 return [x]
1762 elif pkt:
1763 for i in x:
1764 if not i or not hasattr(i, "add_parent"):
1765 continue
1766 i.add_parent(pkt)
1767 return x
1768
1769 def i2count(self,
1770 pkt, # type: Optional[Packet]

Callers

nothing calls this directly

Calls 1

add_parentMethod · 0.45

Tested by

no test coverage detected