nosy-user.h 590 B

12345678910111213141516171819202122232425
  1. #ifndef __nosy_user_h
  2. #define __nosy_user_h
  3. #include <linux/ioctl.h>
  4. #include <linux/types.h>
  5. #define NOSY_IOC_GET_STATS _IOR('&', 0, struct nosy_stats)
  6. #define NOSY_IOC_START _IO('&', 1)
  7. #define NOSY_IOC_STOP _IO('&', 2)
  8. #define NOSY_IOC_FILTER _IOW('&', 2, __u32)
  9. struct nosy_stats {
  10. __u32 total_packet_count;
  11. __u32 lost_packet_count;
  12. };
  13. /*
  14. * Format of packets returned from the kernel driver:
  15. *
  16. * quadlet with timestamp (microseconds, CPU endian)
  17. * quadlet-padded packet data... (little endian)
  18. * quadlet with ack (little endian)
  19. */
  20. #endif /* __nosy_user_h */