- strncpy ((char *) rmp->program, "vpe", ARRAY_LEN(rmp->program)-1);
- strncpy ((char *) rmp->build_directory, vpe_api_get_build_directory(),
- ARRAY_LEN(rmp->build_directory)-1);
- strncpy ((char *) rmp->version, vpe_api_get_version(),
- ARRAY_LEN(rmp->version)-1);
- strncpy ((char *) rmp->build_date, vpe_api_get_build_date(),
- ARRAY_LEN(rmp->build_date)-1);
+ char *p = (char *)&rmp->program;
+ p += vl_api_to_api_string(program_len, "vpe", (vl_api_string_t *)p);
+ p += vl_api_to_api_string(version_len, vpe_api_get_version(), (vl_api_string_t *)p);
+ p += vl_api_to_api_string(build_date_len, vpe_api_get_build_date(), (vl_api_string_t *)p);
+ vl_api_to_api_string(build_directory_len, vpe_api_get_build_directory(), (vl_api_string_t *)p);