nosy-user.h 550 字节
Newer Older
1 2 3
#ifndef __nosy_user_h
#define __nosy_user_h

S
Stefan Richter 已提交
4 5
#include <linux/ioctl.h>
#include <linux/types.h>
6 7 8 9 10 11 12

#define NOSY_IOC_GET_STATS _IOR('&', 0, struct nosy_stats)
#define NOSY_IOC_START     _IO('&', 1)
#define NOSY_IOC_STOP      _IO('&', 2)
#define NOSY_IOC_FILTER    _IOW('&', 2, __u32)

struct nosy_stats {
S
Stefan Richter 已提交
13 14
	__u32 total_packet_count;
	__u32 lost_packet_count;
15 16
};

S
Stefan Richter 已提交
17
/*
18 19 20 21 22 23 24 25
 * Format of packets returned from the kernel driver:
 *
 *   quadlet with timestamp (microseconds)
 *   quadlet padded packet data...
 *   quadlet with ack
 */

#endif /* __nosy_user_h */