plist->name);
for (pentry = plist->head; pentry; pentry = pentry->next) {
- struct prefix *p = &pentry->prefix;
- char buf_a[BUFSIZ];
-
- snprintf(buf_a, sizeof(buf_a), "%pFX", p);
-
json_object_int_add(json_list, "seq", pentry->seq);
json_object_string_add(json_list, "seqPrefixListType",
prefix_list_type_str(pentry));
json_object_int_add(json_list, "le",
pentry->le);
- json_object_object_add(json_prefix, buf_a, json_list);
+ json_object_object_addf(json_prefix, json_list, "%pFX", &pentry->prefix);
}
if (afi == AFI_IP)
json_object_object_add(json, "ipPrefixList",