OpenDaylight实战手记(七)添加网元流程(South -To- North)
来源:互联网 发布:中国影响力 知乎 编辑:程序博客网 时间:2024/06/04 18:14
1、org.opendaylight.controller.protocol_plugin.openflow.core.internal.ControllerIO
controllerIOThread线程的runnabble接口中接收设备的连接请求
2、org.opendaylight.controller.protocol_plugin.openflow.core.internal.Controller
public void handleNewConnection(Selector selector, SelectionKey serverSelectionKey)
每个连接请求对应一个switch,new一个SwitchHandler,然后调用SwitchHandler的start()方法
3、org.opendaylight.controller.protocol_plugin.openflow.core.internal.SwitchHandler
start()方法启动收发线程和消息通道。
4、org.opendaylight.controller.protocol_plugin.openflow.core.internal.SwitchHandler
接收线程switchHandlerThread,接受消息、处理消息:主要从IMessageReadWrite msgReadWriteService这个接口获取接受到的消息,判断OFMessage类型消息的用途,对应不同通途进行处理。
5、org.opendaylight.controller.protocol_plugin.openflow.core.internal.Controller
如果是对交换机进行处理(增加、删除、更新),调用public void takeSwitchEventMsg(ISwitch sw, OFMessage msg)方法,然后生成交换机事件SwitchEvent,放到交换机时间处理队列,PriorityBlockingQueue<SwitchEvent> switchEvents。switchEventThread线程中run方法对SwitchEvent进行处理。如果是增加是事件,那么ConcurrentHashMap<Long, ISwitch> switches中增加该switch。最后通知ISwitchStateListener监听器,这里ISwitchStateListener监听器只有一个:InventoryServiceShim。
6、org.opendaylight.controller.protocol_plugin.openflow.internal.InventoryServiceShim
InventoryServiceShim中通过private void notifyInventoryShimListener(NodeConnector nodeConnector, UpdateType type, Set<Property> props)通知,这个方法中遍历所有Container,通知IInventoryShimInternalListener,然后通知plugin listeners,notifyInventoryShimExternalListener(NodeConnector nodeConnector, UpdateType type, Set<Property> props)
注:交换机的删除和更新也是类似
- OpenDaylight实战手记(七)添加网元流程(South -To- North)
- OpenDaylight实战手记(六)添加流表流程(North-To-South)
- South & North
- North and South
- OpenDaylight实战手记(一)工欲善其事,必先利其器:OpenDaylight相关技术
- OpenDaylight实战手记(二)OpenDaylight编译、安装、运行
- OpenDaylight实战手记(一)工欲善其事,必先利其器:OpenDaylight相关技术
- OpenDaylight实战手记(四)研究simple forwarding
- OpenDaylight实战手记(五)源代码研读
- OpenDaylight实战手记(三)OpenDaylight中使用Eclipse的几个Tricks
- BNU All Your Base (Regionals 2011, North America - South Central USA) - from lanshui_Yang
- the allegedly exchange of fire between north and south
- 机器学习实战代码详解(七)利用AdaBoost元算法提高分类性能
- 错误隐藏学习手记(七)
- AngularJS实战(七)
- 模板元函数(七)
- 系统启动流程(七)
- 实战手记之高级NAT(Checkpoint)
- 一软一硬 让你时刻保持清醒的可穿戴产品
- selenium如何启动IE,Chrome浏览器
- 网站内页如何优化上百度首页?
- msm8610 lcd driver code analysis
- Eclipse中web-inf和meta-inf文件夹的信息
- OpenDaylight实战手记(七)添加网元流程(South -To- North)
- Activity管理
- oracle命令登录,锁死解决办法
- Dephi将金额转换的大写金额
- springMVC的注解1
- centos 配置虚拟目录
- js调用后台servlet方法
- Oracle的数据导入到SQLServer2005中
- linux读写属性节点