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

Method addfield

scapy/fields.py:742–753  ·  view source on GitHub ↗
(self, pkt, s, val)

Source from the content-addressed store, hash-verified

740 return bytes(s), val
741
742 def addfield(self, pkt, s, val):
743 # type: (Packet, bytes, Optional[int]) -> bytes
744 previous_post_build = pkt.post_build
745 value = self.fld.addfield(pkt, b"", val)
746
747 def _post_build(self, p, pay):
748 # type: (Packet, bytes, bytes) -> bytes
749 pay += value
750 self.post_build = previous_post_build # type: ignore
751 return previous_post_build(p, pay)
752 pkt.post_build = MethodType(_post_build, pkt) # type: ignore
753 return s
754
755
756class FCSField(TrailerField):

Callers

nothing calls this directly

Calls 1

addfieldMethod · 0.45

Tested by

no test coverage detected