All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Patrick McHardy <kaber@trash.net>
Cc: pablo@netfilter.org, netfilter-devel@vger.kernel.org
Subject: Re: nftables data type names
Date: Sat, 12 Apr 2014 12:56:46 +0200	[thread overview]
Message-ID: <20140412105646.GJ31953@breakpoint.cc> (raw)
In-Reply-To: <20140412102901.GA8090@macbook.localnet>

Patrick McHardy <kaber@trash.net> wrote:
> Before the upcoming release, I'd like to add some more consistency among
> nftables data type names. We currently have the following types:
[..]
> In some cases we're more verbose, in other we're using abrevations.
> I'd like to decide for either one.
> 
> The following ones should IMO definitely be changed:
> 
> - etheraddr => ether_address or mac_address. ether_addr would be more
>   consistent with ethertype.
> 
> - ethertype => ether_type if ether_addr is used

I like ether_type/ether_addr.

> - optionally: *_address => *_addr

We already have 'ip saddr/daddr' etc in nft rules,
so I'd prefer to use _addr everywhere.

> - arphrd => iftype/interface_type?

I read that as "arphdr"...

Since its used of iif/oiftype I think interface_type is good choice.

> If we're deciding for more verbose names (which IMO is fine for types),
> I'd also change:
> 
> - arp_op => arp_operation
> - ifindex => interface_index
> - nfproto => nf_protocol

I agree iff we go for eg. _address instead of _addr.
I would prefer _addr, i.e.

> otherwise:
> 
> - inet_protocol => inet_proto

inet_proto, too.
Looking at scanner.l we also have l3proto, l4proto, nfproto keywords.

[ I realize that there is not requirement to be consistent with
datatype names vs. nft rules but I see no reason to differ ]

> Basically the should be human readable, not programmer readable, should
> describe what they actually are (not arphrd) and should be consistent.

Fully agree, more consistency would be good.

  reply	other threads:[~2014-04-12 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-12 10:29 nftables data type names Patrick McHardy
2014-04-12 10:56 ` Florian Westphal [this message]
2014-04-12 11:03   ` Patrick McHardy
2014-04-13 10:57     ` Patrick McHardy
2014-04-13 12:37       ` Pablo Neira Ayuso
2014-04-13 14:21         ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140412105646.GJ31953@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.