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

Method addfield

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

Source from the content-addressed store, hash-verified

1071 Field.__init__(self, name, default, "!I")
1072
1073 def addfield(self, pkt, s, val):
1074 # type: (Packet, bytes, Optional[int]) -> bytes
1075 return s + struct.pack(self.fmt, self.i2m(pkt, val))[1:4]
1076
1077 def getfield(self, pkt, s):
1078 # type: (Packet, bytes) -> Tuple[bytes, int]

Callers

nothing calls this directly

Calls 1

i2mMethod · 0.45

Tested by

no test coverage detected