Re: library for ebtales

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Op ma, 04-04-2005 te 21:07 +0200, schreef Jens Götze: 
> yea multiple insertions, deletions and other chain operations (create,
> delete, flush, rename, ...) before commit is fully supported, it a
> naturally. ;o) all counterchanges or other changes will transfer into
> the kernel with ebtc_commit. that include all entries and all counters.
> yes, that is another reason for new implementation. i have needed so a
> library without much gimicks. modules are useful for commandline tools,
> for c programmer is the dymanic loading only annoying. i use first the
> structures in ebtables.h of the linux kernel. that way leaves to me the
> biggest freedom.

Yes, I think it's good to have a small, simple and clean standalone
interface to the kernel.

Are you sure the EBT_SO_SET_COUNTERS implementation is correct? The
reason why this socket call is needed after the EBT_SO_SET_ENTRIES call
is because the kernel counters might have changed and it is up to the
userspace program to figure out what needs to be done to deal with this
(the kernel doesn't know which rules changed).

example:
Suppose the kernel table looks like this:
first entry: pcnt=10, bcnt=10
second entry: pcnt=10, bcnt=10
Suppose we now delete the second rule and append a new one instead.
Suppose the kernel table looks like this right before the
EBT_SO_SET_ENTRIES call:
first entry: pcnt=12, bcnt=12
second entry: pcnt=13, bcnt=13
After the EBT_SO_SET_ENTRIES call, the kernel table will look like this:
first entry: pcnt=0, bcnt=0
second entry: pcnt=0, bcnt=0
After the EBT_SO_SET_COUNTERS call, the kernel must look like this
(supposing the counters didn't change):
first entry: pcnt=12, bcnt=12
second entry: pcnt=0, bcnt=0

> how can i upload that library to the sf cvs from ebtables? can i join to
> ebtables?

Are you planning on supporting ebtables in the future? Unless you
actively take part in development and answering user questions, I don't
see a reason to give you access to the cvs tree.
Of course I'll add your useful library.

cheers,
Bart




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.