MCPcopy Create free account
hub / github.com/secdev/scapy / addfield

Method addfield

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

Source from the content-addressed store, hash-verified

676 return self.fld.getfield(pkt, s[padlen:])
677
678 def addfield(self,
679 pkt, # type: Packet
680 s, # type: bytes
681 val, # type: Any
682 ):
683 # type: (...) -> bytes
684 sval = self.fld.addfield(pkt, b"", val)
685 return s + struct.pack("%is" % (
686 self.padlen(len(s), pkt)
687 ), self._padwith) + sval
688
689
690class TrailerBytes(bytes):

Callers

nothing calls this directly

Calls 2

addfieldMethod · 0.45
padlenMethod · 0.45

Tested by

no test coverage detected