# -*- coding: utf-8 -*-# pylint: disable=line-too-long,consider-using-f-string"""Pseudo Home Address Acknowledgement Status Codes======================================================.. module:: pcapkit.const.mh.ack_status_codeThis module contains the constant enumeration for **Pseudo Home Address Acknowledgement Status Codes**,which is automatically generated from :class:`pcapkit.vendor.mh.ack_status_code.ACKStatusCode`."""fromaenumimportIntEnum,extend_enum__all__=['ACKStatusCode']
[docs]classACKStatusCode(IntEnum):"""[ACKStatusCode] Pseudo Home Address Acknowledgement Status Codes"""#: Success [:rfc:`5726`]Success=0#: Failure, reason unspecified [:rfc:`5726`]Failure_reason_unspecified=128#: Administratively prohibited [:rfc:`5726`]Administratively_prohibited=129#: Incorrect pseudo home address [:rfc:`5726`]Incorrect_pseudo_home_address=130#: Invalid pseudo home address [:rfc:`5726`]Invalid_pseudo_home_address=131#: Dynamic pseudo home address assignment not available [:rfc:`5726`]Dynamic_pseudo_home_address_assignment_not_available=132@staticmethoddefget(key:'int | str',default:'int'=-1)->'ACKStatusCode':"""Backport support for original codes. Args: key: Key to get enum item. default: Default value if not found. :meta private: """ifisinstance(key,int):returnACKStatusCode(key)ifkeynotinACKStatusCode._member_map_:# pylint: disable=no-memberreturnextend_enum(ACKStatusCode,key,default)returnACKStatusCode[key]# type: ignore[misc]
[docs]@classmethoddef_missing_(cls,value:'int')->'ACKStatusCode':"""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__))if1<=value<=127:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)if133<=value<=255:#: Unassignedreturnextend_enum(cls,'Unassigned_%d'%value,value)returnsuper()._missing_(value)