From mboxrd@z Thu Jan 1 00:00:00 1970 From: Srinivasa T N Subject: Re: [NFLOG] How to determine the connection a packet belongs to? Date: Tue, 07 Jun 2011 17:55:02 +0530 Message-ID: <4DEE189E.8070403@linux.vnet.ibm.com> References: <4DED6538.3090404@netfilter.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Clemens Eisserer Cc: netfilter@vger.kernel.org On 06/07/2011 04:10 PM, Clemens Eisserer wrote: > Hi, > >> You can build the tuple from the packet in user-space to look up the >> conntrack via libnetfilter_conntrack. > > How can I do that? > > Assuming there are two open connections: > IP1:80<----> IP2:39678 > IP1:39678<-----> IP2:80 > > How can I know which packet belongs to which connection? > > Thanks, Clemens > -- > To unsubscribe from this list: send the line "unsubscribe netfilter" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Am not an expert, but can't you match the src and dst address/port in each packet? Regards, Seenu.