Registry Management¶
This module (pcapkit.foundation.registry
) provides the registry
management for pcapkit
, as the module contains various registry
points.
Auxiliary Methods¶
- pcapkit.foundation.registry.register_output(format, module, class_, ext)[source]¶
registered a new dumper class.
Notes
The full qualified class name of the new dumper class should be as
{module}.{class_}
.The function will register the given dumper class to the
pcapkit.foundation.traceflow.TraceFlow.__output__
andpcapkit.foundation.extraction.Extractor.__output__
registry.See also
- pcapkit.foundation.registry.register_linktype(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.misc.pcap.frame.Frame.__proto__
registry.
- pcapkit.foundation.registry.register_port(proto, code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.transport.tcp.TCP.__proto__
and/orpcapkit.protocols.transport.udp.UDP.__proto__
registry.See also
Dumper Registries¶
- pcapkit.foundation.registry.register_extractor(format, module, class_, ext)[source]¶
registered a new dumper class.
Notes
The full qualified class name of the new dumper class should be as
{module}.{class_}
.The function will register the given dumper class to the
pcapkit.foundation.extraction.Extractor.__output__
registry.
- pcapkit.foundation.registry.register_traceflow(format, module, class_, ext)[source]¶
registered a new dumper class.
Notes
The full qualified class name of the new dumper class should be as
{module}.{class_}
.The function will register the given dumper class to the
pcapkit.foundation.traceflow.TraceFlow.__output__
registry.
Protocol Registries¶
- pcapkit.foundation.registry.register_protocol(protocol)[source]¶
registered protocol class.
The protocol class must be a subclass of
Protocol
, and will be registered to thepcapkit.protocols.__proto__
registry.
- pcapkit.foundation.registry.register_pcap(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.misc.pcap.frame.Frame.__proto__
registry.
Link Layer Registries¶
- pcapkit.foundation.registry.register_ethertype(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.link.link.Link.__proto__
registry.
Internet Layer Registries¶
- pcapkit.foundation.registry.register_transtype(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.internet.internet.Internet.__proto__
registry.
- pcapkit.foundation.registry.register_hopopt(code, meth)[source]¶
Register an option parser.
The function will register the given option parser to the
pcapkit.protocols.internet.hopopt.HOPOPT.__option__
registry.
- pcapkit.foundation.registry.register_ipv6_opts(code, meth)[source]¶
Register an option parser.
The function will register the given option parser to the
pcapkit.protocols.internet.ipv6_opts.IPv6_Opts.__option__
registry.
- pcapkit.foundation.registry.register_ipv6_route(code, meth)[source]¶
Register an routing data parser.
The function will register the given routing data parser to the
pcapkit.protocols.internet.ipv6_route.IPv6_Route.__routing__
registry.- Parameters
code (IPv6_Routing) –
IPv6-Route
data type code as inRouting
.meth (str | IPv6_Route_TypeParser) – Method name or callable to parse the data.
- Return type
None
Transport Layer Registries¶
- pcapkit.foundation.registry.register_tcp_port(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.transport.tcp.TCP.__proto__
registry.
- pcapkit.foundation.registry.register_tcp(code, meth)[source]¶
Register an option parser.
The function will register the given option parser to the
pcapkit.protocols.transport.tcp.TCP.__option__
registry.
- pcapkit.foundation.registry.register_mptcp(code, meth)[source]¶
Register an MPTCP option parser.
The function will register the given option parser to the
pcapkit.protocols.transport.tcp.TCP.__mp_option__
registry.- Parameters
code (TCP_MPTCPOption) – Multipath
TCP
option code as inMPTCPOption
.meth (str | TCP_MPOptionParser) – Method name or callable to parse the option.
- Return type
None
- pcapkit.foundation.registry.register_udp_port(code, module, class_)[source]¶
Register a new protocol class.
Notes
The full qualified class name of the new protocol class should be as
{module}.{class_}
.The function will register the given protocol class to the
pcapkit.protocols.transport.udp.UDP.__proto__
registry.