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

Method addfield

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

Source from the content-addressed store, hash-verified

1091 Field.__init__(self, name, default, "<I")
1092
1093 def addfield(self, pkt, s, val):
1094 # type: (Packet, bytes, Optional[int]) -> bytes
1095 return s + struct.pack(self.fmt, self.i2m(pkt, val))[:3]
1096
1097 def getfield(self, pkt, s):
1098 # type: (Optional[Packet], bytes) -> Tuple[bytes, int]

Callers

nothing calls this directly

Calls 1

i2mMethod · 0.45

Tested by

no test coverage detected