From owner-freebsd-net@FreeBSD.ORG Thu Sep 14 06:52:34 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D93616A40F for ; Thu, 14 Sep 2006 06:52:34 +0000 (UTC) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx3.wipro.com (wip-ectls-mx3.wipro.com [203.91.193.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F66243D62 for ; Thu, 14 Sep 2006 06:51:59 +0000 (GMT) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx3.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id B64752243CB for ; Thu, 14 Sep 2006 12:21:44 +0530 (IST) Received: from blr-ec-bh01.wipro.com (blr-ec-bh01.wipro.com [10.201.50.91]) by wip-ectls-mx3.wipro.com (Postfix) with ESMTP id 5A5CC224007 for ; Thu, 14 Sep 2006 12:21:44 +0530 (IST) Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh01.wipro.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Sep 2006 12:21:44 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 14 Sep 2006 12:16:17 +0530 Message-ID: <956E7FA2615F3B4595FC5F22870A7221067206@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Reading a configuration file from a driver code during intialization. Thread-Index: AcbXyi70vxMG6AygSsqcgDXge8szUg== From: To: X-OriginalArrivalTime: 14 Sep 2006 06:51:44.0338 (UTC) FILETIME=[3D981320:01C6D7CA] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Reading a configuration file from a driver code during intialization. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 06:52:34 -0000 Hi all, =0D For our driver we have following requirement. We have a configuration file that will be updated by the user and while loading the driver, the initialization code should read the configuration file to get the value and use it in the driver code.=0D =0D Is there is any way to read a configuration file from driver code?=0D =0D Currently I have written a small kernel module that will create a sysctl variable and update with a default value. After loading this module, using shell scripts, I read the configuration file and get the user set values and update the sysctl variable in that value. Then I will load my driver where I read the sysctl variable to get the required values set by the user in the configuration file. =0D Is there is any other solution to the above problem? =0D Actually I am looking for some thing similar to Module loadable parameters in the Linux Device Driver. =0D Thanks, ~Siva The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=0D WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =0D www.wipro.com