From owner-freebsd-hackers@FreeBSD.ORG Thu May 6 16:41:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D8061065676 for ; Thu, 6 May 2010 16:41:58 +0000 (UTC) (envelope-from julianelischer@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B1EDE8FC18 for ; Thu, 6 May 2010 16:41:56 +0000 (UTC) Received: by wyb36 with SMTP id 36so138808wyb.13 for ; Thu, 06 May 2010 09:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=owLNJAYbDOlChZLQx465ej/kFvopybOu2ZkEeI0TMgc=; b=G826PHEs85tlamRVszOYBqnUBkBGIcOUr/V/o/94ButDp2jj9DP4SUoh4qbwD5qnMF ZkUjxVhQDNauQaMhV3KJUR3mV7ZbiD1WjDBfZ371QghAc4zBDCsa6aeBxZxTfzQ/ESPw qoc1K44pRrpjMYdjKS1CNdzYnSCkK6pRaJAmE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=BJNg+u0sS4RiHZJvVXt3uhQiQG0OBvxqL49t0N9ll6iyDke9Rxm+r9kKhSR5pHDDnV iSau6fGJx5GNTWu5o5ZyGXT1ym+Hpp2+L0mLx5bT3A9tbbuAIPpX99yqqGfA6NKOWKDF RbjbjuM5HcxBTkoTk/NtX5UhP8JJa0KJgC6Ow= Received: by 10.227.144.16 with SMTP id x16mr4518898wbu.174.1273164108136; Thu, 06 May 2010 09:41:48 -0700 (PDT) Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by mx.google.com with ESMTPS id x14sm8473628wbs.12.2010.05.06.09.41.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 09:41:42 -0700 (PDT) Sender: Julian Elischer Message-ID: <4BE2F13C.4010708@elischer.org> Date: Thu, 06 May 2010 09:41:32 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: =?windows-1252?Q?Luk=E1=9A_Czerner?= References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: How to get data from kernel module ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 16:41:58 -0000 On 5/6/10 6:38 AM, Lukáš Czerner wrote: > Hi, > > I am creating a kernel module and I need to get some information from > that module. I can do this with ioctl and pass the data to the > user space but it seems a bit unpractical to me, because I do not know > the amount of the data - it can differ. I do not know of any way to > pass a list of structures to the userspace through ioctl - is there > any? > > So my question is, is there any standard way in FreeBSD to do this ? > In linux I would probably use the sysfs, but in FreeBSD I can not find > anything similar, except just creating some virtual filesystem on my > own and obviously this is not what I want to do. > you can add a sysctl to pass out arbitrary information very easily. It's up to you to decide where you want to put it in the sysctl tree. > Thanks! > -Lukas > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"