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

Method getfield

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

Source from the content-addressed store, hash-verified

1075 return s + struct.pack(self.fmt, self.i2m(pkt, val))[1:4]
1076
1077 def getfield(self, pkt, s):
1078 # type: (Packet, bytes) -> Tuple[bytes, int]
1079 return s[3:], self.m2i(pkt, struct.unpack(self.fmt, b"\x00" + s[:3])[0]) # noqa: E501
1080
1081
1082class X3BytesField(ThreeBytesField, XByteField):

Callers

nothing calls this directly

Calls 1

m2iMethod · 0.45

Tested by

no test coverage detected