Re: [lnf-log PATCHv2 1/3] introduce new functions independent from libnfnetlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 21, 2015 at 09:26:08AM +0900, Ken-ichirou MATSUZAWA wrote:
> The libnetfilter_log.c file contains the old API, its use is
> discouraged since it depends on libnfnetlink.
> 
> The idea is to provide a set of helper functions that we can use in
> conjunction with libmnl, similar to what we have in
> libnetfilter_queue/nlmsg.c

Applied with minor change, thanks!

> +int nflog_attr_put_cfg_mode(struct nlmsghdr *nlh, uint8_t mode, uint32_t range)
> +{
> +	struct nfulnl_msg_config_mode nfmode = {
> +		.copy_mode = mode,
> +		.copy_range = htonl(range)
> +	};
> +
> +	mnl_attr_put(nlh, NFULA_CFG_MODE, sizeof(nfmode), &nfmode);
> +
> +	/* it may returns -1 in future */
> +	return 1;

This is now returning 0 instead.

So we reserve negative values for errors, 0 means success and >= 0 are
left unused for future use.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux