summaryrefslogtreecommitdiffstats
path: root/src/trex_port_attr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trex_port_attr.cpp')
-rw-r--r--src/trex_port_attr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/trex_port_attr.cpp b/src/trex_port_attr.cpp
index 08e151b6..26199e33 100644
--- a/src/trex_port_attr.cpp
+++ b/src/trex_port_attr.cpp
@@ -20,6 +20,12 @@ limitations under the License.
const uint8_t DestAttr::g_dummy_mac[6] = {0x0,0x0,0x0,0x1,0x0,0x0};
+DestAttr::DestAttr(uint8_t port_id) {
+ m_port_id = port_id;
+
+ m_mac = CGlobalInfo::m_options.m_mac_addr[port_id].u.m_mac.dest;
+}
+
const uint8_t *
TRexPortAttr::get_src_mac() const {
return CGlobalInfo::m_options.get_src_mac_addr(m_port_id);