From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: Re: RFC: net/netfilter reorganization
Date: Sun, 05 Oct 2008 16:02:53 +0200 [thread overview]
Message-ID: <48E8C90D.10202@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0810050925350.21891@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> On Sunday 2008-10-05 08:34, Patrick McHardy wrote:
>
>> Some suggestions for a new directory structure:
>>
>> net/netfilter/xtables
>> net/netfilter/{ct, conntrack, nfct, ...}
>> net/netfilter/nftables for my new stuff
>
> Yes definitely welcomed.
>
>> We could go further by splitting up xtables and conntrack,
>
> That's just what you proposed! Or at least that is what I think of
> Netfilter. Xtables and Conntrack are already separated, simply
> because each one can be used without the other. (Minus things like
> xt_conntrack, which I think belong to Xtables.)
Yes, confusing wording. I meant splitting them up internally,
i.e. xtables => matches/targets etc, as described below. And
its only about the directory structure of course, how things
work together at runtime remains the same.
>> Since the amount of core code is increasing too, one more
>> thought was
>>
>> net/netfilter/core
>>
>> containing core.c, netfilter.c, logging and queuing stuff and
>> everything netlink related that doesn't fall in a more specific
>> area.
>
> I think the core stuff can remain in net/netfilter/. Not because
> it is growing, but because other subsystems do just that.
> Like, there is fs/ (with the core code) and fs/<component>/ for
> anything not-so-core-y.
I agree that its more logical to keep the core stuff at the
netfilter root.
> What I really certainly would like to see is that we somehow get rid
> of the oddness of naming L3 trackers and L4 trackers. Right now we
> have (two examples)
>
> -rw-r--r-- 1 15924 2008-09-09 20:34 nf_conntrack_ftp.c
> -rw-r--r-- 1 43369 2008-09-09 20:33 nf_conntrack_proto_tcp.c
>
> and in everybody's mind, FTP is a protocol too of course, “so why
> does not ftp have a _proto part, and why does TCP?” one might ask.
> We could just remove the _proto part (also helpful to reduce the
> name length), as there is no clash between L3 and L4 trackers
> except perhaps for proto_generic and l3proto_generic. Hm?
Agreed, this is a good opportunity to fix that as well.
The _proto prefix becomes redundant if we use
net/netfilter/ct/protocols
anyway.
> One thing I have done in my git realms is just call my branches
> "nfct_foo" simply because I was too lazy to type "nf_conntrack_foo".
> Maybe we could do the same for our files? Maybe we can even get rid
> of the nf_conntrack_/nfct_ prefix at all when they are moved into
> net/netfilter/conntrack/, but still have it in their .ko files. IOW:
> net/netfilter/conntrack/ftp.c produces
> net/netfilter/conntrack/nfct_ftp.ko. How about it?
Its a quite verbose naming scheme currently, I agree. I like
some common prefixes for related things, even if slightly
redundant, but using nfct_ instead of nf_conntrack_ sounds
fine to me.
> core.c (remains)
> nf_conntrack_acct.c -> conntrack/acct.c
> nf_conntrack_amanda.c -> conntrack/amanda.c
> nf_conntrack_core.c -> conntrack/core.c
> ...
> nf_log.c (remains)
> nfnetlink.c (remains)
> nfnetlink_log.c (remains)
> nfnetlink_queue.c (...)
> nf_queue.c
> nf_sockopt.c
> x_tables.c -> xtables/x_tables.c
> xt_CLASSIFY.c -> xtables/CLASSIFY.c (or just keep xt_ prefix?)
> xt_comment.c -> ...
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-10-05 14:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 12:34 RFC: net/netfilter reorganization Patrick McHardy
2008-10-05 13:47 ` Jan Engelhardt
2008-10-05 14:02 ` Patrick McHardy [this message]
2008-10-05 14:35 ` Jan Engelhardt
2008-10-05 14:48 ` Patrick McHardy
2008-10-05 16:02 ` David Miller
2008-10-05 16:11 ` Patrick McHardy
2008-10-05 16:15 ` Jan Engelhardt
2008-10-05 16:21 ` Patrick McHardy
2008-10-05 16:25 ` Jan Engelhardt
2008-10-05 16:32 ` Patrick McHardy
2008-10-05 19:06 ` Jozsef Kadlecsik
2008-10-05 20:28 ` David Miller
2008-10-05 20:33 ` Jan Engelhardt
2008-10-05 20:48 ` Jan Engelhardt
2008-10-05 21:42 ` Jozsef Kadlecsik
2008-10-05 22:00 ` Patrick McHardy
2008-10-05 23:16 ` Jan Engelhardt
2008-10-06 10:07 ` Patrick McHardy
2008-10-07 1:08 ` Jan Engelhardt
2008-10-07 11:34 ` Roman Zippel
2008-10-07 15:30 ` Jan Engelhardt
2008-10-07 17:09 ` Roman Zippel
2008-10-07 17:44 ` Jan Engelhardt
2008-10-13 18:52 ` Roman Zippel
2008-10-17 14:53 ` Jan Engelhardt
2008-10-06 7:23 ` Jozsef Kadlecsik
2008-10-06 10:09 ` Patrick McHardy
2008-10-05 16:17 ` David Miller
2008-10-05 16:22 ` Patrick McHardy
2008-10-06 16:17 ` Jan Engelhardt
2008-10-05 21:51 ` Jozsef Kadlecsik
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=48E8C90D.10202@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.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.