VOL-929 Uplink packet out

Change-Id: I8d4e54b289de9b8413fa50126551e8ed94cb9e8b
diff --git a/src/core.cc b/src/core.cc
index 81444f1..c763072 100644
--- a/src/core.cc
+++ b/src/core.cc
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Open Networking Foundation 
+    Copyright (C) 2018 Open Networking Foundation
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -187,6 +187,28 @@
     return Status::OK;
 }
 
+Status UplinkPacketOut_(uint32_t intf_id, const std::string pkt) {
+    bcmos_errno err = BCM_ERR_OK;
+    bcmbal_dest proxy_pkt_dest;
+    bcmbal_u8_list_u32_max_2048 buf;
+
+    proxy_pkt_dest.type = BCMBAL_DEST_TYPE_NNI,
+    proxy_pkt_dest.u.nni.intf_id = intf_id;
+
+    buf.len = pkt.size();
+    buf.val = (uint8_t *)malloc((buf.len)*sizeof(uint8_t));
+    memcpy(buf.val, (uint8_t *)pkt.data(), buf.len);
+
+    err = bcmbal_pkt_send(0, proxy_pkt_dest, (const char *)(buf.val), buf.len);
+
+    std::cout << "Packet out of length " << buf.len
+              << " sent through uplink port " << intf_id << std::endl;
+
+    free(buf.val);
+
+    return Status::OK;
+}
+
 Status FlowAdd_(uint32_t onu_id,
                 uint32_t flow_id, const std::string flow_type,
                 uint32_t access_intf_id, uint32_t network_intf_id,