# -*- coding: utf-8 -*-"""IP - Internet Protocol============================.. module:: pcapkit.protocols.internet.ip:mod:`pcapkit.protocols.internet.ip` contains:class:`~pcapkit.protocols.internet.ip.IP` only,which is a base class for Internet Protocol (IP)protocol family [*]_, eg.:class:`~pcapkit.protocols.internet.ipv4.IPv4`,:class:`~pcapkit.protocols.internet.ipv6.IPv6`, and:class:`~pcapkit.protocols.internet.ipsec.IPsec`... [*] https://en.wikipedia.org/wiki/Internet_Protocol"""fromtypingimportTYPE_CHECKING,Genericfrompcapkit.protocols.internet.internetimportInternetfrompcapkit.protocols.protocolimport_PT,_STifTYPE_CHECKING:fromtyping_extensionsimportLiteral__all__=['IP']
[docs]classIP(Internet[_PT,_ST],Generic[_PT,_ST]):# pylint: disable=abstract-method"""This class implements all protocols in IP family. - Internet Protocol version 4 (:class:`~pcapkit.protocols.internet.ipv4.IPv4`) [:rfc:`791`] - Internet Protocol version 6 (:class:`~pcapkit.protocols.internet.ipv6.IPv6`) [:rfc:`2460`] - Authentication Header (:class:`~pcapkit.protocols.internet.ah.AH`) [:rfc:`4302`] - Encapsulating Security Payload (:class:`~pcapkit.protocols.internet.esp.ESP`) [:rfc:`4303`] """########################################################################### Methods.##########################################################################
[docs]@classmethoddefid(cls)->'tuple[Literal["IPv4"], Literal["IPv6"]]':"""Index ID of the protocol. Returns: Index ID of the protocol. """return('IPv4','IPv6')