<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
  <diagram name="Page-1" id="c7488fd3-1785-93aa-aadb-54a6760d102a">
    <mxGraphModel dx="988" dy="570" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="none" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="W-n-PndQ-2xYdpGvvika-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-3" target="W-n-PndQ-2xYdpGvvika-4" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-3" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;" parent="1" vertex="1">
          <mxGeometry x="170" y="350" width="50" height="100" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-4" target="W-n-PndQ-2xYdpGvvika-6" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-4" value="通知caller扔掉包" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0;" parent="1" vertex="1">
          <mxGeometry x="300" y="440" width="100" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-6" value="生成一个Ethernet Packet&lt;div&gt;(type field =&lt;br style=&quot;font-size: 8px;&quot;&gt;ether_type$ADDR_RESOLUTION&lt;/div&gt;" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0;fontSize=8;align=center;" parent="1" vertex="1">
          <mxGeometry x="500" y="435" width="150" height="70" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-8" target="W-n-PndQ-2xYdpGvvika-10" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-8" value="设置ar$hrd为ares_hrd$Ethernet,&lt;div&gt;ar$pro为protocol type&lt;/div&gt;" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0;fontSize=8;align=center;" parent="1" vertex="1">
          <mxGeometry x="500" y="550" width="150" height="70" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=-0.081;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-6" target="W-n-PndQ-2xYdpGvvika-8" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-10" edge="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="575.1111111111111" y="770.0555555555554" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-10" value="设置ar$hrd为ares_hrd$Ethernet,&lt;div&gt;ar$pro为protocol type&lt;/div&gt;&lt;div&gt;ar$hln为6,MAC地址的字节数&lt;/div&gt;&lt;div&gt;ar$pln为地址协议的长度&lt;/div&gt;&lt;div&gt;ar$op为ares_op$REQUEST&lt;/div&gt;&lt;div&gt;ar$sha为48位网络地址&lt;/div&gt;&lt;div&gt;ar$spa是协议地址(ipv4)&lt;/div&gt;&lt;div&gt;ar$tpa是机器尝试访问的协议地址&lt;/div&gt;&lt;div&gt;ar$tha不需要特别设定&lt;/div&gt;&lt;div&gt;ar$tha可以设置成广播地址&lt;/div&gt;" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0;fontSize=8;align=center;" parent="1" vertex="1">
          <mxGeometry x="500" y="680" width="150" height="110" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-13" target="W-n-PndQ-2xYdpGvvika-14" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-13" value="有在ar$hrd的硬件类型吗？（支持这个硬件类型吗？）" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="200" y="110" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-14" target="W-n-PndQ-2xYdpGvvika-17" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-14" value="这个包的协议是在ar$pro中吗？（支持这个协议类型吗？）（可能检查地址长度" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="390" y="110" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-15" value="如果Merge_flag是false&lt;div&gt;发送方协议地址，&lt;/div&gt;&lt;div&gt;发送方硬件地址&lt;/div&gt;&lt;div&gt;存入ARP&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="580" y="230" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-16" target="W-n-PndQ-2xYdpGvvika-15" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-16" target="W-n-PndQ-2xYdpGvvika-18" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-16" value="这个包是目的协议地址吗？" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="580" y="110" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-17" value="把标志位Merge_flag设置为False&lt;div&gt;在ARP缓存表中查找发送方协议地址&lt;br&gt;如果存在更新ip-mac表&lt;/div&gt;&lt;div&gt;把标志位Merge_flag设置为true&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="390" y="210" width="120" height="100" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-18" target="W-n-PndQ-2xYdpGvvika-19" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-18" target="W-n-PndQ-2xYdpGvvika-20" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-18" value="opcode是ares_op$REQUEST吗？" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="770" y="110" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-19" value="交换硬件和协议部分，把本地硬件和协议地址放到发送区&lt;div&gt;设置ar$op部分为ares_op$REPLY&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="770" y="230" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-20" value="发送" style="rounded=1;whiteSpace=wrap;html=1;fontSize=10;" parent="1" vertex="1">
          <mxGeometry x="960" y="110" width="120" height="60" as="geometry" />
        </mxCell>
        <mxCell id="W-n-PndQ-2xYdpGvvika-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.029;entryY=0.516;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="W-n-PndQ-2xYdpGvvika-14" target="W-n-PndQ-2xYdpGvvika-16" edge="1">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
