Class: Fluent::Plugin::NetflowParser::MplsLabel

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/fluent/plugin/netflow_records.rb

Instance Method Summary collapse

Instance Method Details

#getObject



64
65
66
# File 'lib/fluent/plugin/netflow_records.rb', line 64

def get
  self.label
end

#set(val) ⇒ Object



59
60
61
62
63
# File 'lib/fluent/plugin/netflow_records.rb', line 59

def set(val)
  self.label = val >> 4
  self.exp = (val & 0b1111) >> 1
  self.bottom = val & 0b1
end