[ntp:questions] Regarding updation of IP addresses in the ntpd.conf file

Arpith Nayak arpithnayak at gmail.com
Thu Jul 19 03:10:58 UTC 2012


   What I am trying to do is write a program that reads the same .conf file
used by ntpd and change it based on the user's requirements. I will be
presenting the user with all the addresses that are stored in the .conf
file and want to implement functionality in the program to make appropriate
changes in the .conf file without resorting to ntpq. So to the user it will
be something like this on the CLI:
                           set NTP_Server_x xx.xx.xx.xx<IP addresss>
 Is this possible? How does ntpd read the .conf file and parse the IP
addresses and drift file location from the file?

Regards,

Arpith

On Wed, Jul 18, 2012 at 11:30 PM, Brian Utterback <
brian.utterback at oracle.com> wrote:

> The ntpq command can already be used to change the set of servers used in
> real time. You can use ntpq to find the current set of servers. Are you
> trying to create a program to present a set and allow the users to choose
> some subset?
>
>
>  On 07/18/12 09:00, Arpith Nayak wrote:
>
>> Hello to all you mighty programmers, hackers and USENET members,
>>
>>     I am trying to implement an API for ntpd by which the user can specify
>> which servers he wants his machine to update time from. The application
>> however uses a single .conf file. Are there any limits specified for the
>> addresses that can be given in the .conf file? Also could you please help
>> me out as to how I can read the IP addresses already present in the .conf
>> file and how to update these values based on the user's choice? I'm also a
>> novice to programming, so could you please help me out by not making your
>> answers too technical?
>>
>>
>> Regards,
>>
>> Arpith
>> ______________________________**_________________
>> questions mailing list
>> questions at lists.ntp.org
>> http://lists.ntp.org/listinfo/**questions<http://lists.ntp.org/listinfo/questions>
>>
>
>
> --
> blu
>
> Always code as if the guy who ends up maintaining your code will be a
> violent psychopath who knows where you live. - Martin Golding
> ------------------------------**------------------------------**
> -----------|
> Brian Utterback - Solaris RPE, Oracle Corporation.
> Ph:603-262-3916, Em:brian.utterback at oracle.com
>
>


More information about the questions mailing list