How do I use ip_conntrack_destroyed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hei!


I am writing a new target module which needs to be aware about the number of conntracks that are currently known for a particular destination. Thus, to make my counter I wish to detect when a conntrack is destroyed. I have noticed the following in ip_conntrack.h :

/* Call me when a conntrack is destroyed. */
extern void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack);

So I guess it particularly fits with my needs. But what about using it?

Is it that I have to write something like:
ip_conntrack_destroyed = &my_counter_function
in my ipt_xxxx_target function and then do my stuff in my_counter_funtcion?

Does it work like this?

Emmanuel



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux