[ntp:questions] Regarding updation of IP addresses in the ntpd.conf file
E-Mail Sent to this address will be added to the BlackLists
Null at BlackList.Anitech-Systems.invalid
Thu Jul 19 19:53:58 UTC 2012
Arpith Nayak wrote:
These are still a how to read a text file questions?
This kind of stuff really is covered by most tutorials
and code samples, for probably all programming languages.
e.g. <http://cs.dvc.edu/HowTo_Cparse.html>
<courses.cs.vt.edu/~cs2704/spring01/Notes/4up/ParsingTutorial.pdf>
{Only several million more tutorial / sample / examples,
like those around; I'd start by looking through the
documentation for _your_ development environment.}
> how do I determine the end of the address?
Whitespace ?
> (Is there a "\n" newline character appearing at the end
> of each line in the .conf file?
> Will I be breaking any rules in ntpd by using "\n" to
> mark the end of the IP/hostname address if I can even
> use it that way?)
Why not just use a normal string functions like readline
getline, writeline, or whatever their library equivalents are,
in whatever language you imagine you will be programming this in.
Once you figure how to open text files, parse keywords,
and change the contents of the text file, you might look
at the ntp source code; I'd start with perhaps ntp_config.c
--
E-Mail Sent to this address <BlackList at Anitech-Systems.com>
will be added to the BlackLists.
More information about the questions
mailing list