# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Block Types=================.. module:: pcapkit.const.pcapng.block_typeThis module contains the constant enumeration for **Block Types**,which is automatically generated from :class:`pcapkit.vendor.pcapng.block_type.BlockType`."""fromaenumimportIntEnum,extend_enum__all__=['BlockType']
[docs]classBlockType(IntEnum):"""[BlockType] Block Types"""#: Reserved ???Reserved_0x00000000=0x00000000#: Interface Description Block ( Section 4.2 )Interface_Description_Block=0x00000001#: Packet Block ( Appendix A )Packet_Block=0x00000002#: Simple Packet Block ( Section 4.4 )Simple_Packet_Block=0x00000003#: Name Resolution Block ( Section 4.5 )Name_Resolution_Block=0x00000004#: Interface Statistics Block ( Section 4.6 )Interface_Statistics_Block=0x00000005#: Enhanced Packet Block ( Section 4.3 )Enhanced_Packet_Block=0x00000006#: IRIG Timestamp Block (requested by Gianluca Varenni#: <gianluca.varenni@cacetech.com>, CACE Technologies LLC); code also used for#: Socket Aggregation Event BlockIRIG_Timestamp_Block=0x00000007#: ARINC 429 in AFDX Encapsulation Information Block (requested by Gianluca#: Varenni <gianluca.varenni@cacetech.com>, CACE Technologies LLC)ARINC_429_in_AFDX_Encapsulation_Information_Block=0x00000008#: systemd Journal Export Block ( Section 4.7 )systemd_Journal_Export_Block=0x00000009#: Decryption Secrets Block ( Section 4.8 )Decryption_Secrets_Block=0x0000000a#: Hone Project Machine Info Block (see also Google version )Hone_Project_Machine_Info_Block=0x00000101#: Hone Project Connection Event Block (see also Google version )Hone_Project_Connection_Event_Block=0x00000102#: Sysdig Machine Info BlockSysdig_Machine_Info_Block=0x00000201#: Sysdig Process Info Block, version 1Sysdig_Process_Info_Block_version_1=0x00000202#: Sysdig FD List BlockSysdig_FD_List_Block=0x00000203#: Sysdig Event BlockSysdig_Event_Block=0x00000204#: Sysdig Interface List BlockSysdig_Interface_List_Block=0x00000205#: Sysdig User List BlockSysdig_User_List_Block=0x00000206#: Sysdig Process Info Block, version 2Sysdig_Process_Info_Block_version_2=0x00000207#: Sysdig Event Block with flagsSysdig_Event_Block_with_flags=0x00000208#: Sysdig Process Info Block, version 3Sysdig_Process_Info_Block_version_3=0x00000209#: Sysdig Process Info Block, version 4Sysdig_Process_Info_Block_version_4=0x00000210#: Sysdig Process Info Block, version 5Sysdig_Process_Info_Block_version_5=0x00000211#: Sysdig Process Info Block, version 6Sysdig_Process_Info_Block_version_6=0x00000212#: Sysdig Process Info Block, version 7Sysdig_Process_Info_Block_version_7=0x00000213#: Custom Block that rewriters can copy into new files ( Section 4.9 )Custom_Block_that_rewriters_can_copy_into_new_files=0x00000bad#: Custom Block that rewriters should not copy into new files ( Section 4.9 )Custom_Block_that_rewriters_should_not_copy_into_new_files=0x40000bad#: Section Header Block ( Section 4.1 )Section_Header_Block=0x0a0d0d0a@staticmethoddefget(key:'int | str',default:'int'=-1)->'BlockType':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnBlockType(key)ifkeynotinBlockType._member_map_:# pylint: disable=no-memberreturnextend_enum(BlockType,key,default)returnBlockType[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'BlockType':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=0xFFFFFFFF):raiseValueError('%r is not a valid %s'%(value,cls.__name__))if0x0a0d0a00<=value<=0x0a0d0aff:#: Reserved. Used to detect trace files corrupted because of file transfers using the HTTP protocol in text mode.returnextend_enum(cls,'Reserved_%08x'%value,value)if0x000a0d0a<=value<=0xff0a0d0a:#: Reserved. Used to detect trace files corrupted because of file transfers using the HTTP protocol in text mode.returnextend_enum(cls,'Reserved_%08x'%value,value)if0x000a0d0d<=value<=0xff0a0d0d:#: Reserved. Used to detect trace files corrupted because of file transfers using the HTTP protocol in text mode.returnextend_enum(cls,'Reserved_%08x'%value,value)if0x0d0d0a00<=value<=0x0d0d0aff:#: Reserved. Used to detect trace files corrupted because of file transfers using the FTP protocol in text mode.returnextend_enum(cls,'Reserved_%08x'%value,value)if0x80000000<=value<=0xffffffff:#: Reserved for local use.returnextend_enum(cls,'Reserved_%08x'%value,value)returnsuper()._missing_(value)