learning switch code(Analysis2)
TutorialL2Forwarding() close() onPacketReceived packetOut programL2Flow 初始化 logger,FLOOD_PORT_NUMBER, macTable (HashMap <String, NodeConnectorId>) ,function ("hub") ; registrations (List<Registration>) ,dataBroker,packetProcessingService TutorialL2Forwarding() 传参赋值,注册notification监听器 dataBroker packetProcessingService registrations onPacketReceived() Get information of Node Reference,Id& NodeConnector Id, providing the NodeConnectorRef by notification.getIngress() From NodeId,FLOOD_PORT_NUMBER get NodeConnectorId,NodeConnectorRef for flooding Logic: 0. Ignore LLDP packets 1. If behaving as "hub", perform a PACKET_OUT with FLOOD action 2. Else if behaving as "learning switch", 2.1. Extract MAC addresses 2.2. Update MAC table wi...