DHCP Server
Hey all.. I want to change my dhcpd.conf file dynamically using C program.. The values of the parameters in the dhcpd.conf file will be provided by an application which will take inputs from the admin and accordingly, pass the values which I need to change in my dhcpd.conf file.. Please suggest some way to do it..
I thought of rewriting the .conf file each time when the values are given by the admin but will it be feasible?? Please anyone reply asap.. Thanks in advance... |
Some one pls reply.. :cry:
|
Look at file IO with text files.
|
may u pls elaborate??
|
Here's a good place to start http://www.cprogramming.com/tutorial/cfileio.html another http://www.learn-programming.za.net/...c_learn10.html yet another http://cplus.about.com/od/learningc/ss/text-files.htm some more http://www.mycplus.com/tutorials/c-p...file-handling/ and yet even more http://www.google.com/search?sourcei...ith+text+files
|
As a tip to doing this, you have a couple of options, one is to do as you suggest re-writing the conf file each time. Alternatively if you know the keywords in the file that need to be edited for each admin entry then you could read the file and search for the keyword(s) then re-write just that line.
|
All times are GMT -5. The time now is 12:54 PM. |