Sha256: 4498866198267bf15ede5c3df8ba4acd07c912e1fe497780bef19d5938e984fc

Contents?: true

Size: 543 Bytes

Versions: 4

Compression:

Stored size: 543 Bytes

Contents

require 'snmpjr/wrappers/smi'
require 'snmpjr/version'

class Snmpjr
  class TargetV2C

    def create configuration
      target = Snmpjr::Wrappers::CommunityTarget.new
      target.community = Snmpjr::Wrappers::SMI::OctetString.new(configuration.community)
      target.address = Snmpjr::Wrappers::SMI::GenericAddress.parse("udp:#{configuration.host}/#{configuration.port}")
      target.version = Snmpjr::Version::V2C
      target.retries = configuration.retries
      target.timeout = configuration.timeout
      target
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snmpjr-0.3.3-java lib/snmpjr/target_v2c.rb
snmpjr-0.3.2-java lib/snmpjr/target_v2c.rb
snmpjr-0.3.1-java lib/snmpjr/target_v2c.rb
snmpjr-0.3.0-java lib/snmpjr/target_v2c.rb