5 #ifndef __OF1X_STATISTICS_H__
6 #define __OF1X_STATISTICS_H__
12 #include "of1x_group_types.h"
13 #include "../../../platform/lock.h"
15 #define OF1X_STATS_NS_IN_A_SEC 1000000000
48 uint64_t packet_count;
63 struct timeval initial_time;
65 platform_mutex_t* mutex;
72 uint64_t lookup_count;
73 uint64_t matched_count;
87 platform_mutex_t* mutex;
94 uint64_t packet_count;
109 platform_mutex_t* mutex;
114 uint64_t packet_count;
131 platform_mutex_t* mutex;
149 uint32_t duration_sec;
150 uint32_t duration_nsec;
152 uint16_t idle_timeout;
153 uint16_t hard_timeout;
157 uint64_t packet_count;
171 uint32_t num_of_entries;
181 uint64_t packet_count;
190 uint64_t packet_count;
251 c->byte_count = c->packet_count = 0x0ULL;
253 for(i=0;i<ROFL_PIPELINE_MAX_TIDS;i++){
254 c->packet_count += stats->s.__internal[i].packet_count;
255 c->byte_count += stats->s.__internal[i].byte_count;
260 copy->initial_time = origin->initial_time;
268 c->lookup_count = c->matched_count = 0x0ULL;
270 for(i=0;i<ROFL_PIPELINE_MAX_TIDS;i++){
271 c->lookup_count += stats->s.__internal[i].lookup_count;
272 c->matched_count += stats->s.__internal[i].matched_count;
281 c->byte_count = c->packet_count = 0x0ULL;
283 for(i=0;i<ROFL_PIPELINE_MAX_TIDS;i++){
284 c->packet_count += stats->s.__internal[i].packet_count;
285 c->byte_count += stats->s.__internal[i].byte_count;
291 c->byte_count = c->packet_count = 0x0ULL;
293 for(i=0;i<ROFL_PIPELINE_MAX_TIDS;i++){
294 c->packet_count += stats->s.__internal[i].packet_count;
295 c->byte_count += stats->s.__internal[i].byte_count;
of1x_stats_flow_aggregate_msg_t * of1x_get_flow_aggregate_stats(struct of1x_pipeline *pipeline, uint8_t table_id, uint32_t cookie, uint32_t cookie_mask, uint32_t out_port, uint32_t out_group, struct of1x_match_group *matchs)
Retrieves aggregated flow stats.
OpenFlow v1.0, 1.2 and 1.3.2 flow entry structure.
struct of1x_stats_flow_msg of1x_stats_flow_msg_t
Linked list containing all the individual flow stats.
void __of1x_stats_flow_reset_counts(struct of1x_flow_entry *entry)
of1x_stats_flow_reset_counts
of1x_stats_group_msg_t * of1x_get_group_stats(struct of1x_pipeline *pipeline, uint32_t id)
Retrieves the statistics of a groupReturns a structure with the statistics that needs to be freed by ...
OpenFlow v1.0, 1.2 and 1.3.2 flow table abstraction.
Single flow entry stats message.
enum of1x_group_type of1x_group_type_t
Group type.
Action group (apply-actions) structure.
struct of1x_stats_single_flow_msg of1x_stats_single_flow_msg_t
Single flow entry stats message.
of1x_stats_flow_msg_t * of1x_get_flow_stats(struct of1x_pipeline *pipeline, uint8_t table_id, uint32_t cookie, uint32_t cookie_mask, uint32_t out_port, uint32_t out_group, struct of1x_match_group *matchs)
Retrieves individual flow stats.
Linked list containing all the individual flow stats.
void of1x_destroy_stats_flow_aggregate_msg(of1x_stats_flow_aggregate_msg_t *msg)
Destroy aggreagated flow_stats message.
void __of1x_stats_table_destroy(struct of1x_flow_table *table)
Destroys table statistics state.
void __of1x_destroy_flow_stats(struct of1x_flow_entry *entry)
of1x_stats_flow_destroy basically destroys the mutex
void __of1x_stats_table_init(struct of1x_flow_table *table)
Initializes table statistics state.
void of1x_destroy_stats_flow_msg(of1x_stats_flow_msg_t *msg)
Destroy a flow_stats message.
of1x_stats_group_desc_msg_t * of1x_get_group_desc_stats(struct of1x_pipeline *pipeline)
Retrieves a copy of the group and bucket structure.
void of1x_stats_flow_get_duration(struct of1x_flow_entry *entry, uint32_t *sec, uint32_t *nsec)
Get the duration of the flow_entry.
struct of1x_stats_flow_aggregate_msg of1x_stats_flow_aggregate_msg_t
Aggregated flow stats message.
ROFL_BEGIN_DECLS void __of1x_init_flow_stats(struct of1x_flow_entry *entry)
operations in statistics.c
OpenFlow v1.0, 1.2 and 1.3.2 pipeline abstraction data structure.
Aggregated flow stats message.
void of1x_destroy_stats_group_msg(of1x_stats_group_msg_t *msg)
Frees memory of statistics messageNeeds to be called after retrieving the statistics of the groups...
void of1x_destroy_group_desc_stats(of1x_stats_group_desc_msg_t *msg)
Frees the memory for a of1x_stats_group_desc_msg_t structure.