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

Method __contains__

scapy/packet.py:1413–1419  ·  view source on GitHub ↗

"cls in self" returns true if self has a layer which is an instance of cls.

(self, cls)

Source from the content-addressed store, hash-verified

1411 self[cls].underlayer.payload = val
1412
1413 def __contains__(self, cls):
1414 # type: (Union[Type[Packet], str]) -> int
1415 """
1416 "cls in self" returns true if self has a layer which is an
1417 instance of cls.
1418 """
1419 return self.haslayer(cls)
1420
1421 def route(self):
1422 # type: () -> Tuple[Optional[str], Optional[str], Optional[str]]

Callers

nothing calls this directly

Calls 1

haslayerMethod · 0.95

Tested by

no test coverage detected