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

Method getfield

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

Source from the content-addressed store, hash-verified

1460 return s + self.i2m(pkt, val)
1461
1462 def getfield(self, pkt, s):
1463 # type: (Packet, bytes) -> Tuple[bytes, I]
1464 if self.remain == 0:
1465 return b"", self.m2i(pkt, s)
1466 else:
1467 return s[-self.remain:], self.m2i(pkt, s[:-self.remain])
1468
1469 def randval(self):
1470 # type: () -> RandBin

Callers

nothing calls this directly

Calls 1

m2iMethod · 0.45

Tested by

no test coverage detected