Raw Packet Data¶
pcapkit.protocols.misc.raw.protocol contains
Raw only, which implements
an extractor for unknown protocols, and constructs a
Protocol like object.
- class pcapkit.protocols.misc.raw.protocol.Raw(file, length=None, /, *, layer=None, protocol=None, context=None)[source]¶
Bases:
ProtocolBase[Raw,Raw]This class implements universal unknown protocol.
Properties
- property protocol: NoReturn¶
Name of next layer protocol.
- Raises:
UnsupportedCall – This protocol doesn’t support
protocol.
Methods
- read(length=None, *, error=None, alias=None, **kwargs)[source]¶
Read raw packet data.
- Parameters:
- Return type:
- Returns:
The parsed packet data.
Data Models
- __post_init__(file=None, length=None, **kwargs)[source]¶
Post initialisation hook.
- Overloads:
When
pcapkitmeets a malformed packet, or a layer past a dissection limit, the message saying so is given aserror.- Parameters:
See also
For construction arguments, please refer to
make().
- classmethod __index__()[source]¶
Numeral registry index of the protocol.
- Raises:
UnsupportedCall – This protocol has no registry entry.
- Return type:
Utilities
- classmethod _make_data(data)[source]¶
Create key-value pairs from
datafor protocol construction.protocolis passed on, as given, as thealiasread()takes.- Parameters:
data (
Raw) – protocol data- Return type:
- Returns:
Key-value pairs for protocol construction.
Changed in version 1.7.0:
errorandprotocolare passed on, whichfrom_data()dropped (#2863).
Header Schemas¶
Removed in version 1.6.0: pcapkit.protocols.schema.misc.raw, with no alias: the module moved here
(#2534).
Data Models¶
Removed in version 1.6.0: pcapkit.protocols.data.misc.raw, with no alias: the module moved here
(#2534).
- class pcapkit.protocols.misc.raw.data.Raw(protocol, error)[source]¶
Bases:
ProtocolRaw packet is an unknown protocol.
Changed in version 1.3.1.post8:
packetis not a field of this class, so its constructor takesprotocolanderroronly.ProtocolBasesetspacketon the data model of every protocol it constructs.