class IPV4Header

noinspection RubyResolve,RubyResolve

Public Instance Methods

has_data?(size_header) click to toggle source
# File lib/logstash/codecs/sflow/packet_header.rb, line 88
def has_data?(size_header)
  bytes_left = size_header / 8 - ip_header_length * 4
  case ip_protocol
  when 6
    return bytes_left >= 20
  when 17
    return bytes_left >= 8
  else
    return true
  end
end
is_options?() click to toggle source
# File lib/logstash/codecs/sflow/packet_header.rb, line 100
def is_options?
  ip_header_length.to_i > 5
end