VOL-1023 - Supporting multiple UNI per ONU

To support multiple UNIs on a given ONU, OpenOLT Driver is updated to support
an abstract opaque cookie that is registered with all controller-bound trap
flows. This cookie is supplied back to adapter during all packet indications.
OpenOLT adapter will use this cookie to track the OF logical port that should
be used to reflect the origin of packet to OF controller.

For outbound packets from controller, the system needs to inject frames
directly onto a GEM port rather than towards "any GEM" associated with the ONU.
This is necessary to send to various UNIs on one ONU. This is achieved by
registering the OF logical port number with the flow and gemport(s) associated
with the port. The OF Out packet will include the logical port number and
hence can be tracked back to a registered GEM for that UNI.

Change-Id: I1085a4b44d12b9402a431c41083e3a5cdb4764b9
diff --git a/agent/common/core.h b/agent/common/core.h
index 840d0c8..01e09a0 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -42,21 +42,22 @@
 unsigned NumNniIf_();
 unsigned NumPonIf_();
 Status OmciMsgOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt);
-Status OnuPacketOut_(uint32_t intf_id, uint32_t onu_id, const std::string pkt);
+Status OnuPacketOut_(uint32_t intf_id, uint32_t onu_id, uint32_t port_no, const std::string pkt);
 Status ProbeDeviceCapabilities_();
 Status ProbePonIfTechnology_();
 Status UplinkPacketOut_(uint32_t intf_id, const std::string pkt);
-Status FlowAdd_(int32_t access_intf_id, int32_t onu_id,
+Status FlowAdd_(int32_t access_intf_id, int32_t onu_id, int32_t uni_id, uint32_t port_no,
                 uint32_t flow_id, const std::string flow_type,
                 int32_t alloc_id, int32_t network_intf_id,
                 int32_t gemport_id, const ::openolt::Classifier& classifier,
-                const ::openolt::Action& action, int32_t priority_value);
+                const ::openolt::Action& action, int32_t priority_value, uint64_t cookie);
 Status FlowRemove_(uint32_t flow_id, const std::string flow_type);
 Status Disable_();
 Status Reenable_();
 Status GetDeviceInfo_(openolt::DeviceInfo* device_info);
 Status CreateTconts_(const openolt::Tconts *tconts);
 Status RemoveTconts_(const openolt::Tconts *tconts);
+uint32_t GetPortNum_(uint32_t flow_id);
 
 void stats_collection();
 #endif