A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::ofi::Stats Class Reference

OpenFlow statistics. More...

#include "openflow-interface.h"

+ 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.
 

Detailed Description

OpenFlow statistics.

Definition at line 147 of file openflow-interface.h.

Constructor & Destructor Documentation

◆ Stats()

ns3::ofi::Stats::Stats ( ofp_stats_types  _type,
size_t  body_len 
)

Constructor.

Parameters
_typeOpenFlow stats type.
body_lenStat body length.

Member Function Documentation

◆ AggregateStatsDump()

int ns3::ofi::Stats::AggregateStatsDump ( Ptr< OpenFlowSwitchNetDevice dp,
ofp_aggregate_stats_request *  state,
ofpbuf *  buffer 
)
private

Dump the stats.

Parameters
dpOpenFlow NetDevice.
stateState.
[out]bufferoutput buffer.
Returns
0 if successful

◆ AggregateStatsInit()

int ns3::ofi::Stats::AggregateStatsInit ( const void *  body,
int  body_len,
void **  state 
)
private

Initialize the stats.

Parameters
bodyBody member of the struct ofp_stats_request.
body_lenLength of the body member.
stateState information.
Returns
0 if successful, otherwise a negative error code.

◆ DescStatsDump()

int ns3::ofi::Stats::DescStatsDump ( void *  state,
ofpbuf *  buffer 
)
private

Dumps the stats description.

Parameters
[in]stateThe state.
[out]bufferOutput buffer.
Returns
zero on success

◆ DoCleanup()

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.

Parameters
stateState information to clear.

◆ DoDump()

int ns3::ofi::Stats::DoDump ( Ptr< OpenFlowSwitchNetDevice swtch,
void *  state,
ofpbuf *  buffer 
)

Appends statistics for OpenFlowSwitchNetDevice to 'buffer'.

Parameters
swtchThe OpenFlowSwitchNetDevice this callback is associated with.
stateState information.
bufferBuffer to append stats reply to.
Returns
1 if it should be called again later with another buffer, 0 if it is done, or a negative errno value on failure.

◆ DoInit()

int ns3::ofi::Stats::DoInit ( const void *  body,
int  body_len,
void **  state 
)

Prepares to dump some kind of statistics on the connected OpenFlowSwitchNetDevice.

Parameters
bodyBody member of the struct ofp_stats_request.
body_lenLength of the body member.
stateState information.
Returns
0 if successful, otherwise a negative error code.

◆ FlowStatsDump()

int ns3::ofi::Stats::FlowStatsDump ( Ptr< OpenFlowSwitchNetDevice dp,
FlowStatsState state,
ofpbuf *  buffer 
)
private

Dump the stats.

Parameters
dpOpenFlow NetDevice.
stateState.
[out]bufferoutput buffer.
Returns
0 if successful

◆ FlowStatsInit()

int ns3::ofi::Stats::FlowStatsInit ( const void *  body,
int  body_len,
void **  state 
)
private

Initialize the stats.

Parameters
bodyBody member of the struct ofp_stats_request.
body_lenLength of the body member.
stateState information.
Returns
0 if successful, otherwise a negative error code.

◆ PortStatsDump()

int ns3::ofi::Stats::PortStatsDump ( Ptr< OpenFlowSwitchNetDevice dp,
PortStatsState state,
ofpbuf *  buffer 
)
private

Dump the stats.

Parameters
dpOpenFlow NetDevice.
stateState.
[out]bufferoutput buffer.
Returns
0 if successful

◆ PortStatsInit()

int ns3::ofi::Stats::PortStatsInit ( const void *  body,
int  body_len,
void **  state 
)
private

Initialize the stats.

Parameters
bodyBody member of the struct ofp_stats_request.
body_lenLength of the body member.
stateState information.
Returns
0 if successful, otherwise a negative error code.

◆ PortTableStatsDump()

int ns3::ofi::Stats::PortTableStatsDump ( Ptr< OpenFlowSwitchNetDevice dp,
void *  state,
ofpbuf *  buffer 
)
private

Dump the stats.

Parameters
dpOpenFlow NetDevice.
stateState.
[out]bufferoutput buffer.
Returns
0 if successful

◆ TableStatsDump()

int ns3::ofi::Stats::TableStatsDump ( Ptr< OpenFlowSwitchNetDevice dp,
void *  state,
ofpbuf *  buffer 
)
private

Dump the stats.

Parameters
dpOpenFlow NetDevice.
stateState.
[out]bufferoutput buffer.
Returns
0 if successful

Member Data Documentation

◆ AggregateDumpCallback

int(* ns3::ofi::Stats::AggregateDumpCallback) (sw_flow *flow, void *state)
private

Aggregate dump callback functor.

Definition at line 236 of file openflow-interface.h.

◆ FlowDumpCallback

int(* ns3::ofi::Stats::FlowDumpCallback) (sw_flow *flow, void *state)
private

Flow dump callback functor.

Definition at line 234 of file openflow-interface.h.

◆ type

ofp_stats_types ns3::ofi::Stats::type

Status type.

Definition at line 210 of file openflow-interface.h.


The documentation for this class was generated from the following file: