OpenFlow statistics. More...
#include "openflow-interface.h"
 Collaboration diagram for ns3::ofi::Stats:
 Collaboration diagram for ns3::ofi::Stats:| Classes | |
| struct | FlowStatsState | 
| State of the FlowStats request/reply.  More... | |
| struct | PortStatsState | 
| State of the PortStats request/reply.  More... | |
| Public Member Functions | |
| Stats (ofp_stats_types _type, size_t body_len) | |
| Constructor. | |
| void | DoCleanup (void *state) | 
| Cleans any state created by the init or dump functions. | |
| int | DoDump (Ptr< OpenFlowSwitchNetDevice > swtch, void *state, ofpbuf *buffer) | 
| Appends statistics for OpenFlowSwitchNetDevice to 'buffer'. | |
| int | DoInit (const void *body, int body_len, void **state) | 
| Prepares to dump some kind of statistics on the connected OpenFlowSwitchNetDevice. | |
| Public Attributes | |
| ofp_stats_types | type | 
| Status type. | |
| Private Member Functions | |
| int | DescStatsDump (void *state, ofpbuf *buffer) | 
| Dumps the stats description. | |
| int | FlowStatsInit (const void *body, int body_len, void **state) | 
| Initialize the stats. | |
| int | AggregateStatsInit (const void *body, int body_len, void **state) | 
| Initialize the stats. | |
| int | PortStatsInit (const void *body, int body_len, void **state) | 
| Initialize the stats. | |
| int | FlowStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, FlowStatsState *state, ofpbuf *buffer) | 
| Dump the stats. | |
| int | AggregateStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, ofp_aggregate_stats_request *state, ofpbuf *buffer) | 
| Dump the stats. | |
| int | TableStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, void *state, ofpbuf *buffer) | 
| Dump the stats. | |
| int | PortStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, PortStatsState *state, ofpbuf *buffer) | 
| Dump the stats. | |
| int | PortTableStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, void *state, ofpbuf *buffer) | 
| Dump the stats. | |
| Private Attributes | |
| int(* | AggregateDumpCallback )(sw_flow *flow, void *state) | 
| Aggregate dump callback functor. | |
| int(* | FlowDumpCallback )(sw_flow *flow, void *state) | 
| Flow dump callback functor. | |
OpenFlow statistics.
Definition at line 136 of file openflow-interface.h.
| ns3::ofi::Stats::Stats | ( | ofp_stats_types | _type, | 
| size_t | body_len ) | 
Constructor.
| _type | OpenFlow stats type. | 
| body_len | Stat body length. | 
Definition at line 19 of file openflow-interface.cc.
References NS_LOG_ERROR, and type.
| 
 | private | 
Dump the stats.
| dp | OpenFlow NetDevice. | |
| state | State. | |
| [out] | buffer | output buffer. | 
Definition at line 241 of file openflow-interface.cc.
References AggregateDumpCallback.
Referenced by DoDump().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Initialize the stats.
| body | Body member of the struct ofp_stats_request. | 
| body_len | Length of the body member. | 
| state | State information. | 
Definition at line 223 of file openflow-interface.cc.
Referenced by DoInit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Dumps the stats description.
| [in] | state | The state. | 
| [out] | buffer | Output buffer. | 
Definition at line 132 of file openflow-interface.cc.
References ns3::OpenFlowSwitchNetDevice::GetHardwareDescription(), ns3::OpenFlowSwitchNetDevice::GetManufacturerDescription(), ns3::OpenFlowSwitchNetDevice::GetSerialNumber(), and ns3::OpenFlowSwitchNetDevice::GetSoftwareDescription().
Referenced by DoDump().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::ofi::Stats::DoCleanup | ( | void * | state | ) | 
Cleans any state created by the init or dump functions.
May not be implemented if no cleanup is required.
| state | State information to clear. | 
Definition at line 106 of file openflow-interface.cc.
References type.
Referenced by ns3::OpenFlowSwitchNetDevice::StatsDone().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| int ns3::ofi::Stats::DoDump | ( | Ptr< OpenFlowSwitchNetDevice > | swtch, | 
| void * | state, | ||
| ofpbuf * | buffer ) | 
Appends statistics for OpenFlowSwitchNetDevice to 'buffer'.
| swtch | The OpenFlowSwitchNetDevice this callback is associated with. | 
| state | State information. | 
| buffer | Buffer to append stats reply to. | 
Definition at line 82 of file openflow-interface.cc.
References AggregateStatsDump(), DescStatsDump(), FlowStatsDump(), PortStatsDump(), PortTableStatsDump(), TableStatsDump(), and type.
Referenced by ns3::OpenFlowSwitchNetDevice::StatsDump().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| int ns3::ofi::Stats::DoInit | ( | const void * | body, | 
| int | body_len, | ||
| void ** | state ) | 
Prepares to dump some kind of statistics on the connected OpenFlowSwitchNetDevice.
| body | Body member of the struct ofp_stats_request. | 
| body_len | Length of the body member. | 
| state | State information. | 
Definition at line 58 of file openflow-interface.cc.
References AggregateStatsInit(), FlowStatsInit(), PortStatsInit(), and type.
Referenced by ns3::OpenFlowSwitchNetDevice::ReceiveStatsRequest().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Dump the stats.
| dp | OpenFlow NetDevice. | |
| state | State. | |
| [out] | buffer | output buffer. | 
Definition at line 193 of file openflow-interface.cc.
References ns3::ofi::Stats::FlowStatsState::buffer, FlowDumpCallback, MAX_FLOW_STATS_BYTES, ns3::ofi::Stats::FlowStatsState::now, ns3::ofi::Stats::FlowStatsState::position, ns3::ofi::Stats::FlowStatsState::rq, and ns3::ofi::Stats::FlowStatsState::table_idx.
Referenced by DoDump().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Initialize the stats.
| body | Body member of the struct ofp_stats_request. | 
| body_len | Length of the body member. | 
| state | State information. | 
Definition at line 147 of file openflow-interface.cc.
Referenced by DoInit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Dump the stats.
| dp | OpenFlow NetDevice. | |
| state | State. | |
| [out] | buffer | output buffer. | 
Definition at line 329 of file openflow-interface.cc.
References ns3::ofi::Port::mpls_ttl0_dropped, ns3::ofi::Port::netdev, NS_LOG_ERROR, ns3::ofi::Stats::PortStatsState::num_ports, port, ns3::ofi::Stats::PortStatsState::ports, ns3::ofi::Port::rx_bytes, ns3::ofi::Port::rx_packets, ns3::ofi::Port::tx_bytes, ns3::ofi::Port::tx_dropped, and ns3::ofi::Port::tx_packets.
Referenced by DoDump().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Initialize the stats.
| body | Body member of the struct ofp_stats_request. | 
| body_len | Length of the body member. | 
| state | State information. | 
Definition at line 315 of file openflow-interface.cc.
Referenced by DoInit().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Dump the stats.
| dp | OpenFlow NetDevice. | |
| state | State. | |
| [out] | buffer | output buffer. | 
Definition at line 302 of file openflow-interface.cc.
Referenced by DoDump().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Dump the stats.
| dp | OpenFlow NetDevice. | |
| state | State. | |
| [out] | buffer | output buffer. | 
Definition at line 281 of file openflow-interface.cc.
Referenced by DoDump().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Aggregate dump callback functor.
Definition at line 225 of file openflow-interface.h.
Referenced by AggregateStatsDump().
| 
 | private | 
Flow dump callback functor.
Definition at line 223 of file openflow-interface.h.
Referenced by FlowStatsDump().
| ofp_stats_types ns3::ofi::Stats::type | 
Status type.
Definition at line 199 of file openflow-interface.h.
Referenced by Stats(), DoCleanup(), DoDump(), DoInit(), and ns3::OpenFlowSwitchNetDevice::StatsDump().