+static walk_rc_t
+send_ip_punt_redirect_v2_details (u32 rx_sw_if_index,
+ const ip_punt_redirect_rx_t *ipr, void *arg)
+{
+ vl_api_ip_punt_redirect_v2_details_t *mp;
+ fib_path_encode_ctx_t path_ctx = {
+ .rpaths = NULL,
+ };
+ fib_route_path_t *rpath;
+ ip_walk_ctx_t *ctx = arg;
+ vl_api_fib_path_t *fp;
+ int n_paths;
+
+ fib_path_list_walk_w_ext (ipr->pl, NULL, fib_path_encode, &path_ctx);
+
+ n_paths = vec_len (path_ctx.rpaths);
+ mp = vl_msg_api_alloc (sizeof (*mp) + n_paths * sizeof (*fp));
+ if (!mp)
+ return (WALK_STOP);
+
+ clib_memset (mp, 0, sizeof (*mp));
+ mp->_vl_msg_id =
+ ntohs (REPLY_MSG_ID_BASE + VL_API_IP_PUNT_REDIRECT_V2_DETAILS);
+ mp->context = ctx->context;
+ mp->punt.rx_sw_if_index = htonl (rx_sw_if_index);
+ mp->punt.n_paths = htonl (n_paths);
+ fp = mp->punt.paths;
+ vec_foreach (rpath, path_ctx.rpaths)
+ {
+ fib_api_path_encode (rpath, fp);
+ fp++;
+ }
+ mp->punt.af = (ipr->fproto == FIB_PROTOCOL_IP6) ? ADDRESS_IP6 : ADDRESS_IP4;
+
+ vl_api_send_msg (ctx->reg, (u8 *) mp);
+
+ vec_free (path_ctx.rpaths);
+
+ return (WALK_CONTINUE);
+}
+
+static void
+vl_api_ip_punt_redirect_dump_common (ip_walk_ctx_t *ctx, fib_protocol_t fproto,
+ u32 rx_sw_if_index,
+ ip_punt_redirect_walk_cb_t cb)
+{
+
+ if ((u32) ~0 != rx_sw_if_index)
+ {
+ index_t pri;
+ pri = ip_punt_redirect_find (fproto, rx_sw_if_index);
+
+ if (INDEX_INVALID == pri)
+ return;
+
+ cb (rx_sw_if_index, ip_punt_redirect_get (pri), ctx);
+ }
+ else
+ ip_punt_redirect_walk (fproto, cb, ctx);
+}
+