Hi Mark,


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,



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.



This is a round about way. Is there is any other way to read a
configuration file from Driver code.





Thanks,

~Siva

-----Original Message-----
From: John-Mark Gurney [mailto:[EMAIL PROTECTED]
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.



[EMAIL PROTECTED] wrote this message on Thu, Sep 14, 2006 at
12:16 +0530:

> Is there is any other solution to the above problem?

>

>

>

> Actually I am looking for some thing similar to Module loadable

> parameters in the Linux Device Driver.



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...



If the variables need to change at run time, look at SYSCTL...



--

  John-Mark Gurney                        Voice: +1 415 225 5579



     "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.

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.

www.wipro.com
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to