how to attach more info to a connection?

Nelson Escravana nne@lmv.inov.pt
Mon, 15 Oct 2001 09:52:49 +0100


Hi, 

	thanks for your help.

	I will be attaching just a byte to the connection info,
so extending the connection tracking entry seems interessting,
can i do that without having to touch in the conntrack modules code???


	The second approach, is what i am trying to do , but the first one
seems really more eficient.


Thanks,
Nelson Escravana
Henrik Nordstrom wrote:
> 
> I think you better extend the connection tracking entry structure with
> storage for what you need.
> 
> Theoretically you could also build a separate table, and hook into
> conntrack to get notified when conntrack entries are destroyed (see
> ip_conntrack_notify_register). This approach is probably better if you
> need a lot of storage and only on a small subset of all tracked
> connections. Also required if you need to do additional processing when
> the connection disappears.
> 
> To find which connection a packet belongs to you call ip_conntrack_get
> 
> Regards
> Henrik Nordström
> MARA Systems AB, Sweden
> 
> Nelson Escravana wrote:
> >
> > Hi everyone, can anyone tell me, how can i, in a target module,
> > attach more info to a connection???
> >
> > Shall i keep an module internal table, related to the connection?
> > How do i figure out if a packet belongs to a certain connection?
> >
> > Thanks in advance,
> > Nelson