monitube-mgmt_config.h

Go to the documentation of this file.
00001 /*
00002  * $Id: monitube-mgmt_config.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) 2008, Juniper Networks, Inc.
00011  * All rights reserved.
00012  */
00013 
00021 #ifndef __MONITUBE_MGMT_CONFIG_H__
00022 #define __MONITUBE_MGMT_CONFIG_H__
00023 
00024 #include <jnx/patricia.h>
00025 
00026 /*** Constants ***/
00027 
00028 #define STATS_BASE_WINDOW  60  
00029 
00030 #define MAX_MON_NAME  256  
00031 
00032 /*** Data structures ***/
00033 
00038 typedef struct address_s {
00039     patnode    node;       
00040     in_addr_t  address;    
00041     in_addr_t  mask;       
00042 } address_t;
00043 
00044 
00049 typedef struct monitor_s {
00050     patnode    node;                
00051     char       name[MAX_MON_NAME];  
00052     uint32_t   rate;                
00053     patroot *  addresses;           
00054     patroot *  flow_stats;          
00055 } monitor_t;
00056 
00057 
00062 typedef struct mirror_s {
00063     patnode    node;       
00064     in_addr_t  original;   
00065     in_addr_t  redirect;   
00066 } mirror_t;
00067 
00068 
00073 typedef struct flowstat_s {
00074     patnode     node;       
00075     /* Identifies where the flow was measured */
00076     uint16_t    fpc_slot;   
00077     uint16_t    pic_slot;   
00078     /* Identifies the flow */
00079     in_addr_t   flow_addr;  
00080     uint16_t    flow_port;  
00081     evTimerID   timer_id;   
00082     monitor_t * mon;        
00083     uint32_t    reports;    
00084     uint16_t    window_position;                
00085     double      last_mdi_df[STATS_BASE_WINDOW]; 
00086     uint32_t    last_mdi_mlr[STATS_BASE_WINDOW];
00087 } flowstat_t;
00088 
00089 
00090 /*** GLOBAL/EXTERNAL Functions ***/
00091 
00092 
00096 void
00097 init_config(evContext ctx);
00098 
00099 
00103 void
00104 clear_config(void);
00105 
00106 
00117 int
00118 monitube_config_read(int check);
00119 
00120 
00126 uint8_t
00127 get_replication_interval(void);
00128 
00129 
00138 monitor_t *
00139 next_monitor(monitor_t * data);
00140 
00141 
00150 mirror_t *
00151 next_mirror(mirror_t * data);
00152 
00153 
00166 address_t *
00167 next_address(monitor_t * mon, address_t * data);
00168 
00169 
00182 flowstat_t *
00183 next_flowstat(monitor_t * mon, flowstat_t * data);
00184 
00185 
00194 monitor_t *
00195 find_monitor(char * name);
00196 
00197 
00222 void
00223 set_flow_stat(uint16_t fpc_slot,
00224               uint16_t pic_slot,
00225               const char * name,
00226               in_addr_t flow_addr,
00227               uint16_t flow_port,
00228               double mdi_df,
00229               uint32_t mdi_mlr);
00230 
00231 
00235 void
00236 clear_all_flowstats(void);
00237 
00238 
00248 int
00249 clear_flowstats(char * mon_name);
00250 
00251 
00252 #endif
00253 

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:27:03 2010 for SDK Your Net Corporation Monitube IPTV Monitoring Example: monitube-mgmt 1.0 by Doxygen 1.5.1