+
+std::shared_ptr<pipe>
+interface_factory::new_pipe_interface(const vapi_payload_pipe_details& payload)
+{
+ std::shared_ptr<pipe> sp;
+
+ handle_t hdl(payload.sw_if_index);
+ pipe::handle_pair_t hdl_pair(payload.pipe_sw_if_index[0],
+ payload.pipe_sw_if_index[1]);
+
+ sp = pipe(payload.instance, interface::admin_state_t::UP).singular();
+
+ sp->set(hdl);
+ sp->set_ends(hdl_pair);
+
+ return (sp);
+}
+