# -*- coding: utf-8 -*-"""data models for L2TP protocol"""fromtypingimportTYPE_CHECKINGfrompcapkit.corekit.infoclassimportinfo_finalfrompcapkit.protocols.data.dataimportDatafrompcapkit.protocols.data.protocolimportProtocolifTYPE_CHECKING:fromtypingimportOptionalfrompcapkit.const.l2tp.typeimportType__all__=['L2TP']
[docs]@info_finalclassFlags(Data):"""Data model for L2TP flags and version info."""#: Type.type:'Type'#: Length.len:'bool'#: Sequence.seq:'bool'#: Offset.offset:'bool'#: Priority.prio:'bool'ifTYPE_CHECKING:def__init__(self,type:'Type',len:'bool',seq:'bool',offset:'bool',prio:'bool')->'None':...# pylint: disable=unused-argument,super-init-not-called,redefined-builtin,multiple-statements
[docs]@info_finalclassL2TP(Protocol):"""Data model for L2TP packet."""#: Flags and version info.flags:'Flags'#: Version.version:'int'#: Length.length:'Optional[int]'#: Tunnel ID.tunnelid:'int'#: Session ID.sessionid:'int'#: Sequence Number.ns:'Optional[int]'#: Next Sequence Number.nr:'Optional[int]'#: Offset Size.offset:'Optional[int]'ifTYPE_CHECKING:#: Header length.hdr_len:'int'def__init__(self,flags:'Flags',version:'int',length:'Optional[int]',tunnelid:'int',sessionid:'int',ns:'Optional[int]',nr:'Optional[int]',offset:'Optional[int]')->'None':...# pylint: disable=unused-argument,super-init-not-called,redefined-builtin,multiple-statements,line-too-long