Hi,

I noticed that too,

res = doquery(CTL_OP_READVAR, associd, 0, 0, NULL, &rstatus,
                      &dsize, &datap);

only datap is copied in resultbuf

so maybe you can format rstatus to string and and memcpy it.
Something like (its ugly)

  sprintf(fstatus,"status=%x, ",rstatus);
  memcpy(resultbuf, fstatus, 13);
  memcpy(&(resultbuf[13]), datap, dsize);

Regards
Matija




On Wednesday, March 6, 2013 2:33:41 AM UTC+1, Matija Buskovic wrote:
> On Friday, March 1, 2013 7:52:01 PM UTC+1, Kyle Guilbert wrote:
> 
> > I'm writing some code to use libntpq to query the local NTP daemon, and 
> 
> > 
> 
> > it looks as though the libntpq interface throws away the System Status 
> 
> > 
> 
> > Word (with Leap, Source, Count, Event fields). I think this is the third 
> 
> > 
> 
> > argument sixth argument to doquery(), usually named 'rstatus'. I would 
> 
> > 
> 
> > especially like to see the Event field, to display in a separate 
> 
> > 
> 
> > application what the local NTP is up to.
> 
> > 
> 
> > 
> 
> > 
> 
> > Any advice on how I can get at this status word?
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks!

_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to