On Thu, Aug 20, 2015 at 04:26:45PM +0900, Ken-ichirou MATSUZAWA wrote: > Thank you for the reply. > > On Thu, Aug 20, 2015 at 12:04:03AM +0200, Pablo Neira Ayuso wrote: > > I suggest you remove the nflog_data_init(), nflog_data_alloc(), > > nflog_data_free() and nflog_nlmsg_parse(). > > > > Those are part of the old API, we should focus on API that we can > > combine with libmnl. > > I think I can follow your suggestion, is it correct? > > Please let me ask two more things. > With these functions, nflog attrs can be acquired by > mnl_attr_get_payload, but can not show as XML in one shot. > > To do it, may I post another patch: > > struct nflog_data *nfnl_attrs2data(struct nlattr **attr) > { > struct nflog_data *nfad = calloc(1, sizeof(struct nflog_data)); > if (nfad == NULL) > return NULL; > nfad->nfa = (struct nfattr **)&attr[1]; > return nfad; > } > > Is it acceptable? I would like not to have any code that mixes both APIs. The idea is to deprecate libnfnetlink and any client of that library at some point, that will take quite time though since we'll have to mark those old interfaces as deprecated. Please, see my rough proposal patch attached so you also have access to the XML output, it applies on top of your patchset. I made some quick testing here, review it. Note that I have also included the nlmsghdr as it contains useful information that we may want to display in the feature (eg. queue number). > It's just my curiosity, would you tell me what does nfnl_ prefix > stand for? Good point, we should be using nflog_ prefix instead, sorry. nfnl_ is already used by libnfnetlink so we can't use it. Will you send me a new round of patches? Thanks!