Source code for pcapkit.protocols.schema.internet.ipv6_frag
# -*- coding: utf-8 -*-# mypy: disable-error-code=assignment"""header schema for IPv6 Fragment Header"""fromtypingimportTYPE_CHECKINGfrompcapkit.const.reg.transtypeimportTransTypeasEnum_TransTypefrompcapkit.corekit.fields.miscimportPayloadFieldfrompcapkit.corekit.fields.numbersimportEnumField,UInt32Fieldfrompcapkit.corekit.fields.stringsimportBitField,PaddingFieldfrompcapkit.protocols.schema.schemaimportSchema,schema_final__all__=['IPv6_Frag']ifTYPE_CHECKING:fromtyping_extensionsimportTypedDictfrompcapkit.protocols.protocolimportProtocolBaseasProtocolclassFlags(TypedDict):"""Fragment offset and flags."""#: Fragment offset.offset:int#: More fragments flag.mf:int
[docs]@schema_finalclassIPv6_Frag(Schema):"""Header schema for IPv6-Frag packet."""#: Next header.next:'Enum_TransType'=EnumField(length=1,namespace=Enum_TransType)#: Reserved.reserved:'bytes'=PaddingField(length=1)#: Fragment offset and flags.flags:'Flags'=BitField(length=2,namespace={'offset':(0,13),'mf':(15,1),})#: Identification.id:'int'=UInt32Field()#: Payload.payload:'bytes'=PayloadField()ifTYPE_CHECKING:def__init__(self,next:'Enum_TransType',flags:'Flags',id:'int',payload:'bytes | Schema | Protocol')->'None':...