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: ProtocolBase[_PT, _ST], Generic[_PT, _ST]

Abstract base class for transport layer protocol family.

property layer: Literal['Application']#

Protocol layer.

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

Decode next layer protocol.

Raises:

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

Return type:

NoReturn

_import_next_layer(proto, length=None, *, packet=None)[source]#

Import next layer extractor.

Raises:

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

Return type:

NoReturn

__layer__: Optional[Literal["Link", "Internet", "Transport", "Application"]]#

Layer of protocol.

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

Post initialisation hook.

Parameters:
Return type:

None

See also

For construction arguments, please refer to self.make.

classmethod __index__()[source]#

Numeral registry index of the protocol.

Raises:

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

Return type:

NoReturn