Re: library for ebtales
Jens Götze <ebtables-Oy3pwlwbpt9/DD3GX/[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hello bart, in future i will enlarge my activities for iptables and ebtables. currently i have few time for that hobby, because i write my degree dissertation. yes, add this lib to the cvs tree. it is a good first step for an little cute lib. yes, the implementation is correct. i have tested this implementation and you can find this test in folder 'test' under 'ebtc_test2.c'. output of this test: Rule list in chain INPUT before delete ~ Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64) ~ Entry jump to 'CONTINUE' (bcnt = 46; pcnt = 1) Delete second entry Rule list in chain INPUT after delete ~ Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64) Append entry Rule list in chain INPUT after commit ~ Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64) ~ Entry jump to 'CONTINUE' (bcnt = 0; pcnt = 0) bye jens Bart De Schuymer wrote: | 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 | | - -- Jens Götze E-Mail: [email protected] GPG/PGP-Public-Key: http://pgp.1in1.de/jens/publickey.asc GPG-KeyFingerprint: 17D2 FDE6 BC58 DE9B DCF9 EC90 EE58 3E1F DA51 9E6B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCUarq7lg+H9pRnmsRAl/0AJ9U6aWNwMnqjmwV31zMy7I/y4i5wQCeNyyD DT/KjIe9jroutQ64or+0jmA= =6snN -----END PGP SIGNATURE-----
libebtc-0.0.2.tar.gz
(application/gzip, 21.6 KB) - not displayed