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

Method any2i

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

Source from the content-addressed store, hash-verified

1436 return len(x)
1437
1438 def any2i(self, pkt, x):
1439 # type: (Optional[Packet], Any) -> I
1440 if isinstance(x, str):
1441 x = bytes_encode(x)
1442 return super(_StrField, self).any2i(pkt, x) # type: ignore
1443
1444 def i2repr(self, pkt, x):
1445 # type: (Optional[Packet], I) -> str

Callers

nothing calls this directly

Calls 2

bytes_encodeFunction · 0.90
any2iMethod · 0.45

Tested by

no test coverage detected