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

Method i2m

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

Source from the content-addressed store, hash-verified

801 Field.__init__(self, name, default, "6s")
802
803 def i2m(self, pkt, x):
804 # type: (Optional[Packet], Optional[str]) -> bytes
805 if not x:
806 return b"\0\0\0\0\0\0"
807 try:
808 y = mac2str(x)
809 except (struct.error, OverflowError, ValueError):
810 y = bytes_encode(x)
811 return y
812
813 def m2i(self, pkt, x):
814 # type: (Optional[Packet], bytes) -> str

Callers

nothing calls this directly

Calls 2

mac2strFunction · 0.90
bytes_encodeFunction · 0.90

Tested by

no test coverage detected