From owner-freebsd-net@FreeBSD.ORG Fri Sep 15 05:30:44 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 33FD416A412 for ; Fri, 15 Sep 2006 05:30:44 +0000 (UTC) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.91.193.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEF7943D58 for ; Fri, 15 Sep 2006 05:30:42 +0000 (GMT) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id B9C55220219; Fri, 15 Sep 2006 11:00:48 +0530 (IST) Received: from blr-ec-bh02.wipro.com (blr-ec-bh02.wipro.com [10.201.50.92]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id ADE85220078; Fri, 15 Sep 2006 11:00:48 +0530 (IST) Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh02.wipro.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 15 Sep 2006 11:00:40 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Fri, 15 Sep 2006 10:55:38 +0530 Message-ID: <956E7FA2615F3B4595FC5F22870A722108100C@blr-m3-msg.wipro.com> In-Reply-To: <20060914161309.GC9421@funkthat.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Reading a configuration file from a driver code during intialization. Thread-Index: AcbYF/+021bnu0ECTPGcBjTczt8mSgAbQW/Q From: To: X-OriginalArrivalTime: 15 Sep 2006 05:30:40.0671 (UTC) FILETIME=[150922F0:01C6D888] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@FreeBSD.org Subject: RE: 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: Fri, 15 Sep 2006 05:30:44 -0000 Hi Mark, =0D As I mentioned in the previous mail, the main issue is to read a Configuration parameter file from driver code. I am already using Sysctl variables as mentioned below, =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 This is a round about way. Is there is any other way to read a configuration file from Driver code. =0D =0D Thanks, ~Siva -----Original Message----- From: John-Mark Gurney [mailto:gurney_j@resnet.uoregon.edu]=0D Sent: Thursday, September 14, 2006 9:43 PM To: SIVAKUMAR SUBRAMANI (WT01 - Computing Systems & Storage) Cc: freebsd-net@FreeBSD.org Subject: Re: Reading a configuration file from a driver code during intialization. =0D sivakumar.subramani@wipro.com wrote this message on Thu, Sep 14, 2006 at 12:16 +0530: > Is there is any other solution to the above problem? >=0D >=0D >=0D > Actually I am looking for some thing similar to Module loadable > parameters in the Linux Device Driver. =0D look at kenv... It lets you set arbitrary values and access them in the kernel... you can use the TUNABLE_* macros provided by sys/kernel.h to make accessing them easier... =0D If the variables need to change at run time, look at SYSCTL... =0D --=0D John-Mark Gurney Voice: +1 415 225 5579 =0D "All that I will do, has been done, All that I have, has not." 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