On Sun, May 23, 2021 at 11:26:46PM +0200, Florian Westphal wrote: > Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > On Sun, May 23, 2021 at 08:54:31PM +0200, Florian Westphal wrote: > > > Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > > > On Fri, May 21, 2021 at 01:39:22PM +0200, Florian Westphal wrote: > > > > > * @NFTA_HOOK_FUNCTION_NAME: hook function name (NLA_STRING) > > > > > * @NFTA_HOOK_MODULE_NAME: kernel module that registered this hook (NLA_STRING) > > > > > + * @NFTA_HOOK_NFT_CHAIN_INFO: nft chain and table name (NLA_NESTED) > > > > > > > > Probably NFTA_HOOK_CHAIN_INFO ? > > > > > > I added _NFT_ to avoid ambiguity in case this would be extended > > > to add xt-legacy chain info. I can drop the _NFT_, let me know. > > > > It's a NLA_NESTED, you might add a _TYPE field inside the nest to > > describe what type of chain info is stored there, maybe? > > It uses enum nft_chain_attributes, it somehow feels wrong to add a > 'type' field for that. Agreed. Probably another nest level. NFTA_HOOK_CHAIN_INFO CHAIN_INFO_DESC nft_chain_attributes CHAIN_INFO_TYPE > I could add a new enum if you prefer. > > At this point I don't think adding xt specific info is useful > because the chain function name already tell if its mangle, raw etc. I'd prefer to not expose internal kernel functions names, but I understand this approach is simple.