*/
void netlink_read_init(const char *fname)
{
+ struct zebra_dplane_info dp_info;
+
snprintf(netlink_fuzz_file, MAXPATHLEN, "%s", fname);
/* Creating this fake socket for testing purposes */
struct zebra_ns *zns = zebra_ns_lookup(NS_DEFAULT);
- netlink_parse_info(netlink_information_fetch, &zns->netlink, zns, 1, 0);
+ /* Capture key info from zns struct */
+ zebra_dplane_info_from_zns(&dp_info, zns, false);
+
+ netlink_parse_info(netlink_information_fetch, &zns->netlink,
+ &dp_info, 1, 0);
}
/**
*
* filter -> The filter to read final results from kernel
* nlmsghdr -> The data to send to the kernel
- * zns_info -> The netlink socket information
+ * dp_info -> The dataplane and netlink socket information
* startup -> Are we reading in under startup conditions
* This is passed through eventually to filter.
*/
return -1;
}
-
/*
* Get reply from netlink socket.
* The reply should either be an acknowlegement or an error.
/*
* Synchronous version of netlink_talk_info. Converts args to suit the
* common version, which is suitable for both sync and async use.
- *
*/
int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
struct nlmsghdr *n, struct nlsock *nl, struct zebra_ns *zns,