summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/client/stat_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/client/stat_client.c')
-rw-r--r--src/vpp-api/client/stat_client.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/vpp-api/client/stat_client.c b/src/vpp-api/client/stat_client.c
index 2cf53d5d0af..25a37f76da8 100644
--- a/src/vpp-api/client/stat_client.c
+++ b/src/vpp-api/client/stat_client.c
@@ -252,8 +252,29 @@ copy_data (stat_segment_directory_entry_t * ep, stat_client_main_t * sm)
result.error_value = error_base[ep->index];
break;
+ case STAT_DIR_TYPE_NAME_VECTOR:
+ if (ep->offset == 0)
+ return result;
+ uint8_t **name_vector =
+ stat_segment_pointer (sm->shared_header, ep->offset);
+ result.name_vector = vec_dup (name_vector);
+ offset_vector =
+ stat_segment_pointer (sm->shared_header, ep->offset_vector);
+ for (i = 0; i < vec_len (name_vector); i++)
+ {
+ if (offset_vector[i])
+ {
+ u8 *name =
+ stat_segment_pointer (sm->shared_header, offset_vector[i]);
+ result.name_vector[i] = vec_dup (name);
+ }
+ else
+ result.name_vector[i] = 0;
+ }
+ break;
+
default:
- fprintf (stderr, "Unknown type: %d", ep->type);
+ fprintf (stderr, "Unknown type: %d\n", ep->type);
}
return result;
}