monitube-data_packet.h File Reference

Relating to processing packets in the fast path. More...

Go to the source code of this file.

Functions

status_t init_packet_loops (evContext ctx)
void init_forwarding_database (evContext ctx)
void stop_packet_loops (evContext ctx)
void destroy_packet_loops_oc (void)
void clean_flows_with_any_monitor (void)
void clean_flows_with_any_mirror (void)
void clean_flows_with_mirror (in_addr_t addr)
void redirect_flows_with_mirror (in_addr_t addr, in_addr_t to)
void clean_flows_with_monitor (char *name)
void clean_flows_in_monitored_prefix (char *name, in_addr_t prefix, in_addr_t mask)
status_t get_next_flow_state (replication_data_t *last, replication_data_t *next)
status_t add_flow_state (replication_data_t *new_data)
void remove_flow_state (delete_replication_data_t *data)


Detailed Description

Relating to processing packets in the fast path.

These functions and types will manage the packet processing in the data path

Definition in file monitube-data_packet.h.


Function Documentation

status_t add_flow_state ( replication_data_t new_data  ) 

Add flow state to the backup "database" i.e. the flow hashtable. It only gets added if the flow doesn't exist, otherwise it gets merged. This is only called while this data component is a slave and not processing traffic.

Parameters:
[in] new_data The new data to add to the (backup) flow table in this slave component
Returns:
SUCCESS if the flow state information was added; EFAIL, if the OC memory allocation failed.

Definition at line 1750 of file monitube-data_packet.c.

References replication_data_s::age_ts, flow_entry_s::age_ts, flow_entry_s::base_ts, replication_data_s::bucket, replication_data_s::daddr, flow_entry_s::daddr, replication_data_s::dport, flow_entry_s::dport, entry_handle, flows_table, flow_entry_s::frag_group, get_monitored_rate(), hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, LOG, replication_data_s::m_vrf, flow_entry_s::m_vrf, replication_data_s::maddr, flow_entry_s::maddr, flow_entry_s::mdi_df, flow_entry_s::mdi_mlr, replication_data_s::mon, flow_entry_s::mon, obj_cache_id, flow_entry_s::pl_sum, replication_data_s::rate, flow_entry_s::rate, replication_data_s::source, flow_entry_s::source, replication_data_s::ssrc, flow_entry_s::ssrc, flow_entry_s::vb_max, flow_entry_s::vb_min, flow_entry_s::vb_post, and flow_entry_s::vb_pre.

void clean_flows_in_monitored_prefix ( char *  name,
in_addr_t  prefix,
in_addr_t  mask 
)

Find all flow entries using the given monitor and prefix, and remove them

Parameters:
[in] name The monitor name
[in] prefix The prefix address portion
[in] mask The prefix mask portion

Definition at line 1615 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, delete_replication_data_s::daddr, flow_entry_s::daddr, flow_entry_s::dport, delete_replication_data_s::dport, entry_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::mon, and obj_cache_id.

Referenced by add_address(), and delete_address().

void clean_flows_with_any_mirror ( void   ) 

Find all flow entries using the a mirror, and remove them

Definition at line 1355 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, flow_entry_s::daddr, delete_replication_data_s::daddr, flow_entry_s::dport, delete_replication_data_s::dport, entry_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::maddr, and obj_cache_id.

Referenced by clear_mirrors_configuration().

void clean_flows_with_any_monitor ( void   ) 

Find all flow entries using the a monitor, and remove them

Definition at line 1300 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, flow_entry_s::daddr, delete_replication_data_s::daddr, flow_entry_s::dport, delete_replication_data_s::dport, entry_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::mon, and obj_cache_id.

Referenced by clear_monitors_configuration().

void clean_flows_with_mirror ( in_addr_t  addr  ) 

Find all flow entries using the given mirror, and remove them

Parameters:
[in] addr The mirror from address

Definition at line 1413 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, delete_replication_data_s::daddr, flow_entry_s::daddr, flow_entry_s::dport, delete_replication_data_s::dport, entry_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::maddr, and obj_cache_id.

Referenced by delete_mirror().

void clean_flows_with_monitor ( char *  name  ) 

Find all flow entries using the given monitor, and remove them

Parameters:
[in] name The monitor name

Definition at line 1550 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, flow_entry_s::daddr, delete_replication_data_s::daddr, flow_entry_s::dport, delete_replication_data_s::dport, entry_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::mon, and obj_cache_id.

Referenced by delete_monitor(), and update_monitor().

void destroy_packet_loops_oc ( void   ) 

Cleanup shared memory and object caches

Definition at line 1274 of file monitube-data_packet.c.

References entry_handle, flows_table, obj_cache_id, and table_handle.

Referenced by monitube_quit().

status_t get_next_flow_state ( replication_data_t last,
replication_data_t next 
)

Get flow state from the "database" i.e. the flow hashtable. This is be sent to the backup/slave data component. This is only called on the master.

Parameters:
[in] last The last data returned, or NULL if looking for the first entry
[out] next The data to populate
Returns:
SUCCESS if there was more flow state information found after last, which was the previous data returned in next. EFAIL, if no more.

Definition at line 1682 of file monitube-data_packet.c.

References flow_entry_s::age_ts, replication_data_s::age_ts, replication_data_s::bucket, flow_entry_s::daddr, replication_data_s::daddr, flow_entry_s::dport, replication_data_s::dport, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, flow_entry_s::m_vrf, replication_data_s::m_vrf, flow_entry_s::maddr, replication_data_s::maddr, MAX_MON_NAME_LEN, flow_entry_s::mon, replication_data_s::mon, flow_entry_s::rate, replication_data_s::rate, flow_entry_s::source, replication_data_s::source, flow_entry_s::ssrc, and replication_data_s::ssrc.

void init_forwarding_database ( evContext  ctx  ) 

Initialize the forwarding database (start trying to attach to it)

Parameters:
[in] ctx event context from master thread used for FDB attach retry timer

Definition at line 1223 of file monitube-data_packet.c.

References LOG, retry_attach_fdb(), RETRY_FDB_ATTACH_INTERVAL, and retry_timer.

Referenced by monitube_init().

status_t init_packet_loops ( evContext  ctx  ) 

Start packet loops, one per available data core

Parameters:
[in] ctx event context from master thread used for cleanup timer

Definition at line 1086 of file monitube-data_packet.c.

References aging_cleanup(), aging_timer, do_shutdown, entry_handle, FLOW_AGE_CHECK_INTERVAL, FLOW_BUCKET_COUNT, FLOW_ENTRY_NAME, FLOW_TABLE_NAME, flows_table, hashtable_s::hash_bucket, LOG, loops_running, monitube_process_packet(), obj_cache_id, SHARED_MEM_NAME, shm_handle, and table_handle.

Referenced by init_application().

void redirect_flows_with_mirror ( in_addr_t  addr,
in_addr_t  to 
)

Find all flow entries using the given mirror, and update them

Parameters:
[in] addr The mirror from address
[in] to The new mirror to address

Definition at line 1474 of file monitube-data_packet.c.

References flow_entry_s::age_ts, flow_entry_s::daddr, flow_entry_s::dport, fdb_handle, FLOW_BUCKET_COUNT, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, LOG, flow_entry_s::m_vrf, flow_entry_s::maddr, MAX_MON_NAME_LEN, flow_entry_s::mon, flow_entry_s::rate, set_vrf(), flow_entry_s::source, and flow_entry_s::ssrc.

Referenced by update_mirror().

void remove_flow_state ( delete_replication_data_t data  ) 

Remove flow state from the backup "database" i.e. the flow hashtable. This is only called while this data component is a slave and not processing traffic.

Parameters:
[in] data The keys to find the flow state to remove

Definition at line 1845 of file monitube-data_packet.c.

References delete_replication_data_s::bucket, delete_replication_data_s::daddr, flow_entry_s::daddr, delete_replication_data_s::dport, flow_entry_s::dport, entry_handle, flows_table, hashtable_s::hash_bucket, hash_bucket_t, INSIST_ERR, flow_entry_s::lock, LOG, and obj_cache_id.

void stop_packet_loops ( evContext  ctx  ) 

Cleanup data loops for shutdown

Parameters:
[in] ctx event context from master thread used for cleanup timer

Definition at line 1246 of file monitube-data_packet.c.

References aging_timer, do_shutdown, fdb_connected, fdb_handle, loops_running, and retry_timer.

Referenced by monitube_quit().


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:02 2010 for SDK Your Net Corporation Monitube IPTV Monitoring Example: monitube-data 1.0 by Doxygen 1.5.1