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

Method addfield

scapy/fields.py:649–658  ·  view source on GitHub ↗
(self,
                 pkt,  # type: Packet
                 s,  # type: bytes
                 val,  # type: Any
                 )

Source from the content-addressed store, hash-verified

647 return remain[padlen:], val
648
649 def addfield(self,
650 pkt, # type: Packet
651 s, # type: bytes
652 val, # type: Any
653 ):
654 # type: (...) -> bytes
655 sval = self.fld.addfield(pkt, b"", val)
656 return s + sval + (
657 self.padlen(len(sval), pkt) * self._padwith
658 )
659
660
661class ReversePadField(PadField):

Callers

nothing calls this directly

Calls 2

padlenMethod · 0.95
addfieldMethod · 0.45

Tested by

no test coverage detected