Class: Trema::FlowRemoved
- Inherits:
-
Object
- Object
- Trema::FlowRemoved
- Defined in:
- ruby/trema/flow-removed.c
Constant Summary collapse
- OFPRR_IDLE_TIMEOUT =
INT2NUM( OFPRR_IDLE_TIMEOUT )
- OFPRR_HARD_TIMEOUT =
INT2NUM( OFPRR_HARD_TIMEOUT )
- OFPRR_DELETE =
INT2NUM( OFPRR_DELETE )
Instance Method Summary collapse
-
#byte_count ⇒ Number
A counter of the total number of bytes.
-
#cookie ⇒ Number
An opaque handle copied from the corresponding flow setup message.
-
#datapath_id ⇒ Number
Message originator identifier.
-
#duration_nsec ⇒ Number
The number of nanoseconds the flow was active.
-
#duration_sec ⇒ Number
The number of seconds the flow was active.
-
#idle_timeout ⇒ Number
Time elapsed in seconds before the flow is removed.
-
#initialize(options = {}) ⇒ FlowRemoved
constructor
When a flow is deleted or expired a
OFPT_FLOW_REMOVEDmessage is sent as long as theOFPFF_SEND_FLOW_REMbit is toggled in theflagsbitmap during flow setup. -
#match ⇒ Match
Flow fields matched.
-
#packet_count ⇒ Number
A counter of the total number of packets.
-
#priority ⇒ Number
The priority level of the flow copied from the corresponding flow setup message.
-
#reason ⇒ Number
The reason why the flow is removed.
-
#transaction_id ⇒ Number
For this asynchronous message the transaction_id is set to zero.
Constructor Details
#initialize(options = {}) ⇒ FlowRemoved
When a flow is deleted or expired a OFPT_FLOW_REMOVED message is sent as long as the OFPFF_SEND_FLOW_REM bit is toggled in the flags bitmap during flow setup. A user would not explicitly instantiate a Trema::FlowRemoved object but would be created while parsing the OPPT_FLOW_REMOVED message. Returns an object that encapsulates the OPPT_FLOW_REMOVED OpenFlow message.
92 93 94 95 96 |
# File 'ruby/trema/flow-removed.c', line 92 static VALUE flow_removed_init( VALUE self, VALUE ) { rb_iv_set( self, "@attribute", ); return self; } |
Instance Method Details
#byte_count ⇒ Number
A counter of the total number of bytes.
215 216 217 218 |
# File 'ruby/trema/flow-removed.c', line 215 static VALUE flow_removed_byte_count( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "byte_count" ) ) ); } |
#cookie ⇒ Number
An opaque handle copied from the corresponding flow setup message.
137 138 139 140 |
# File 'ruby/trema/flow-removed.c', line 137 static VALUE ( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "cookie" ) ) ); } |
#datapath_id ⇒ Number
Message originator identifier.
104 105 106 107 |
# File 'ruby/trema/flow-removed.c', line 104 static VALUE flow_removed_datapath_id( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "datapath_id" ) ) ); } |
#duration_nsec ⇒ Number
The number of nanoseconds the flow was active.
182 183 184 185 |
# File 'ruby/trema/flow-removed.c', line 182 static VALUE flow_removed_duration_nsec( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "duration_nsec" ) ) ); } |
#duration_sec ⇒ Number
The number of seconds the flow was active.
171 172 173 174 |
# File 'ruby/trema/flow-removed.c', line 171 static VALUE flow_removed_duration_sec( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "duration_sec" ) ) ); } |
#idle_timeout ⇒ Number
Time elapsed in seconds before the flow is removed.
193 194 195 196 |
# File 'ruby/trema/flow-removed.c', line 193 static VALUE flow_removed_idle_timeout( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "idle_timeout" ) ) ); } |
#match ⇒ Match
Flow fields matched.
126 127 128 129 |
# File 'ruby/trema/flow-removed.c', line 126 static VALUE flow_removed_match( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "match" ) ) ); } |
#packet_count ⇒ Number
A counter of the total number of packets.
204 205 206 207 |
# File 'ruby/trema/flow-removed.c', line 204 static VALUE flow_removed_packet_count( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "packet_count" ) ) ); } |
#priority ⇒ Number
The priority level of the flow copied from the corresponding flow setup message.
149 150 151 152 |
# File 'ruby/trema/flow-removed.c', line 149 static VALUE flow_removed_priority( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "priority" ) ) ); } |
#reason ⇒ Number
The reason why the flow is removed.
160 161 162 163 |
# File 'ruby/trema/flow-removed.c', line 160 static VALUE flow_removed_reason( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "reason" ) ) ); } |
#transaction_id ⇒ Number
For this asynchronous message the transaction_id is set to zero.
115 116 117 118 |
# File 'ruby/trema/flow-removed.c', line 115 static VALUE flow_removed_transaction_id( VALUE self ) { return rb_hash_aref( rb_iv_get( self, "@attribute" ), ID2SYM( rb_intern( "transaction_id" ) ) ); } |