00001 /* 00002 * $Id: monitube2_ipc.h 346460 2009-11-14 05:06:47Z ssiano $ 00003 * 00004 * This code is provided as is by Juniper Networks SDK Developer Support. 00005 * It is provided with no warranties or guarantees, and Juniper Networks 00006 * will not provide support or maintenance of this code in any fashion. 00007 * The code is provided only to help a developer better understand how 00008 * the SDK can be used. 00009 * 00010 * Copyright (c) 2009, Juniper Networks, Inc. 00011 * All rights reserved. 00012 */ 00013 00023 #ifndef __MONITUBE2_IPC_H__ 00024 #define __MONITUBE2_IPC_H__ 00025 00026 00027 /*** Constants ***/ 00028 00029 00034 #define MONITUBE_PORT_NUM 7081 00035 00036 #define MONITUBE2_MGMT_STRLEN 256 00037 00038 /*** Data Structures ***/ 00039 00040 00045 typedef enum { 00046 MSG_DELETE_ALL = 1, 00047 MSG_DELETE_SS, 00048 MSG_APPLY_RULE, 00049 MSG_REMOVE_RULE, 00050 MSG_CONF_RULE_ACTION, 00051 MSG_DELETE_RULE, 00052 MSG_CONF_RULE_MATCH_ADDR, 00053 MSG_DELETE_RULE_MATCH_ADDR 00054 } msg_type_e; 00055 00056 00060 typedef struct del_ss_s { 00061 uint16_t ss_id; 00062 uint32_t gen_num; 00063 uint32_t svc_id; 00064 } del_ss_t; 00065 00069 typedef struct apply_rule_s { 00070 uint16_t ss_id; 00071 uint32_t gen_num; 00072 uint32_t svc_id; 00073 uint16_t rule_name_len; 00074 char rule_name[0]; 00075 } apply_rule_t; 00076 00077 00081 typedef struct update_rule_action_s { 00082 uint32_t rate; 00083 in_addr_t redirect; 00084 uint16_t rule_name_len; 00085 char rule_name[0]; 00086 } update_rule_action_t; 00087 00088 00092 typedef struct delete_rule_s { 00093 uint16_t rule_name_len; 00094 char rule_name[0]; 00095 } delete_rule_t; 00096 00097 00101 typedef struct rule_addr_s { 00102 in_addr_t addr; 00103 in_addr_t mask; 00104 uint16_t rule_name_len; 00105 char rule_name[0]; 00106 } rule_addr_t; 00107 00108 00113 typedef enum { 00114 MSG_FLOW_STAT_UPDATE = 1 00115 } update_type_e; 00116 00117 00121 typedef struct flow_stat_s { 00122 in_addr_t flow_addr; 00123 uint32_t pad; 00124 uint64_t mdi_df; 00125 uint32_t mdi_mlr; 00126 uint16_t flow_port; 00127 uint16_t ss_id; 00128 } flow_stat_t; 00129 00130 #endif