+ std::shared_ptr<ip_punt_redirect_cmds::dump_cmd> cmd =
+ std::make_shared<ip_punt_redirect_cmds::dump_cmd>();
+
+ HW::enqueue(cmd);
+ HW::write();
+
+ for (auto& record : *cmd) {
+ auto& payload = record.get_payload();
+
+ std::shared_ptr<interface> tx_itf =
+ interface::find(payload.punt.tx_sw_if_index);
+ std::shared_ptr<interface> rx_itf =
+ interface::find(payload.punt.rx_sw_if_index);
+ boost::asio::ip::address nh = from_api(payload.punt.nh);
+
+ VOM_LOG(log_level_t::DEBUG) << "data: [" << payload.punt.tx_sw_if_index
+ << ", " << payload.punt.rx_sw_if_index << ", "
+ << nh << "]";
+
+ if (rx_itf && tx_itf) {
+ ip_punt_redirect ipr(*rx_itf, *tx_itf, nh);
+ OM::commit(key, ipr);
+ VOM_LOG(log_level_t::DEBUG) << "read: " << ipr.to_string();
+ } else if (tx_itf) {
+ ip_punt_redirect ipr(*tx_itf, nh);
+ OM::commit(key, ipr);
+ VOM_LOG(log_level_t::DEBUG) << "read: " << ipr.to_string();
+ }
+ }