Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/pcapkit/foundation/registry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Protocol Registries

.. autofunction:: pcapkit.foundation.registry.protocols.register_protocol

.. autofunction:: pcapkit.foundation.registry.protocols.register_protocol_code

Top-Level Registries
~~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 2 additions & 3 deletions pcapkit/foundation/registry/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,8 @@ def register_protocol_code(protocol: 'Type[ProtocolBase]', code: 'Any') -> 'None
r"""Register ``protocol`` into the next-layer dispatch registry (or
registries) named by ``code``.

This is what backs the ``code`` keyword of
:meth:`ProtocolBase.__init_subclass__
<pcapkit.protocols.protocol.ProtocolBase.__init_subclass__>`; it can also
This is what backs the ``code`` class keyword of
:class:`~pcapkit.protocols.protocol.ProtocolBase` subclasses; it can also
be called directly to register a class that declined at class-definition
time.

Expand Down
8 changes: 4 additions & 4 deletions pcapkit/toolkit/dpkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

.. module:: pcapkit.toolkit.dpkt

:mod:`pcapkit.toolkit.dpkt` contains all you need for
:mod:`pcapkit` handy usage with `DPKT`_ engine. All reforming
functions returns with a flag to indicate if usable for
its caller.
:mod:`pcapkit.toolkit.dpkt` contains the adapters for the `DPKT`_ engine.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

.. _DPKT: https://dpkt.readthedocs.io

Expand Down
8 changes: 4 additions & 4 deletions pcapkit/toolkit/pcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

.. module:: pcapkit.toolkit.pcap

:mod:`pcapkit.toolkit.pcap` contains all you need for
:mod:`pcapkit` handy usage of PCAP file format. All
functions returns with a flag to indicate if usable
for its caller.
:mod:`pcapkit.toolkit.pcap` contains the adapters for the PCAP format.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

"""
from typing import TYPE_CHECKING, cast
Expand Down
5 changes: 1 addition & 4 deletions pcapkit/toolkit/pcap_ct.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

.. module:: pcapkit.toolkit.pcap_ct

:mod:`pcapkit.toolkit.pcap_ct` contains all you need for
:mod:`pcapkit` handy usage with `pcap-ct`_ engine. All reforming
functions returns with a flag to indicate if usable for
its caller.
:mod:`pcapkit.toolkit.pcap_ct` contains the adapters for the `pcap-ct`_ engine.

.. _pcap-ct: https://pypi.org/project/pcap-ct/

Expand Down
12 changes: 6 additions & 6 deletions pcapkit/toolkit/pcapng.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
"""PCAP-NG-NG Tools
===================
"""PCAP-NG Tools
=============

.. module:: pcapkit.toolkit.pcapng

:mod:`pcapkit.toolkit.pcapng` contains all you need
for :mod:`pcapkit` handy usage of PCAP-NG-NG file format.
All functions returns with a flag to indicate if
usable for its caller.
:mod:`pcapkit.toolkit.pcapng` contains the adapters for the PCAP-NG format.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

"""
from typing import TYPE_CHECKING, cast
Expand Down
5 changes: 1 addition & 4 deletions pcapkit/toolkit/pypcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

.. module:: pcapkit.toolkit.pypcap

:mod:`pcapkit.toolkit.pypcap` contains all you need for
:mod:`pcapkit` handy usage with `PyPCAP`_ engine. All reforming
functions returns with a flag to indicate if usable for
its caller.
:mod:`pcapkit.toolkit.pypcap` contains the adapters for the `PyPCAP`_ engine.

.. _PyPCAP: https://github.com/pynetwork/pypcap

Expand Down
8 changes: 4 additions & 4 deletions pcapkit/toolkit/pypcapfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

.. module:: pcapkit.toolkit.pypcapfile

:mod:`pcapkit.toolkit.pypcapfile` contains all you need for
:mod:`pcapkit` handy usage with `PyPCAPFile`_ engine. All reforming
functions returns with a flag to indicate if usable for
its caller.
:mod:`pcapkit.toolkit.pypcapfile` contains the adapters for the `PyPCAPFile`_ engine.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

.. _PyPCAPFile: https://github.com/kisom/pypcapfile

Expand Down
8 changes: 4 additions & 4 deletions pcapkit/toolkit/pyshark.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"""PyShark Tools
===================

:mod:`pcapkit.toolkit.pyshark` contains all you need for
:mod:`pcapkit` handy usage with `PyShark`_ engine. All
reforming functions returns with a flag to indicate if
usable for its caller.
:mod:`pcapkit.toolkit.pyshark` contains the adapters for the `PyShark`_ engine.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

.. _PyShark: https://kiminewt.github.io/pyshark

Expand Down
8 changes: 4 additions & 4 deletions pcapkit/toolkit/scapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

.. module:: pcapkit.toolkit.scapy

:mod:`pcapkit.toolkit.scapy` contains all you need for
:mod:`pcapkit` handy usage with `Scapy`_ engine. All reforming
functions returns with a flag to indicate if usable for
its caller.
:mod:`pcapkit.toolkit.scapy` contains the adapters for the `Scapy`_ engine.
The reassembly and flow tracing adapters return the data their
:mod:`pcapkit.foundation` counterpart consumes, or :data:`None` if the frame
cannot be used for it.

.. _Scapy: https://scapy.net

Expand Down
4 changes: 2 additions & 2 deletions pcapkit/utilities/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
#: logging.StreamHandler: The historical :obj:`sys.stderr` handler. It is only
#: *attached* under :envvar:`PCAPKIT_DEVMODE`; it is constructed unconditionally
#: so that ``logger.addHandler(handler)`` remains a one-line way back to the
#: pre-1.4 default output.
#: pre-1.5 default output.
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(formatter)

Expand Down Expand Up @@ -287,7 +287,7 @@ def configure(level: 'Optional[Union[int, str]]' = None, *,
one is meant to receive ``fmt`` would be ambiguous.

Example:
Restore the pre-1.4 default of :obj:`sys.stderr` at
Restore the pre-1.5 default of :obj:`sys.stderr` at
:data:`logging.INFO`::

configure(logging.INFO, stream=sys.stderr)
Expand Down
Loading