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

Method addfield

scapy/fields.py:2130–2139  ·  view source on GitHub ↗
(self,
                 pkt,  # type: Packet
                 s,  # type: bytes
                 val,  # type: Optional[List[Any]]
                 )

Source from the content-addressed store, hash-verified

2128 return "[%s]" % ", ".join(self.field.i2repr(pkt, v) for v in x)
2129
2130 def addfield(self,
2131 pkt, # type: Packet
2132 s, # type: bytes
2133 val, # type: Optional[List[Any]]
2134 ):
2135 # type: (...) -> bytes
2136 val = self.i2m(pkt, val)
2137 for v in val:
2138 s = self.field.addfield(pkt, s, v)
2139 return s
2140
2141 def getfield(self,
2142 pkt, # type: Packet

Callers

nothing calls this directly

Calls 2

i2mMethod · 0.45
addfieldMethod · 0.45

Tested by

no test coverage detected