First hints for developing

George <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Hi all.

I'm interested on developing a modules to do some stuff at MAC layer and I 
think the best option is ebtables. I've been reading and there seems to be 
quite similar to Netfilter modules, but I still have some doubts.

I have seen that there are some hooks NF_BR_XXX_YYYY. In netfilter there 
are the same. What I want to achieve is to develop a module that once it 
traverse a hook, the register function is executed.
In netfilter is done like :

struct nf_hook_ops hook_ex;

   hook_ex.list.next = NULL;
   hook_ex.list.prev = NULL;
   hook_ex.hook = function_hook;
   hook_ex.pf = PF_INET;
   hook_ex.hooknum = NF_IP_LOCAL_OUT;

   return nf_register_hook(&hook_ex);


How is the same achieved in ebtables? is something with struct ebt_match? 
Could you give me a simple example code that just printk some message when 
a packet traverse the NF_BR_PRE_ROUTING for example

TA.



-------------------------------------------------------
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_id=6595&alloc_id=14396&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.