154359Sroberto/*
254359Sroberto * Defines for the "clk" timestamping STREAMS module
354359Sroberto */
454359Sroberto
554359Sroberto#if defined(sun)
654359Sroberto#include <sys/ioccom.h>
754359Sroberto#else
854359Sroberto#include <sys/ioctl.h>
954359Sroberto#endif
1054359Sroberto
1154359Sroberto/*
1254359Sroberto * First, we need to define the maximum size of the set of
1354359Sroberto * characters to timestamp. 32 is MORE than enough.
1454359Sroberto */
1554359Sroberto
1654359Sroberto#define CLK_MAXSTRSIZE 32
1754359Srobertostruct clk_tstamp_charset {		/* XXX to use _IOW not _IOWN */
1854359Sroberto	char	val[CLK_MAXSTRSIZE];
1954359Sroberto};
2054359Sroberto
2154359Sroberto/*
2254359Sroberto * ioctl(fd, CLK_SETSTR, (char*)c );
2354359Sroberto *
2454359Sroberto * will tell the driver that any char in the null-terminated
2554359Sroberto * string c should be timestamped. It is possible, though
2654359Sroberto * unlikely that this ioctl number could collide with an
2754359Sroberto * existing one on your system. If so, change the 'K'
2854359Sroberto * to some other letter. However, once you've compiled
2954359Sroberto * the kernel with this include file, you should NOT
3054359Sroberto * change this file.
3154359Sroberto */
3254359Sroberto
3354359Sroberto#if defined(__STDC__)			/* XXX avoid __STDC__=0 on SOLARIS */
3454359Sroberto#define CLK_SETSTR _IOW('K', 01, struct clk_tstamp_charset)
3554359Sroberto#else
3654359Sroberto#define CLK_SETSTR _IOW(K, 01, struct clk_tstamp_charset)
3754359Sroberto#endif
3854359Sroberto
39