Source code for pcapkit.protocols.data.link.ethernet
# -*- coding: utf-8 -*-"""data models for ethernet protocol"""fromtypingimportTYPE_CHECKINGfrompcapkit.corekit.infoclassimportinfo_finalfrompcapkit.protocols.data.dataimportDatafrompcapkit.protocols.data.protocolimportProtocolifTYPE_CHECKING:frompcapkit.const.reg.ethertypeimportEtherType__all__=['Ethernet']
[docs]@info_finalclassEthernet(Protocol):"""Data model for ethernet packet."""#: Destination MAC address.dst:'str'#: Source MAC address.src:'str'#: Protocol (internet layer).type:'EtherType'ifTYPE_CHECKING:def__init__(self,dst:'str',src:'str',type:'EtherType')->'None':...# pylint: disable=unused-argument,super-init-not-called,redefined-builtin,multiple-statements