at v2.6.30 57 lines 953 B view raw
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 NET_DM_CFG_VERSION 0 13#define NET_DM_CFG_ALERT_COUNT 1 14#define NET_DM_CFG_ALERT_DELAY 2 15#define NET_DM_CFG_MAX 3 16 17struct net_dm_config_entry { 18 __u32 type; 19 __u64 data __attribute__((aligned(8))); 20}; 21 22struct net_dm_config_msg { 23 __u32 entries; 24 struct net_dm_config_entry options[0]; 25}; 26 27struct net_dm_alert_msg { 28 __u32 entries; 29 struct net_dm_drop_point points[0]; 30}; 31 32struct net_dm_user_msg { 33 union { 34 struct net_dm_config_msg user; 35 struct net_dm_alert_msg alert; 36 } u; 37}; 38 39 40/* These are the netlink message types for this protocol */ 41 42enum { 43 NET_DM_CMD_UNSPEC = 0, 44 NET_DM_CMD_ALERT, 45 NET_DM_CMD_CONFIG, 46 NET_DM_CMD_START, 47 NET_DM_CMD_STOP, 48 _NET_DM_CMD_MAX, 49}; 50 51#define NET_DM_CMD_MAX (_NET_DM_CMD_MAX - 1) 52 53/* 54 * Our group identifiers 55 */ 56#define NET_DM_GRP_ALERT 1 57#endif