Re: [chrony-dev] timepps.h and pps support in chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Thu, Apr 30, 2015 at 10:01:54AM -0700, Bill Unruh wrote:
> On Wed, 29 Apr 2015, Miroslav Lichvar wrote:
> >My view on this is that timepps.h should be reworked into a proper
> >library (e.g. libpps) with a header file that just declares the API
> >and the actual implementation is in a shared object chronyd/ntpd can
> >link with. The kernel provides ioctls and shouldn't be concerned with
> >the RFC 2783 API.
> 
> Well, pps_core, pps-ldisc  are modules in the kernel, and it seems taht
> timepps.h is really needed to access the ioctls of those, so should it not be
> in the kernel?

The ioctls can be used directly in programs without timepps.h. The
kernel header /usr/include/linux/pps.h has everything needed to make
these calls.

ioctl(fd, PPS_GETCAP, ...);
ioctl(fd, PPS_SETPARAMS, ...);
ioctl(fd, PPS_FETCH, ...);

The timepps.h header is a simple wrapper around the ioctls to provide
the RFC 2783 API, which can be used in portable applications.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/