aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/net_dropmon.h
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
commite05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch)
tree31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/uapi/linux/net_dropmon.h
parent3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff)
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits) Linux 3.7-rc1 x86, boot: Explicitly include autoconf.h for hostprogs perf: Fix UAPI fallout ARM: config: make sure that platforms are ordered by option string ARM: config: sort select statements alphanumerically UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h perf: Handle new rbtree implementation procfs: don't need a PATH_MAX allocation to hold a string representation of an int vfs: embed struct filename inside of names_cache allocation if possible audit: make audit_inode take struct filename vfs: make path_openat take a struct filename pointer vfs: turn do_path_lookup into wrapper around struct filename variant audit: allow audit code to satisfy getname requests from its names_list vfs: define struct filename and have getname() return it btrfs: Fix compilation with user namespace support enabled userns: Fix posix_acl_file_xattr_userns gid conversion userns: Properly print bluetooth socket uids ...
Diffstat (limited to 'include/uapi/linux/net_dropmon.h')
-rw-r--r--include/uapi/linux/net_dropmon.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/include/uapi/linux/net_dropmon.h b/include/uapi/linux/net_dropmon.h
new file mode 100644
index 000000000000..2a739462caeb
--- /dev/null
+++ b/include/uapi/linux/net_dropmon.h
@@ -0,0 +1,64 @@
1#ifndef __NET_DROPMON_H
2#define __NET_DROPMON_H
3
4#include <linux/types.h>
5#include <linux/netlink.h>
6
7struct net_dm_drop_point {
8 __u8 pc[8];
9 __u32 count;
10};
11
12#define is_drop_point_hw(x) do {\
13 int ____i, ____j;\
14 for (____i = 0; ____i < 8; i ____i++)\
15 ____j |= x[____i];\
16 ____j;\
17} while (0)
18
19#define NET_DM_CFG_VERSION 0
20#define NET_DM_CFG_ALERT_COUNT 1
21#define NET_DM_CFG_ALERT_DELAY 2
22#define NET_DM_CFG_MAX 3
23
24struct net_dm_config_entry {
25 __u32 type;
26 __u64 data __attribute__((aligned(8)));
27};
28
29struct net_dm_config_msg {
30 __u32 entries;
31 struct net_dm_config_entry options[0];
32};
33
34struct net_dm_alert_msg {
35 __u32 entries;
36 struct net_dm_drop_point points[0];
37};
38
39struct net_dm_user_msg {
40 union {
41 struct net_dm_config_msg user;
42 struct net_dm_alert_msg alert;
43 } u;
44};
45
46
47/* These are the netlink message types for this protocol */
48
49enum {
50 NET_DM_CMD_UNSPEC = 0,
51 NET_DM_CMD_ALERT,
52 NET_DM_CMD_CONFIG,
53 NET_DM_CMD_START,
54 NET_DM_CMD_STOP,
55 _NET_DM_CMD_MAX,
56};
57
58#define NET_DM_CMD_MAX (_NET_DM_CMD_MAX - 1)
59
60/*
61 * Our group identifiers
62 */
63#define NET_DM_GRP_ALERT 1
64#endif