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

Method i2m

scapy/contrib/http2.py:145–155  ·  view source on GitHub ↗

:param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501 :param int x: unused; must be equal to default value :return: int; default value :raises: AssertionError

(self, pkt, x)

Source from the content-addressed store, hash-verified

143 return r
144
145 def i2m(self, pkt, x):
146 # type: (Optional[packet.Packet], int) -> int
147 """
148 :param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501
149 :param int x: unused; must be equal to default value
150 :return: int; default value
151 :raises: AssertionError
152 """
153 assert x == self._magic, \
154 'EINVAL: x: This field is magic. Do not attempt to modify it. Expected value: {}'.format(self._magic) # noqa: E501
155 return super(HPackMagicBitField, self).i2m(pkt, self._magic)
156
157 def any2i(self, pkt, x):
158 # type: (Optional[packet.Packet], int) -> int

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45
i2mMethod · 0.45

Tested by

no test coverage detected