diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-01-29 17:14:41 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2017-02-02 13:42:36 +0200 |
commit | 39000f461de6b85877db85488b1cc7f1fad9d359 (patch) | |
tree | 8ffa214f3876009bf8778881c63b6c245244ac41 /src/main_dpdk.cpp | |
parent | 790059069915a700905f4746b22a9a4a6cadc6ad (diff) |
ipv6 scan & ping
Change-Id: I4f8112b4c942d149da5ea3f0ee01ac82d7fe32cc
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r-- | src/main_dpdk.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index ebad39df..687cf457 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -1874,6 +1874,15 @@ int DpdkTRexPortAttr::set_promiscuous(bool enable){ return 0; } +int DpdkTRexPortAttr::set_multicast(bool enable){ + if (enable) { + rte_eth_allmulticast_enable(m_port_id); + }else{ + rte_eth_allmulticast_disable(m_port_id); + } + return 0; +} + int DpdkTRexPortAttr::set_link_up(bool up){ if (up) { return rte_eth_dev_set_link_up(m_port_id); @@ -1893,6 +1902,17 @@ bool DpdkTRexPortAttr::get_promiscuous(){ return ( ret?true:false); } +bool DpdkTRexPortAttr::get_multicast(){ + int ret=rte_eth_allmulticast_get(m_port_id); + if (ret<0) { + rte_exit(EXIT_FAILURE, "rte_eth_allmulticast_get: " + "err=%d, port=%u\n", + ret, m_port_id); + + } + return ( ret?true:false); +} + void DpdkTRexPortAttr::get_hw_src_mac(struct ether_addr *mac_addr){ rte_eth_macaddr_get(m_port_id , mac_addr); |