Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760060AbYC0OfX (ORCPT ); Thu, 27 Mar 2008 10:35:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757320AbYC0OfF (ORCPT ); Thu, 27 Mar 2008 10:35:05 -0400 Received: from relay.2ka.mipt.ru ([194.85.82.65]:44760 "EHLO 2ka.mipt.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755271AbYC0OfE (ORCPT ); Thu, 27 Mar 2008 10:35:04 -0400 Date: Thu, 27 Mar 2008 17:38:23 +0300 From: Evgeniy Polyakov To: Midhun A Cc: linux-kernel@vger.kernel.org Subject: Re: Userspace - Kernel Space "Connector" test Message-ID: <20080327143823.GA20443@2ka.mipt.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1748 Lines: 40 Hi. On Wed, Mar 26, 2008 at 03:41:16PM +0530, Midhun A (midhunagni@gmail.com) wrote: > I want to use the Connector module (CONFIG_CONNECTOR) for Kernel > space to User space communication. My kernel version is 2.6.22. > Before using it, I am trying out the example programs in the > Documentation folder. I have cn_test.c built into the kernel (not > loaded as a module) and I have compiled ucon.c. You have to use smaller index than 32 or increase CN_NETLINK_USERS parameter in include/linux/connector.h Currently all kernel users fit that limitation, which is ok. Also, parameter used in bind() is a bitmap of requested groups, to listen on 0x123 idx you have to add it via setsockopt(), which is commented in ucon.c. So, either switch to smaller group number (connector index) or increase above limit. If you will select the former case (it is simpler from userspace point of view), you have to change bind() group, note that it is a bitmap, os group N equals to (1<