Raw Packet Data#
pcapkit.protocols.misc.raw contains
Raw only, which implements
extractor for unknown protocol, and constructs a
Protocol like object.
- class pcapkit.protocols.misc.raw.Raw(file=None, length=None, **kwargs)#
Bases:
ProtocolBase[Raw,Raw]This class implements universal unknown protocol.
- property name: Literal['Unknown']#
Name of current protocol.
- property protocol: NoReturn#
Name of next layer protocol.
- Raises:
UnsupportedCall – This protocol doesn’t support
protocol.
- read(length=None, *, error=None, alias=None, **kwargs)#
Read raw packet data.
- make(packet=b'', **kwargs)#
Make raw packet data.
- classmethod _make_data(data)#
Create key-value pairs from
datafor protocol construction.
- __post_init__(file=None, length=None, **kwargs)#
Post initialisation hook.
Would
pcapkitencounter malformed packets, the original parsing error instance will be provided as inerror.- Parameters:
- Return type:
See also
For construction argument, please refer to
make().
- classmethod __index__()#
Numeral registry index of the protocol.
- Raises:
UnsupportedCall – This protocol has no registry entry.
- Return type: