/contrib/ntp/kernel/sys/clkdefs.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 38 lines · 14 code · 6 blank · 18 comment · 0 complexity · 5f5d87df30eff2f2918c1c2e062a697e MD5 · raw file

  1. /*
  2. * Defines for the "clk" timestamping STREAMS module
  3. */
  4. #if defined(sun)
  5. #include <sys/ioccom.h>
  6. #else
  7. #include <sys/ioctl.h>
  8. #endif
  9. /*
  10. * First, we need to define the maximum size of the set of
  11. * characters to timestamp. 32 is MORE than enough.
  12. */
  13. #define CLK_MAXSTRSIZE 32
  14. struct clk_tstamp_charset { /* XXX to use _IOW not _IOWN */
  15. char val[CLK_MAXSTRSIZE];
  16. };
  17. /*
  18. * ioctl(fd, CLK_SETSTR, (char*)c );
  19. *
  20. * will tell the driver that any char in the null-terminated
  21. * string c should be timestamped. It is possible, though
  22. * unlikely that this ioctl number could collide with an
  23. * existing one on your system. If so, change the 'K'
  24. * to some other letter. However, once you've compiled
  25. * the kernel with this include file, you should NOT
  26. * change this file.
  27. */
  28. #if defined(__STDC__) /* XXX avoid __STDC__=0 on SOLARIS */
  29. #define CLK_SETSTR _IOW('K', 01, struct clk_tstamp_charset)
  30. #else
  31. #define CLK_SETSTR _IOW(K, 01, struct clk_tstamp_charset)
  32. #endif