%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/kcc/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/kcc/__pycache__/graph.cpython-312.pyc

�

�I�d�n��v�ddlZddlZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
mZmZdZGd�d	e�Zd
�Zd�Zd�Z		d)d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%Gd�de�Z&Gd�d e�Z'Gd!�d"e�Z(Gd#�d$e�Z)Gd%�d&e�Z*Gd'�d(e�Z+y)*�N)�write_dot_file�verify_and_dot�verify_graph)�KCCError)�ndr_pack)�misc)�DEBUG�DEBUG_FN�WARN���c��eZdZdZd�Zd�Zy)�ReplInfoz�Represents information about replication

    NTDSConnections use one representation a replication schedule, and
    graph vertices use another. This is the Vertex one.

    c�J�d|_d|_d|_d|_d|_y)Nr�)�cost�interval�options�schedule�duration��selfs �1/usr/lib/python3/dist-packages/samba/kcc/graph.py�__init__zReplInfo.__init__*s%����	���
������
���
�c�X�t|�|_t|j�|_y)zfConvert the schedule and calculate duration

        :param schedule: the schedule to convert
        N)�convert_schedule_to_repltimesr�total_scheduler)rrs  r�set_repltimes_from_schedulez$ReplInfo.set_repltimes_from_schedule1s ��
6�h�?��
�&�t�}�}�5��
rN)�__name__�
__module__�__qualname__�__doc__rr�rrrr#s����6rrc�P�|�yd}|D]}|dk7s�	||dzz
}|dz}|dk7r��|S)aReturn the total number of 15 minute windows in which the schedule
    is set to replicate in a week. If the schedule is None it is
    assumed that the replication will happen in every 15 minute
    window.

    This is essentially a bit population count.
    rr�r#)r�total�bytes   rrr:sO�����
�E�����a�i��T�A�X��E��Q�J�D��a�i���Lrc���|�|jd�dgdzSg}|jdj}td�D].}|j||dzdzdz||dzdzdzz��0|S)a2Convert NTDS Connection schedule to replTime schedule.

    Schedule defined in  MS-ADTS 6.1.4.5.2
    ReplTimes defined in MS-DRSR 5.164.

    "Schedule" has 168 bytes but only the lower nibble of each is
    significant. There is one byte per hour. Bit 3 (0x08) represents
    the first 15 minutes of the hour and bit 0 (0x01) represents the
    last 15 minutes. The first byte presumably covers 12am - 1am
    Sunday, though the spec doesn't define the start of a week.

    "ReplTimes" has 84 bytes which are the 168 lower nibbles of
    "Schedule" packed together. Thus each byte covers 2 hours. Bits 7
    (i.e. 0x80) is the first 15 minutes and bit 0 is the last. The
    first byte covers Sunday 12am - 2am (per spec).

    Here we pack two elements of the NTDS Connection schedule slots
    into one element of the replTimes list.

    If no schedule appears in NTDS Connection then a default of 0x11
    is set in each replTimes slot as per behaviour noted in a Windows
    DC. That default would cause replication within the last 15
    minutes of each hour.
    r��T���r%)�	dataArray�slots�range�append)r�times�data�is    rrrNs���6��8�-�-�a�0�8��v��{���E����a� �&�&�D�
�2�Y�I��
���d�1�q�5�k�C�'�A�-��a�!�e�a�i��3�1F�G�H�I��Lrc�
�t�}t|j|j�|_|j|jz|_|j�dgdz|_|j�dgdz|_t|j|j�D��cgc]
\}}||z��c}}|_t
|j�|_t|j|jzt�|_	|Scc}}w)a�Generate an repl_info combining two others

    The schedule is set to be the intersection of the two input schedules.
    The duration is set to be the duration of the new schedule.
    The cost is the sum of the costs (saturating at a huge value).
    The options are the intersection of the input options.
    The interval is the maximum of the two intervals.

    :param info_a: An input replInfo object
    :param info_b: An input replInfo object
    :return: a new ReplInfo combining the other 2
    �r*)r�maxrrr�ziprr�minr�	MAX_DWORD)�info_a�info_b�info_c�a�bs     r�combine_repl_infor@us����Z�F��&�/�/�6�?�?�;�F�O��^�^�f�n�n�4�F�N������&�2�+���
�����&�2�+���),�V�_�_�f�o�o�)N�O���A�q�1�u�O�F�O�$�V�_�_�5�F�O��f�k�k�F�K�K�/��;�F�K��M��	Ps�C?c�	�t�}|jD�]�}d}|jD]	}g|_�|jD]:}	|	j}|	jD]}|jj|	���<|s|��t
jd�|jD��D�
�cgc]1\}
}|
jj|jjf��3}}
}|jD�cgc]}|jj��}
}|�td|��||
|��|rEt||
d��}|r5td|z�|D]\}}	}t|d�d	|	����td
��t||d�t|||�t||d�t|||����t!|�t|d|�|s|��|D�	cgc]B}	|	j"jj|	j$jjf��D}}	|jD�cgc]}|jj��}
}d
}t'd||
||t||��t)||�\}}t|dd�|jD]5}|j+�rd|_�|j.j0|_�7|s|��|D�	cgc]B}	|	j"jj|	j$jjf��D}}	|jD�cgc]}|jj��}
}d
}t'd||
||t||��g}|D]�}|j\}}|j|us|j|us�/|j3�s|j3�rD|j,t4k7r1d|_|j,|j,kr||f|jdd|j|���|s|��|D�	�cgc]0}	|	jD�cgc]}|jj��c}��2}}	}|j9d�|D��|jD�cgc]}|jj��}
}d}t'd||
||t|d|��	||fScc}}
wcc}wcc}	wcc}wcc}	wcc}wcc}wcc}}	wcc}w)awFind edges for the intersite graph

    From MS-ADTS 6.2.2.3.4.4

    :param graph: a kcc.kcc_utils.Graph object
    :param my_site: the topology generator's site
    :param label: a label for use in dot files and verification
    :param verify: if True, try to verify that graph properties are correct
    :param dot_file_dir: if not None, write Graphviz dot files here
    Nc3�\K�|]$}tj|jd����&y�w)r+N)�	itertools�combinations�vertices)�.0�edges  r�	<genexpr>z*get_spanning_tree_edges.<locals>.<genexpr>�s)����!:�%)�"+�!7�!7��
�
�q�!I�!:�s�*,�edgeset_)rE�label)�complete�	connected)rE�
propertiesz spanning tree edge set %s FAILEDz>18z: zspanning tree failedFT)�multi_edge_forest�
prekruskal)rJrM�debug�verify�dot_file_dir�
EDGE_TYPE_ALLr�postkruskalc3�K�|]G}|js9t|j�D�cgc]}|jj��c}���Iycc}w�w�N)�directed�reversedrE�site�
site_dnstr)rF�e�xs   rrHz*get_spanning_tree_edges.<locals>.<genexpr>sK����A� �Q�Z�Z�&.�a�j�j�%9�;� !��F�F�-�-�;�A��;�s�(A�A�
Ar#zpost-one-way-partial)rJrMrPrQrWrR)�set�edge_setrE�edges�con_typer1rC�chainrYrZrrr	r�dijkstra�process_edge_set�setup_vertices�v1�v2r�kruskal�is_red�dist_to_red�	repl_infor�is_blackr:rW�extend)�graph�my_siterJrQrR�internal_edges�e_set�edgeType�vr[r>r?�graph_edges�graph_nodes�errors�p�doc�verify_properties�output_edges�
components�	edge_listrG�wr\s                        r�get_spanning_tree_edgesr}�s����U�N����,7�������	�A��A�G�	����	"�A��z�z�H��Z�Z�
"�������q�!�
"�	"�
�\�-�%�?�?�!:�-2�[�[�!:�;�<�#�q�!��F�F�-�-�q�v�v�/@�/@�A�<�K�<�
7<�n�n�E��1�6�6�,�,�E�K�E��'��x�9�;�(3�5�B��%�k�K�1J�L����<�x�G�H�%+�3�	��1�c��A�q�1�2�3�"�#9�:�:�	���%�(�	���~�6�	���$�'�	���~�6�Y,7�^�5���U�D�.�1�
��)� .�0�����	�	�,�,�a�d�d�i�i�.B�.B�C�0��0�27�.�.�A�Q�q�v�v�(�(�A��A�2���|�[�+�U�"3�5�$�<�	A�
 '�u�n�=��L�*�

�U�O�U�+�
�^�^�-���8�8�:��A�M��K�K�,�,�A�M�	-���)� .�0�����	�	�,�,�a�d�d�i�i�.B�.B�C�0��0�27�.�.�A�Q�q�v�v�(�(�A��A�2���}�k�;�"�/@�"�6�$0�	2��I��#���}�}���1��6�6�W�����'� 1��*�*�,�!�*�*�,����)�+� $��
��=�=�1�=�=�0�'(�!�t�D�M�M�!�$����T�"�#���)� )�+��45�:�:�>�a����)�)�>�+��+�	���A�$-�A�	A�38�.�.�A�Q�q�v�v�(�(�A��A����-�{�K�"�/@�"�6� $�$0�		2��j� � ��O<��
F��D0��A��*0��A��0?��+��BsD�(6R�/R�AR�R$�7AR)�R.�9R8�R3�)R8�R>�3R8c���t�}||_g|_|jD]F\}}t	|�|vs�|jj|j
t	|����H|j|j_|j|j_	|j|j_
|jj|j�||_
d|_|S)a6Set up a MultiEdge for the intersite graph

    A MultiEdge can have multiple vertices.

    From MS-ADTS 6.2.2.3.4.4

    :param con_type: a transport type GUID
    :param  site_link: a kcc.kcc_utils.SiteLink object
    :param guid_to_vertex: a mapping between GUIDs and vertices
    :return: a MultiEdge
    F)�	MultiEdge�	site_linkrE�	site_list�strrl�getrrjrrrrr`rW)r`r��guid_to_vertexr[�	site_guid�site_dns      r�create_edger�s���	��A��A�K��A�J�'�1�1�B��	�7��y�>�^�+�
�J�J���n�0�0��Y��@�A�B�!�~�~�A�K�K��#�+�+�A�K�K��$�-�-�A�K�K���K�K�+�+�I�,>�,>�?��A�J��A�J��Hrc���t�}tj�|_|jD]-}|j
|k(s�|jj
|��/|S)z�Set up an automatic MultiEdgeSet for the intersite graph

    From within MS-ADTS 6.2.2.3.4.4

    :param graph: the intersite graph object
    :param transport_guid: a transport type GUID
    :return: a MultiEdgeSet
    )�MultiEdgeSetr�GUID�guidr_r`r1)rm�transport_guidrpr�s    r�create_auto_edge_setr�5sR��
�N�E�����E�J��[�[�*�	�����/��K�K���y�)�*��Lrc�b�|jD]�}|j�r$t|j_d|_d|_nd|j_||_||_d|j_d|j_d|j_	d|j_
d|_��y)aInitialise vertices in the graph for the Dijkstra's run.

    Part of MS-ADTS 6.2.2.3.4.4

    The schedule and options are set to all-on, so that intersections
    with real data defer to that data.

    Refer to the convert_schedule_to_repltimes() docstring for an
    explanation of the repltimes schedule values.

    :param graph: an IntersiteGraph object
    :return: None
    NrrrF)rE�is_whiter:rjr�root�component_idrrrr�demoted)rmrrs  rrdrdHs����^�^����:�:�<�(�A�K�K���A�F�!�A�N� �A�K�K���A�F��A�N� �����(�����#�����%�������	�rc	��t|||�}t|�dkDr_tj|�\}}}|jD]'}|j
D]}||us�t
|||||���)t|�dkDr�^yy)z�Perform Dijkstra's algorithm on an intersite graph.

    :param graph: an IntersiteGraph object
    :param edge_type: a transport type GUID
    :param include_black: boolean, whether to include black vertices
    :return: None
    rN)�setup_dijkstra�len�heapq�heappopr_rE�try_new_path)	rm�	edge_type�
include_black�queuerr��vertexrGrrs	         rrbrbhs���
�5�)�]�;�E�

�e�*�q�.�"�]�]�5�1���d�F��L�L�	@�D��]�]�
@���F�?� ���v�t�Q�?�
@�	@��e�*�q�.rc�v�g}t|�|jD]�}|j�r�|j�r|r||jvs||j
vr$t|j_d|_	d|_
�ftj||jj|j|f���|S)z�Create a vertex queue for Dijksta's algorithm.

    :param graph: an IntersiteGraph object
    :param edge_type: a transport type GUID
    :param include_black: boolean, whether to include black vertices
    :return: A heap queue of vertices
    NT)rdrEr�rk�accept_black�accept_red_redr:rjrr�r�r��heappushr�)rmr�r�r�r�s     rr�r�zs���
�E��5���.�.�P���?�?����o�o��
���!4�!4�4���!6�!6�6�$-�F���!��F�K�!�F�N��N�N�5�6�#3�#3�#8�#8�&�+�+�v�"N�O�P��Lrc��t|j|j�}|j|jjks#|j|jjkDra|j|_|j
|_||_t
j||jj|j|f�yy)a	Helper function for Dijksta's algorithm.

    :param graph: an IntersiteGraph object
    :param queue: the empty queue to initialise.
    :param vfrom: Vertex we are coming from
    :param edge: an edge to try
    :param vto: the other Vertex
    :return: None
    N)	r@rjrrr�r�r�r�r�)rmr��vfromrG�vto�
new_repl_infos      rr�r��s���&�e�o�o�t�~�~�F�M�	���S�]�]�/�/�/�������!7�!7�7��:�:��� �-�-���%��
�
���u�s�}�}�1�1�3�8�8�S�A�B�		8rc��|j�ry||jvr3||jvr$t|j_d|_d|_yyy)z�Demote non-white vertices that accept only white edges

    This makes them seem temporarily like white vertices.

    :param vertex: a Vertex()
    :param edge_type: a transport type GUID
    :return: None
    NT)r�r�r�r:rjrr�r�)r�r�s  r�check_demote_vertexr��sU�������
�&�-�-�	-�	�&�/�/�	/� )�����������
0�
.rc�d�|j�ryd|j_||_d|_y)z}Un-demote non-white vertices

    Set a vertex's to an undemoted state.

    :param vertex: a Vertex()
    :return: None
    NrF)r�rjrr�r�)r�s r�undemote_vertexr��s-��������F�����F�K��F�Nrc��|�b|jD]R}|jD]}t||j��t	|||�|jD]
}t|���Ty|jD]}t	|||��y)z�Find internal edges to pass to Kruskal's algorithm

    :param graph: an IntersiteGraph object
    :param e_set: an edge set
    :param internal_edges: a set that internal edges get added to
    :return: None
    N)r_rEr�r`�process_edger�)rmrprorGr�s     rrcrc�s���
�}��K�K�	(�D��-�-�
;��#�F�D�M�M�:�
;����n�5��-�-�
(����'�
(�		(��K�K�	6�D����n�5�	6rc��g}|jD]?}|j|j|jj|j
|f��At
d|z�|j�|d\}}}}|jD]x}|j�|j��|j��)|j��6|j��C|j��P|j|jk7s�jt|||||��zy)z�Find the set of all vertices touching an edge to examine

    :param graph: an IntersiteGraph object
    :param examine: an edge
    :param internal_edges: a set that internal edges get added to
    :return: None
    zvertices is %srN)rEr1�colorrjr�ndrpacked_guidr	�sortr�r��add_int_edge)	rm�examinerorErrr�rr��bestvs	         rr�r��s����H�
�
�
�J��������!�+�+�"2�"2�A�4D�4D�a�H�I�J�
�
�X�
%�&��M�M�O�'��{��E�4��u�
�
�
�C���>�>�!�Q�V�V�^���
�
�
+�
�Z�Z�
#�
�^�^�
'�
�V�V�
�
�
�
�1�>�>�
1�������B�Crc��|j}|j}|j�xr|j�}|r1|j|jvs|j|jvr2y|j|jvs|j|jvryt|j|j�}|jdk(ryt||j�}	|	jdk(ry|j|jkDr||}}t||||	|j|j�}
|j|
�y)aCAdd edges between compatible red and black vertices

    Internal edges form the core of the tree -- white and RODC
    vertices attach to it as leaf nodes. An edge needs to have black
    or red endpoints with compatible replication schedules to be
    accepted as an internal edge.

    Here we examine an edge and add it to the set of internal edges if
    it looks good.

    :param graph: the graph object.
    :param internal_edges: a set of internal edges
    :param examine: an edge to examine for suitability.
    :param v1: a Vertex
    :param v2: the other Vertex
    Nr)r�rhr`r�r�r@rjrr��InternalEdger��add)rmror�rerf�root1�root2�red_red�ri�ri2�
newIntEdges           rr�r�s��"
�G�G�E��G�G�E��l�l�n�/�����G�����E�$8�$8�8����u�';�';�;��
�
�
�%�"4�"4�
4�
�
�
�U�%7�%7�
7��
�2�<�<����	6�B�	�{�{�a���
�B�� 1� 1�
2�C�
�|�|�q���
���e�2�2�2��e�u���e�U�G�S�'�:J�:J�%�/�/�1�J����z�"rc��|jD]	}g|_�t|jD�cgc]}|j�r�|��c}�}t	|�}|j�d}d}g}d}|t
|�krq||}	t|	j�}
t|	j�}|
|ur*|dz
}t|||	�||
_|j|
�|dz
}|t
|�kr�q|t
|�fScc}w)aEPerform Kruskal's algorithm using the given set of edges

    The input edges are "internal edges" -- between red and black
    nodes. The output edges are a minimal spanning tree.

    :param graph: the graph object.
    :param edges: a set of edges
    :return: a tuple of a list of edges, and the number of components
    rr%)
rEr_r]r��listr�r��find_componentrerf�add_out_edger��discard)rmr_rrr\rz�expected_num_tree_edges�count_edgesry�indexr[�parent1�parent2s            rrgrg3s����^�^�����������D�A�q�z�z�|�a�D�E�J���K�E�
�J�J�L� ���K��L�
�E�
�#�e�*�
��%�L�� ����&�� ����&���'�!��1��K����a�0�#*�G� ����w�'�
��
���#�e�*�
���Z��(�(��1Es�C<�C<c���|j|ur|S|}|j|ur|j}|j|ur�|}|}|j|ur$|j}||_|}|j|ur�$|S)z�Kruskal helper to find the component a vertex belongs to.

    :param vertex: a Vertex
    :return: the Vertex object representing the component
    )r�)r��currentr��ns    rr�r�[s������f�$��
��G�
�
�
�g�
-��&�&���
�
�g�
-��D��G�
�
�
�d�
*�� � ��#������
�
�d�
*�
�Krc��|j}|j}t�}d|_|j|_|j
j
|�|j
j
|�|j|_|j|_	|j
|�|jj
|�|jj
|�y)z�Kruskal helper to add output edges

    :param graph: the InterSiteGraph
    :param output_edges: the list of spanning tree edges
    :param e: the edge to be added
    :return: None
    FN)rerfrrWr�rEr1�e_typer`rjr_)rmryr[rerf�ees      rr�r�rs���
���B�	
���B�
��B��B�K��;�;�B�L��K�K���r���K�K���r���(�(�B�K��;�;�B�L�������H�H�O�O�B���H�H�O�O�B�rc�`�i}t�}|j�D]p\}}t||�}	||	_t	|j
�|	_|jj|	�|j|g�}
|
j|	��rt�}|j�D]H\}}
t||
|�}|j|j�|jj|��J|rtd�|j jt#||��||_|S)a^Set up an IntersiteGraph based on intersite topology

    The graph will have a Vertex for each site, a MultiEdge for each
    siteLink object, and a MultiEdgeSet for each siteLinkBridge object
    (or implied siteLinkBridge).

    :param part: the partition we are dealing with
    :param site_table: a mapping of guids to sites (KCC.site_table)
    :param transport_guid: the GUID of the IP transport
    :param sitelink_table: a mapping of dnstrs to sitelinks
    :param bridges_required: boolean, asking in vain for something to do
         with site link bridges
    :return: a new IntersiteGraph
    z-Samba KCC ignores the bridges required option)�IntersiteGraph�items�Vertexr�rr�r�rEr��
setdefaultr1r]r��updater_rr^r��connected_vertices)�part�
site_tabler��sitelink_table�bridges_requiredr��gr�rYr��
guid_verticesr��site_link_dnr��new_edges               r�setup_graphr��s�� �N���A�%�+�+�-�%��	�4���d�#����� (���� 8���	�
�
���v��&�1�1�)�R�@�
����V�$�
%����#1�#7�#7�#9����i��~�y�-�/���!�!�(�"3�"3�4�	�����H��	���
<�=��J�J�N�N�'��>�:�;�-�A���Hrc�,�eZdZdZedd�\ZZZZy)�VertexColorzEnumeration of vertex coloursrr-N)	rr r!r"r0�red�black�white�unknownr#rrr�r��s��'�#(��A�;� �S�%��rr�c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)r�z�intersite graph representation of a Site.

    There is a separate vertex for each partition.

    :param site: the site to make a vertex of.
    :param part: the partition.
    c���||_||_tj|_g|_g|_g|_t�|_	||_
d|_||_d|_
d|_d|_y)NFr)rYr�r�r�r�r_r�r�rrjr�r�r�r�rr)rrYr�s   rrzVertex.__init__�sh����	���	� �(�(��
���
� ������!������	���	� �����������
rc�N�tj|_|jjj�D]i\}}|j
|jj�}|��.|j�stj|_ytj|_�ky)zGColor to indicate which kind of NC replica the vertex contains
        N)r�r�r�rY�	dsa_tabler��get_current_replicar��nc_dnstr�
is_partialr�r�)r�dnstr�dsa�reps    r�color_vertexzVertex.color_vertex�s���!�&�&��
��)�)�-�-�3�3�5�	/�J�E�3��)�)�$�)�)�*<�*<�=�C��{���>�>�#�(�_�_��
��(�.�.��
�	/rc�z�|jtjk7sJ�|jtjk(SrV)r�r�r�r�rs rrhz
Vertex.is_red�s-���z�z�[�0�0�0�1�0��
�
�k�o�o�-�.rc�z�|jtjk7sJ�|jtjk(SrV)r�r�r�r�rs rrkzVertex.is_black��/���z�z�[�0�0�0�1�0��
�
�k�/�/�/�0rc�z�|jtjk7sJ�|jtjk(SrV)r�r�r�r�rs rr�zVertex.is_white�r�rN)	rr r!r"rr�rhrkr�r#rrr�r��s ���
�/�6/�1�1rr�c��eZdZdZd�Zy)r�z$Graph for representing the intersitec�l�t�|_t�|_t�|_d|_yrV)r]rEr_r^r�rs rrzIntersiteGraph.__init__s%�����
��U��
����
�"&��rN�rr r!r"rr#rrr�r�s
��.�'rr�c��eZdZdZd�Zy)r�zDefines a multi edge setc� �d|_g|_y)Nr)r�r_rs rrzMultiEdgeSet.__init__s����	���
rNr�r#rrr�r�s
��"�rr�c��eZdZdZd�Zy)rz#An "edge" between multiple verticesc�Z�d|_g|_d|_t�|_d|_y)NT)r�rEr`rrjrWrs rrzMultiEdge.__init__s'�������
���
�!������
rNr�r#rrrrs
��-�rrc�@�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)r�z�An edge that forms part of the minimal spanning tree

    These are used in the Kruskal's algorithm. Their interesting
    feature isa that they are sortable, with the good edges sorting
    before the bad ones -- lower is better.
    c�X�||_||_||_||_||_||_yrV)rerfr�rjr�r�)rrerf�redred�repl�eTyper�s       rrzInternalEdge.__init__$s,�����������������"��rc��t|j|j|j|j|j
|jf�SrV)�hashrerfr�rjr�r�rs r�__hash__zInternalEdge.__hash__,s:����G�G�T�W�W�d�l�l�D�N�N�D�K�K��N�N���	rc��||kxr||kSrVr#�r�others  r�__eq__zInternalEdge.__eq__1s���%�<��4����$4�4rc��||kxs||kSrVr#rs  r�__ne__zInternalEdge.__ne__4s���e�|�+�u�t�|�+rc��||kSrVr#rs  r�__gt__zInternalEdge.__gt__7s���t�|�rc��||kSrVr#rs  r�__ge__zInternalEdge.__ge__:s���%�<��rc��||kSrVr#rs  r�__le__zInternalEdge.__le__=s���4�<��rc�N�|j|jk7r|jS|jj|jjk7r-|jj|jjkS|jj|jjk7r-|jj|jjkDS|jj
|jj
k7r-|jj|jjkS|jj
|jj
k7r-|jj|jjkS|j|jkS)a�Here "less than" means "better".

        From within MS-ADTS 6.2.2.3.4.4:

        SORT internalEdges by (descending RedRed,
                               ascending ReplInfo.Cost,
                               descending available time in ReplInfo.Schedule,
                               ascending V1ID,
                               ascending V2ID,
                               ascending Type)
        )	r�rjrrrer�r�rfr�rs  r�__lt__zInternalEdge.__lt__@s���<�<�5�=�=�(��<�<���>�>���%�/�/�"6�"6�6��>�>�&�&����)=�)=�=�=��>�>�"�"�e�o�o�&>�&>�>��>�>�*�*�U�_�_�-E�-E�E�E��7�7�<�<�5�8�8�=�=�(��7�7�)�)�E�H�H�,C�,C�C�C��7�7�<�<�5�8�8�=�=�(��7�7�)�)�E�H�H�,C�,C�C�C��{�{�U�\�\�)�)rN)rr r!r"rr�rrrrr
rr#rrr�r�s/���#��
5�,�� � �*rr�)NFN),rCr��samba.kcc.graph_utilsrrr�samba.kcc.kcc_utilsr�	samba.ndrr�samba.dcerpcr�samba.kcc.debugr	r
rr:�objectrrrr@r}r�r�rdrbr�r�r�r�rcr�r�rgr�r�r�r�r�r�r�rr�r#rr�<module>rs���,��N�N�(���1�1��	�6�v�6�.�($�N�<@E�)-�D!�N
�6�&�@@�$�4C�,�(
� 6�(C�@.#�b%)�P�.�:,
�^/�&�/�
<1�V�<1�~'�V�'��6�����>*�6�>*r

Zerion Mini Shell 1.0