Re: Help with ulog!!
Bart De Schuymer <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Op ma, 12-09-2005 te 22:25 +0400, schreef ramsurrunv-aD7nsNzqxXzCK/[email protected]: > >> 2) ebtables -A OUTPUT -p IPv4 -j ACCEPT > >> ebtables -A OUTPUT -p IPv4 --ulog-nlgroup 5 -j ACCEPT > Dear Bart, > > thx for the reply.. > > If I understand well, it means that if both rules accept the packet, one > packet is sent out of the interface and a copy of the packet is sent to > the userspace program. > > One thing more..i found the test_ulog.c program. If I want just to execute > sth like: > > printf("Hey it's an IP packet!!); > pck_count+=1; You don't need to know network programming to read C code. Try adding something like this: if (ehdr->h_proto == htons(ETH_P_IP)) printf("Hey it's an IP packet!!); ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf