monitube2-mgmt_config.h File Reference

Relating to loading the configuration data. More...

#include <jnx/patricia.h>

Go to the source code of this file.

Data Structures

struct  list_item_s
struct  ss_info_s
struct  address_s
struct  rule_s
struct  flowstat_ss_s
struct  flowstat_s

Defines

#define STATS_BASE_WINDOW   60
 Window of X seconds to use for MDI stats.
#define MONITUBE2_MGMT_STRLEN   256
 Application name length.

Typedefs

typedef list_item_s list_item_t
typedef ss_info_s ss_info_t
typedef address_s address_t
typedef rule_s rule_t
typedef flowstat_ss_s flowstat_ss_t
typedef flowstat_s flowstat_t

Functions

typedef TAILQ_HEAD (list_s, list_item_s) list_t
 list typedef
void init_config (evContext ctx)
void clear_config (void)
void clear_stats (void)
int monitube_config_read (int check)
rule_tnext_rule (rule_t *data)
address_tnext_address (rule_t *rule, address_t *data)
ss_info_tnext_serviceset (ss_info_t *data)
flowstat_ss_tnext_flowstat_ss (flowstat_ss_t *data)
flowstat_tnext_flowstat (flowstat_ss_t *fss, flowstat_t *data)
void set_flow_stat (uint16_t fpc_slot, uint16_t pic_slot, uint16_t ssid, in_addr_t flow_addr, uint16_t flow_port, double mdi_df, uint32_t mdi_mlr)
void clear_all_flowstats (void)


Detailed Description

Relating to loading the configuration data.

These functions will parse and load the configuration data.

Definition in file monitube2-mgmt_config.h.


Typedef Documentation

typedef struct address_s address_t

The structure we use to bundle the patricia-tree node with the data to store for each destination address/prefix

typedef struct flowstat_ss_s flowstat_ss_t

The structure we use to bundle the patricia-tree node with the data to store for each flow statistic

typedef struct flowstat_s flowstat_t

The structure we use to bundle the patricia-tree node with the data to store for each flow statistic

typedef struct list_item_s list_item_t

A list item

typedef struct rule_s rule_t

The structure we use to bundle the patricia-tree node with the data to store for each rule

typedef struct ss_info_s ss_info_t

The structure we use to bundle the patricia-tree node with the data to store for each piece of service-set info


Function Documentation

void clear_all_flowstats ( void   ) 

Clear all flow statistics records

void clear_config ( void   ) 

Clear and reset the entire configuration, freeing all memory store for policy

Definition at line 1489 of file monitube2-mgmt_config.c.

References clear_stats(), delete_all_rules(), and process_notifications().

Referenced by monitube_config_read(), monitube_init(), and monitube_shutdown().

void clear_stats ( void   ) 

Clear all statistics

Definition at line 1586 of file monitube2-mgmt_config.c.

References flow_stats, m_ctx, flowstat_ss_s::node, flowstat_s::node, flowstat_ss_s::stats, and flowstat_s::timer_id.

Referenced by clear_config(), monitube_clear_stats(), monitube_init(), and monitube_shutdown().

void init_config ( evContext  ctx  ) 

Init the data structures that will store configuration info

Definition at line 1463 of file monitube2-mgmt_config.c.

References flow_stats, LOG, m_ctx, MONITUBE2_MGMT_STRLEN, notify_ssrb_change(), rules, ssets, and syncup().

Referenced by monitube_init().

int monitube_config_read ( int  check  ) 

Read daemon configuration from the database

Parameters:
[in] check 1 if this function being invoked because of a commit check
Returns:
SUCCESS (0) successfully loaded, EFAIL if not
Note:
Do not use ERRMSG/LOG during config check normally.

Definition at line 1752 of file monitube2-mgmt_config.c.

References apply_rules(), clear_config(), parse_rules(), process_notifications(), and verify_service_interfaces().

Referenced by main().

address_t* next_address ( rule_t rule,
address_t data 
)

Given a rule, get the next address in configuration given the previously returned data

Parameters:
[in] rule Rule's configuration
[in] data previously returned data, should be NULL first time
Returns:
pointer to an address if one more exists, o/w NULL

Definition at line 1525 of file monitube2-mgmt_config.c.

References rule_s::addresses, and address_s::node.

Referenced by apply_rules(), receive_connection(), and verify_service_interfaces().

flowstat_t* next_flowstat ( flowstat_ss_t fss,
flowstat_t data 
)

Get the next flowstat record in configuration given the previously returned data

Parameters:
[in] fss A flow stats service set
[in] data previously returned data, should be NULL first time
Returns:
pointer to a flowstat if one more exists, o/w NULL

Definition at line 1576 of file monitube2-mgmt_config.c.

References flowstat_s::node, and flowstat_ss_s::stats.

Referenced by monitube_show_stats().

flowstat_ss_t* next_flowstat_ss ( flowstat_ss_t data  ) 

Get the next flowstat service set in configuration given the previously returned data

Parameters:
[in] data previously returned data, should be NULL first time
Returns:
pointer to a flowstat if one more exists, o/w NULL

Definition at line 1557 of file monitube2-mgmt_config.c.

References flow_stats, and flowstat_ss_s::node.

Referenced by monitube_show_stats().

rule_t* next_rule ( rule_t data  ) 

Get the next rule in configuration given the previously returned data

Parameters:
[in] data previously returned data, should be NULL first time
Returns:
pointer to a rule if one more exists, o/w NULL

Definition at line 1506 of file monitube2-mgmt_config.c.

References rule_s::node, and rules.

ss_info_t* next_serviceset ( ss_info_t data  ) 

Get the next service set in configuration given the previously returned data

Parameters:
[in] data previously returned data, should be NULL first time
Returns:
pointer to a service set if one more exists, o/w NULL

Definition at line 1541 of file monitube2-mgmt_config.c.

References ss_info_s::node, and ssets.

Referenced by apply_rules(), monitube_show_stats(), and receive_connection().

void set_flow_stat ( uint16_t  fpc_slot,
uint16_t  pic_slot,
uint16_t  ssid,
in_addr_t  flow_addr,
uint16_t  flow_port,
double  mdi_df,
uint32_t  mdi_mlr 
)

Given a monitor's name and flow address add or update its statistics record

Parameters:
[in] fpc_slot FPC slot #
[in] pic_slot PIC slot #
[in] ssid Service set id
[in] flow_addr flow address (ID)
[in] flow_port flow port (ID)
[in] mdi_df MDI delay factor
[in] mdi_mlr MDI media loss rate

Definition at line 1637 of file monitube2-mgmt_config.c.

References age_out_flow_stat(), flowstat_s::flow_addr, flowstat_s::flow_port, flow_stats, flowstat_s::fpc_slot, flowstat_s::last_mdi_df, flowstat_s::last_mdi_mlr, LOG, m_ctx, MAX_FLOW_AGE, flowstat_s::node, flowstat_ss_s::node, flowstat_s::pic_slot, flowstat_s::reports, flowstat_s::ssi, flowstat_ss_s::ssid, flowstat_ss_s::stats, STATS_BASE_WINDOW, flowstat_s::timer_id, and flowstat_s::window_position.

Referenced by receive_message().


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:04 2010 for SDK Your Net Corporation Monitube2 IPTV Monitoring Example: monitube2-mgmt 1.0 by Doxygen 1.5.1