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

Method decode_payload_as

scapy/packet.py:1717–1725  ·  view source on GitHub ↗

Reassembles the payload and decode it using another packet class

(self, cls)

Source from the content-addressed store, hash-verified

1715 return self.payload.lastlayer(self)
1716
1717 def decode_payload_as(self, cls):
1718 # type: (Type[Packet]) -> None
1719 """Reassembles the payload and decode it using another packet class"""
1720 s = raw(self.payload)
1721 self.payload = cls(s, _internal=1, _underlayer=self)
1722 pp = self
1723 while pp.underlayer is not None:
1724 pp = pp.underlayer
1725 self.payload.dissection_done(pp)
1726
1727 def _command(self, json=False):
1728 # type: (bool) -> List[Tuple[str, Any]]

Callers

nothing calls this directly

Calls 2

rawFunction · 0.90
dissection_doneMethod · 0.45

Tested by

no test coverage detected