Application Layer Protocols

pcapkit.protocols.application is collection of all protocols in application layer, with detailed implementation and methods.

Base Protocol

pcapkit.protocols.application.application contains only Application, which is a base class for application layer protocols, eg. HTTP/1.*, HTTP/2 and etc.

class pcapkit.protocols.application.application.Application(file=None, length=None, **kwargs)[source]

Bases: pcapkit.protocols.protocol.Protocol

Abstract base class for transport layer protocol family.

__layer__ = 'Application'

Layer of protocol.

classmethod __index__()[source]

Numeral registry index of the protocol.


IntError – This protocol doesn’t support __index__().

__post_init__(file=None, length=None, **kwargs)[source]

Post initialisation hook.

  • file (Optional[io.BytesIO]) – Source packet stream.

  • length (Optional[int]) – Length of packet data.

Keyword Arguments

**kwargs – Arbitrary keyword arguments.

See also

For construction argument, please refer to make().

_decode_next_layer(dict_, proto=None, length=None)[source]

Decode next layer protocol.


UnsupportedCall – This protocol doesn’t support _decode_next_layer().

_import_next_layer(proto, length=None)[source]

Import next layer extractor.


UnsupportedCall – This protocol doesn’t support _import_next_layer().

property layer

Protocol layer.

Return type