A Discrete-Event Network Simulator
API
ns3::ofi::Stats Class Reference

#include "openflow-interface.h"

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)
 
void DoCleanup (void *state)
 Cleans any state created by the init or dump functions. More...
 
int DoDump (Ptr< OpenFlowSwitchNetDevice > swtch, void *state, ofpbuf *buffer)
 Appends statistics for OpenFlowSwitchNetDevice to 'buffer'. More...
 
int DoInit (const void *body, int body_len, void **state)
 Prepares to dump some kind of statistics on the connected OpenFlowSwitchNetDevice. More...
 

Public Attributes

ofp_stats_types type
 

Private Member Functions

int AggregateStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, ofp_aggregate_stats_request *s, ofpbuf *buffer)
 
int AggregateStatsInit (const void *body, int body_len, void **state)
 
int DescStatsDump (void *state, ofpbuf *buffer)
 
int FlowStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, FlowStatsState *s, ofpbuf *buffer)
 
int FlowStatsInit (const void *body, int body_len, void **state)
 
int PortStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, PortStatsState *s, ofpbuf *buffer)
 
int PortStatsInit (const void *body, int body_len, void **state)
 
int PortTableStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, void *state, ofpbuf *buffer)
 
int TableStatsDump (Ptr< OpenFlowSwitchNetDevice > dp, void *state, ofpbuf *buffer)
 

Private Attributes

int(* AggregateDumpCallback )(sw_flow *flow, void *state)
 
int(* FlowDumpCallback )(sw_flow *flow, void *state)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Stats()

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

Member Function Documentation

◆ AggregateStatsDump()

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

◆ AggregateStatsInit()

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

◆ DescStatsDump()

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

◆ 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 s,
ofpbuf *  buffer 
)
private

◆ FlowStatsInit()

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

◆ PortStatsDump()

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

◆ PortStatsInit()

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

◆ PortTableStatsDump()

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

◆ TableStatsDump()

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

Member Data Documentation

◆ AggregateDumpCallback

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

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

◆ FlowDumpCallback

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

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

◆ type

ofp_stats_types ns3::ofi::Stats::type

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


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