From owner-freebsd-hackers@FreeBSD.ORG Thu May 6 13:38:37 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 8B8AE106566B for ; Thu, 6 May 2010 13:38:37 +0000 (UTC) (envelope-from czerner.lukas@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id 1BAEA8FC13 for ; Thu, 6 May 2010 13:38:36 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id l26so287628fgb.13 for ; Thu, 06 May 2010 06:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:x-x-sender:to :subject:message-id:user-agent:mime-version:content-type; bh=nNdgioV9Q97+ZyyH3Byq57JwqgxjrFwsCnBphn3C7PM=; b=jzfywpysXfKNWw55NCl1qBSeUyYBQf6AiA44gdjzS06PC0i5QGO+z/Mlrc/zuWDSU9 mUD/nSN9NgUDX8/T5hTfD/H9+mVZF0/l3Va1R/ep805Nj0oGw3Lw+9DMK/cVS+QfjKtW 1JQSTu1re6Fu+m+GFK5OjMOPisRpTOy4JO1Yw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:x-x-sender:to:subject:message-id:user-agent:mime-version :content-type; b=fH/zAEQO82+71UhCrWZ84qkP51qYLuBw1H/z/ZolLHzwD/P5tkK6cnkbiPy9/P/nfu H15vxY1wSDVJIATar9t+bVr7UGNe+XsulntCF7uNKtN8jjIAc5xDnVxetPAosxwKmkhp 0JLgmOBjcLt1LyBGmOzqm8s5g6jPdP3OIRzk8= Received: by 10.87.64.29 with SMTP id r29mr1683288fgk.6.1273153112803; Thu, 06 May 2010 06:38:32 -0700 (PDT) Received: from a04-0215a.kn.vutbr.cz (a04-0215a.kn.vutbr.cz [147.229.216.20]) by mx.google.com with ESMTPS id 4sm2839160fgg.22.2010.05.06.06.38.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 06 May 2010 06:38:31 -0700 (PDT) Date: Thu, 6 May 2010 15:38:30 +0200 (CEST) From: "=?ISO-8859-15?Q?Luk=E1=A8_Czerner?=" X-X-Sender: bratt@a04-0215a.kn.vutbr.cz To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: 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 13:38:37 -0000 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. Thanks! -Lukas