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

Method i2len

scapy/fields.py:182–190  ·  view source on GitHub ↗

Convert internal value to a length usable by a FieldLenField

(self,
              pkt,  # type: Packet
              x,  # type: Any
              )

Source from the content-addressed store, hash-verified

180 self.owners.append(cls)
181
182 def i2len(self,
183 pkt, # type: Packet
184 x, # type: Any
185 ):
186 # type: (...) -> int
187 """Convert internal value to a length usable by a FieldLenField"""
188 if isinstance(x, RawVal):
189 return len(x)
190 return self.sz
191
192 def i2count(self, pkt, x):
193 # type: (Optional[Packet], I) -> int

Callers 4

i2lenMethod · 0.45
i2lenMethod · 0.45
i2mMethod · 0.45
i2lenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected