On Wed, Nov 30, 2016 at 07:46:05PM +0000, Khawar Shehzad wrote: > Thanks. I want to add an element to existing ipv6 map programmatically > in C using libnftnl. From the above example commit, the code specifies > how to add a map (which I assessed by working on the > nft-set-elem-add.c example previously, thanks for the datatypes.c hint > too). I tried > > nftnl_set_elem_set(e, NFTNL_SET_ELEM_KEY, "fe80::2", 16); > nftnl_set_elem_set(e, NFTNL_SET_ELEM_DATA, "fe80::3", 16); > > AND > > nftnl_set_elem_set(e, NFTNL_SET_ELEM_KEY, &(sa1.sin6_addr), > sizeof(sa1.sin6_addr)); > nftnl_set_elem_set(e, NFTNL_SET_ELEM_DATA, &(sa2.sin6_addr), > sizeof(sa2.sin6_addr)); > > but both didn't work. It showed same error i.e. "error: Invalid argument". Oh, those examples are broken. Batch header and trailing are missing, I'm going to fix this. -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html