OwlCyberSecurity - MANAGER
Edit File: edns.cpython-36.opt-1.pyc
3 �b�W ������������������@���s@���d�Z�dZG�dd��de�ZG�dd��de�Zi�Zdd��Zdd ��Zd S�)zEDNS Options����c���������������@���sd���e�Zd�ZdZdd��Zdd��Zedd���Zdd ��Zd d��Z dd ��Z dd��Zdd��Zdd��Z dd��ZdS�)�Optionz*Base class for all EDNS option types. c�������������C���s ���||�_�dS�)z\Initialize an option. @param otype: The rdata type @type otype: int N)�otype)�selfr�����r����/usr/lib/python3.6/edns.py�__init__���s����zOption.__init__c�������������C���s���t��dS�)z*Convert an option to wire format. N)�NotImplementedError)r����filer���r���r����to_wire!���s����zOption.to_wirec�������������C���s���t��dS�)a���Build an EDNS option object from wire format @param otype: The option type @type otype: int @param wire: The wire-format message @type wire: string @param current: The offset in wire of the beginning of the rdata. @type current: int @param olen: The length of the wire-format option data @type olen: int @rtype: dns.edns.Option instanceN)r���)�clsr����wire�current�olenr���r���r���� from_wire&���s���� zOption.from_wirec�������������C���s���t��dS�)z�Compare an EDNS option with another option of the same type. Return < 0 if self < other, 0 if self == other, and > 0 if self > other. N)r���)r����otherr���r���r����_cmp5���s����zOption._cmpc�������������C���s,���t�|t�sdS�|�j|jkrdS�|�j|�dkS�)NF�����)� isinstancer���r���r���)r���r���r���r���r����__eq__<���s ���� z Option.__eq__c�������������C���s,���t�|t�sdS�|�j|jkrdS�|�j|�dkS�)NFr���)r���r���r���r���)r���r���r���r���r����__ne__C���s ���� z Option.__ne__c�������������C���s*���t�|t��s|�j|jkrtS�|�j|�dk�S�)Nr���)r���r���r����NotImplementedr���)r���r���r���r���r����__lt__J���s����z Option.__lt__c�������������C���s*���t�|t��s|�j|jkrtS�|�j|�dkS�)Nr���)r���r���r���r���r���)r���r���r���r���r����__le__P���s����z Option.__le__c�������������C���s*���t�|t��s|�j|jkrtS�|�j|�dkS�)Nr���)r���r���r���r���r���)r���r���r���r���r����__ge__V���s����z Option.__ge__c�������������C���s*���t�|t��s|�j|jkrtS�|�j|�dkS�)Nr���)r���r���r���r���r���)r���r���r���r���r����__gt__\���s����z Option.__gt__N)�__name__� __module__�__qualname__�__doc__r���r ����classmethodr���r���r���r���r���r���r���r���r���r���r���r���r������s���r���c�������������������s<���e�Zd�ZdZ��fdd�Zdd��Zedd���Zdd ��Z���Z S�) � GenericOptionzwGenerate Rdata Class This class is used for EDNS option types for which we have no better implementation. c����������������s���t�t|��j|��||�_d�S�)N)�superr ���r����data)r���r���r"���)� __class__r���r���r���k���s����zGenericOption.__init__c�������������C���s���|j�|�j��d�S�)N)�writer"���)r���r ���r���r���r���r ���o���s����zGenericOption.to_wirec�������������C���s���|�|||||����S�)Nr���)r���r���r���r ���r���r���r���r���r���r���s����zGenericOption.from_wirec�������������C���s$���|�j�|j�krdS�|�j�|j�kr dS�dS�)Nr����������)r"���)r���r���r���r���r���r���v���s ����zGenericOption._cmp) r���r���r���r���r���r ���r���r���r���� __classcell__r���r���)r#���r���r ���c���s ���r ���c�������������C���s���t�j|��}|d�krt}|S�)N)�_type_to_class�getr ���)r���r���r���r���r����get_option_class����s���� r*���c�������������C���s���t�|��}|j|�|||�S�)au��Build an EDNS option object from wire format @param otype: The option type @type otype: int @param wire: The wire-format message @type wire: string @param current: The offset in wire of the beginning of the rdata. @type current: int @param olen: The length of the wire-format option data @type olen: int @rtype: dns.edns.Option instance)r*���r���)r���r���r ���r���r���r���r���r����option_from_wire����s���� r+���N)r���ZNSID�objectr���r ���r(���r*���r+���r���r���r���r����<module>���s���N