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: pcapkit.protocols.internet.internet.Internet

This class implements all protocols in IP family.

classmethod id()[source]

Index ID of the protocol.

Returns

Index ID of the protocol.

Return type

Tuple[Literal[‘IPv4’], Literal[‘IPv6’]]

property dst

Destination IP address.

Return type

Union[ipaddress.IPv4Address, ipaddress.IPv6Address]

property src

Source IP address.

Return type

Union[ipaddress.IPv4Address, ipaddress.IPv6Address]


*

https://en.wikipedia.org/wiki/Internet_Protocol