Source code for pcapkit.protocols.data.misc.pcap.frame
# -*- coding: utf-8 -*-"""data models for frame header of PCAP file"""fromtypingimportTYPE_CHECKINGfrompcapkit.corekit.infoclassimportinfo_finalfrompcapkit.protocols.data.dataimportDatafrompcapkit.protocols.data.protocolimportProtocolifTYPE_CHECKING:fromdatetimeimportdatetimefromdecimalimportDecimal__all__=['Frame','FrameInfo']
[docs]@info_finalclassFrameInfo(Data):"""Frame metadata information."""#: Timestamp seconds.ts_sec:'int'#: Timestamp microseconds.ts_usec:'int'#: Number of octets of packet saved in file.incl_len:'int'#: Actual length of packet.orig_len:'int'ifTYPE_CHECKING:def__init__(self,ts_sec:'int',ts_usec:'int',incl_len:'int',orig_len:'int')->'None':...# pylint: disable=unused-argument,multiple-statements,super-init-not-called
[docs]@info_finalclassFrame(Protocol):"""Frame header of PCAP file."""#: Metadata information.frame_info:'FrameInfo'#: Timestamp instance.time:'datetime'#: Frame index.number:'int'#: UNIX timestamp.time_epoch:'Decimal'#: Number of octets of packet saved in file.len:'int'#: Actual length of packet.cap_len:'int'ifTYPE_CHECKING:#: Protocol chain.protocols:'str'def__init__(self,frame_info:'FrameInfo',time:'datetime',number:'int',time_epoch:'Decimal',len:'int',cap_len:'int')->'None':...# pylint: disable=unused-argument,multiple-statements,super-init-not-called,line-too-long,redefined-builtin