## org.opennms.netmgt.snmp.snmp4j
Class IpAddressNetSnmp64bitBugAware

    java.lang.Object
      org.snmp4j.smi.AbstractVariable
          org.snmp4j.smi.SMIAddress
              org.snmp4j.smi.IpAddress
                  org.opennms.netmgt.snmp.snmp4j.IpAddressNetSnmp64bitBugAware

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, org.snmp4j.asn1.BERSerializable, org.snmp4j.smi.Address, org.snmp4j.smi.AssignableFromString, org.snmp4j.smi.Variable

    public class IpAddressNetSnmp64bitBugAware

extends org.snmp4j.smi.IpAddress

Author:
  Jeff Gehlbach <jeffg@opennms.org> This class exists solely to work around a bug in the Net-SNMP BER library that causes Net-SNMP agents prior to version 5.4.1 on 64-bit platforms to encode IPv4 addresses as 8 bytes rather than 4 bytes. SNMP4J correctly discards these representations by default. This class will be used in place of org.snmp4j.smi.IpAddress only if we call org.snmp4j.SNMP4JSettings.setExtensibilityEnabled(true) AND set the system property org.snmp4j.smisyntaxes to refer to a classpath properties resource (relative to class org.snmp4j.smi.AbstractVariable) that overrides the default mapping for BER type 64 (nominally IpAddress). See the file opennms-snmp4j-smisyntaxes.properties. The workaround for 8-bit long IP addresses will be enabled only if the system property org.opennms.netmgt.snmp.workarounds.allow64BitIpAddress is set to "true".
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.snmp4j.smi.IpAddress
`ANY_IPADDRESS`

Fields inherited from class org.snmp4j.smi.AbstractVariable
`SMISYNTAXES_PROPERTIES`

Constructor Summary
`IpAddressNetSnmp64bitBugAware()`
`IpAddressNetSnmp64bitBugAware(java.net.InetAddress address)`
`IpAddressNetSnmp64bitBugAware(java.lang.String address)`

Method Summary
`void` `decodeBER(org.snmp4j.asn1.BERInputStream inputStream)`

Methods inherited from class org.snmp4j.smi.IpAddress
`clone, compareTo, encodeBER, equals, fromSubIndex, getBERLength, getInetAddress, getSyntax, hashCode, isValid, parse, parseAddress, setAddress, setInetAddress, setValue, toInt, toLong, toString, toSubIndex`

Methods inherited from class org.snmp4j.smi.AbstractVariable
`createFromBER, createFromSyntax, getBERPayloadLength, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### IpAddressNetSnmp64bitBugAware

    public IpAddressNetSnmp64bitBugAware()

### IpAddressNetSnmp64bitBugAware

    public IpAddressNetSnmp64bitBugAware(java.net.InetAddress address)

### IpAddressNetSnmp64bitBugAware

    public IpAddressNetSnmp64bitBugAware(java.lang.String address)

Method Detail

### decodeBER

    public void decodeBER(org.snmp4j.asn1.BERInputStream inputStream)
                   throws java.io.IOException

  Specified by:
    `decodeBER` in interface `org.snmp4j.asn1.BERSerializable`
  Overrides:
    `decodeBER` in class `org.snmp4j.smi.IpAddress`
  Throws:
    `java.io.IOException`

Copyright © 2009. All Rights Reserved.