Skip to contentSkip to conversation

Question about nf_hookfn

DISCUSSION Emmanuel Fleury 2 participants 2 messages Oct 10, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all,

I would like to know more about the last argument of the function nf_hookfn defined in /usr/src/linux/include/linux/netfilter.h.

Basically, you have:

typedef unsigned int nf_hookfn(unsigned int hooknum,
struct sk_buff **skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *));

I got all the other arguments but the last one...

What is it for ???

Regards

Signature · 4 lines
Emmanuel

Modern technology just makes people try to do everything at once.
  -- Calvin & Hobbes (Bill Waterson)
#1 lore raw
Quoted 9 lines · Emmanuel Fleury

typedef unsigned int nf_hookfn(unsigned int hooknum,
struct sk_buff **skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *));

I got all the other arguments but the last one...

What is it for ???

it is the function that gets called if the packet is to continue (i.e. when the registered function returns NF_ACCEPT).

Quoted 3 lines

Regards

Signature · 1 line
Emmanuel
Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie