Skip to contentSkip to conversation

(no subject)

DISCUSSION sanoj mg 4 participants 4 messages Apr 14, 2003 – Apr 20, 2003 netfilter

lore
Share & tools
lore

sanoj mg

author
#0 lore raw

hello, I am looking for a netfilter filter project to work with( of about 5 month duration).I would be very buch obliged if any of you give any ideas/directions on this. sanoj.

---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

#2 lore raw

netfilter language

Hello,
I have been playing with the userspace component
of iptables, making my own QUEUE application, with varying levels of success (as seen in previous emails). Because of my needs which I don't think can be fulfilled in a QUEUE, I am thinking of looking into working more in the kernel level netfilter.
I was wondering, can C++ be used in developing
netfilter modules, or is it really limited more to C? The material I would shift into a netfilter area is pretty simple, so I can easily convert it to C if needed. Also, are there any references to the order in which my work would be called? Because of it's nature, I would need to be called before any other handler module (especially conn track). Thanks in advance!

-Scott

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

#3 lore raw

Re: netfilter language

Quoted 2 lines

I was wondering, can C++ be used in developing
netfilter modules, or is it really limited more to C?

ANY kernel development is limited to C - Gnu gcc, to be exact.

Quoted 2 lines

Also, are there any references to the order
in which my work would be called?

See the definition of 'enum nf_ip_hook_priorities' in the file include/linux/netfilter_ipv4.h. These go into the 'priority' field of the 'struct nf_hook_ops' (declaration in include/linux/netfilter.h).

You define such a 'struct nf_hook_ops', and pass it to nf_register_hook(), in your module initialization code.

Quoted 2 lines

Because of it's nature, I would need to be called before any other handler module (especially conn track).

Just use a priority numerically lower than -200 (NF_IP_PRI_CONNTRACK).

best regards
Patrick