在 ryu/topology/switches.py
中有幾個主要類別
<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>