remove connections notification by conntrack?
Alan Ezust
ezust at presinet.com
Mon Sep 25 19:48:13 CEST 2006
Hi - i'm rather new to this list and trying to learn as much as I can about
this API. I see that for this particular function, there are no API docs. You
make reference to "unofficial API docs" on a website, but shouldn't there be
actual proper doc comments before the function? i.e.
/** @param this - a reference to a notifier block, which will be used for ???
@param events - a bitmask - please see ifnetlink.h for the possible
values
@param ptr - a pointer to a struct ip_conntrack for the purposes of ???
@return it seems to return NOTIFY_DONE under every possible exec path.
*/
static int ctnetlink_conntrack_event(struct notifier_block *this,
unsigned long events, void *ptr)
On Saturday 23 September 2006 02:23, Thomas Mader wrote:
> > Use the event API, do not forget to enable it (it's still marked as
> > experimental): have a look at ctnetlink_conntrack_event inside
> > ip_conntrack_netlink.c, that will help I think.
> >
> > Use the unsigned long parameter of your notify function above and wait
> > for the event IPCT_DESTROY.
>
> Now it looks like this:
>
> int ipaddr_conntrack_event(struct notifier_block *this, unsigned long
> events, void *ptr) {
> struct ip_conntrack *ct = (struct ip_conntrack *)ptr;
>
> if (events == IPCT_DESTROY) {
> printk("We have been notified that connection %d was deleted!\n",
> ct->id); }
>
> return 0;
> }
More information about the netfilter-devel
mailing list