# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Link-Layer Address (LLA) Option Code==========================================.. module:: pcapkit.const.mh.lla_codeThis module contains the constant enumeration for **Link-Layer Address (LLA) Option Code**,which is automatically generated from :class:`pcapkit.vendor.mh.lla_code.LLACode`."""fromaenumimportIntEnum,extend_enum__all__=['LLACode']
[docs]classLLACode(IntEnum):"""[LLACode] Link-Layer Address (LLA) Option Code"""Wilcard=0New_Access_Point=1MH=2NAR=3RtSolPr_or_PrRtAdv=4access_point=5no_prefix_information=6no_fast_handover_support=7@staticmethoddefget(key:'int | str',default:'int'=-1)->'LLACode':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnLLACode(key)ifkeynotinLLACode._member_map_:# pylint: disable=no-memberreturnextend_enum(LLACode,key,default)returnLLACode[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'LLACode':"""Lookup function used when value is not found. Args: value: Value to get enum item. """ifnot(isinstance(value,int)and0<=value<=255):raiseValueError('%r is not a valid %s'%(value,cls.__name__))returnextend_enum(cls,'Unassigned_%d'%value,value)