IP - Internet Protocol

pcapkit.protocols.internet.ip contains IP only, which is a base class for Internet Protocol (IP) protocol family [*], eg. IPv4, IPv6, and IPsec.

class pcapkit.protocols.internet.ip.IP(file=None, length=None, **kwargs)[source]

Bases: Internet[_PT, _ST], Generic[_PT, _ST]

This class implements all protocols in IP family.

classmethod id()[source]

Index ID of the protocol.

Return type:

tuple[Literal['IPv4'], Literal['IPv6']]

Returns:

Index ID of the protocol.

Footnotes