From: Amin Azez Subject: Re: [RFC] XML output for libnetfilter_conntrack Date: Tue, 21 Nov 2006 16:01:42 +0000 Message-ID: <456322E6.4070901@ufomechanic.net> References: <4563061F.4080904@netfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Eric Leblond Return-path: To: netfilter-devel@lists.netfilter.org In-Reply-To: <4563061F.4080904@netfilter.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org * Pablo Neira Ayuso wrote, On 21/11/06 13:58: > Hi, > > I'm about to complete the new API for libnetfilter_conntrack, it > includes the possibility to dump conntrack entries in XML besides of the > classic output similar to the primitive /proc interface. An example of > the XML layout is the following: > > /* > * XML output sample: > * > * > * > * > * 192.168.0.1 > * 192.168.0.2 How about - maybe even ditch proto from num and name, what else could it be? If there could possibly be other attributes of src and dst I can see why we might have seperate tags as shown here with the ip's as un-named text nodes acting as a "default" attribute. > * > * > * 80 > * 56665 > * > * > * > * > * 192.168.0.2 > * 192.168.0.1 > * > * > * 80 > * 56665 > * > * > * > * > * > * ESTABLISHED given that states may be per protocol and possibly complicated maybe there is better reason to have a state tag than to have a src tag ? > * > * > * 100 > * yes > * > * 10 > * 1 again, I'm for I also prefer to have the counters in the with tuple. This is perhaps confused because the tuple contains contrack identification information as well as connection properties against which the counters are naturally associated. On reflection, I think that the "tuple" nature of ip and ports is not relevant to the xml representation IFF the xml representation is supposed to abstract away the conntrack implementation. > * > * > * 5029 > * 12 > * > * > * > */ > > Comments welcome, > I suggest an alternative compact version from which greater verboseness might be justified. | | I realise that layer2 isn't part of the main conntrack but it is part of my conntrack, so I put it in there. I guess at name and number for layer2. Maybe sport and dport should be used for L4 and not src and dst again...?? Sam