freebsd-dev/usr.sbin/xntpd/include/sys/clkdefs.h

39 lines
977 B
C
Raw Normal View History

1994-09-29 23:04:24 +00:00
/*
1993-12-21 18:36:48 +00:00
* Defines for the "clk" timestamping STREAMS module
*/
1994-09-29 23:04:24 +00:00
#if defined(sun)
1993-12-21 18:36:48 +00:00
#include <sys/ioccom.h>
1994-09-29 23:04:24 +00:00
#else
#include <sys/ioctl.h>
#endif
1993-12-21 18:36:48 +00:00
/*
* First, we need to define the maximum size of the set of
* characters to timestamp. 32 is MORE than enough.
*/
#define CLK_MAXSTRSIZE 32
1994-09-29 23:04:24 +00:00
struct clk_tstamp_charset { /* XXX to use _IOW not _IOWN */
char val[CLK_MAXSTRSIZE];
};
1993-12-21 18:36:48 +00:00
/*
* ioctl(fd, CLK_SETSTR, (char*)c );
*
* will tell the driver that any char in the null-terminated
* string c should be timestamped. It is possible, though
* unlikely that this ioctl number could collide with an
* existing one on your system. If so, change the 'K'
* to some other letter. However, once you've compiled
* the kernel with this include file, you should NOT
* change this file.
*/
1994-09-29 23:04:24 +00:00
#if defined(__STDC__) /* XXX avoid __STDC__=0 on SOLARIS */
#define CLK_SETSTR _IOW('K', 01, struct clk_tstamp_charset)
1993-12-21 18:36:48 +00:00
#else
1994-09-29 23:04:24 +00:00
#define CLK_SETSTR _IOW(K, 01, struct clk_tstamp_charset)
1993-12-21 18:36:48 +00:00
#endif