IP - Internet Protocol

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

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

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

Base class for the IP protocol family.

The IPsec protocols (AH and ESP) derive from IPsec instead.

classmethod id()[source]

Index ID of the protocol.

Return type:

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

Returns:

Index ID of the protocol.

Footnotes