目錄表

Ryu Topology Discovery Class

0x00 前言

0x01 LLDP 概述

0x02 原始碼類別

ryu/topology/switches.py 中有幾個主要類別

0x03 Port Class

<html>
<style>
pre { box-shadow: none; }
table, td { border: none; }
</style>

<body>
<script type='text/javascript' src='gistfy-app.herokuapp.com/github/nike1000/ryu/ryu/topology/switches.py?branch=master&slice=59:104&lang=python&style=github'></script>
</body>
</html>

*
is_reserved : 回傳了此 port 是否為保留 port, self._ofproto.OFPP_MAX 的值為 0xffffff00,可在 ryu/ofproto/ofproto_v1_3.py 中找到,其他的保留 port 則都會大於這個值
*
is_down : 回傳了此 port 是否關閉
*
is_live : 則回傳了此 port 是否開啟,與 is_down 為相反值
*
to_dict : 則回傳了這個 port 所屬的 dpid, port_no, hw_addr, name 等 dictionary 資訊

=====0x04 Switch Class=====

<html>
<style>
pre { box-shadow: none; }
table, td { border: none; }
</style>

<body>
<script type='text/javascript' src='
gistfy-app.herokuapp.com/github/nike1000/ryu/ryu/topology/switches.py?branch=master&slice=107:134&lang=python&style=github'></script>
</body>
</html>

0x06 Host Class

0x07 HostState Class

0x08 PortState Class

0x09 PortData

0x0A PortDataState

0x0B LinkState

0x0C LLDPPacket

0x0D Switches