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

Method getfield

scapy/fields.py:1097–1099  ·  view source on GitHub ↗
(self, pkt, s)

Source from the content-addressed store, hash-verified

1095 return s + struct.pack(self.fmt, self.i2m(pkt, val))[:3]
1096
1097 def getfield(self, pkt, s):
1098 # type: (Optional[Packet], bytes) -> Tuple[bytes, int]
1099 return s[3:], self.m2i(pkt, struct.unpack(self.fmt, s[:3] + b"\x00")[0]) # noqa: E501
1100
1101
1102class XLE3BytesField(LEThreeBytesField, XByteField):

Callers

nothing calls this directly

Calls 1

m2iMethod · 0.45

Tested by

no test coverage detected