Re: [PATCH nf-next,RFC 3/8] netfilter: nf_tables: expose opaque set element as struct nft_elem_priv

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

 



Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> +static inline void *nft_elem_priv_cast(const struct nft_elem_priv *priv)
> +{
> +	return (void *)priv;
> +}

I'm fine with this, alternative would be to make this per-set backend:

#define nft_elem_priv_to_bitmap_elem(ptr)	container_of_const(ptr, struct nft_bitmap_elem, priv)

I'll leave it up to you.  The only advantage of the latter is that priv
doesn't have to be the first member.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux