WaarpSNMP

Waarp SNMP is a library that encapsulates SNMP4J Agent library.

 

Its role is to facilitate the development of SNMP Agent in Waarp Project.

 

It is also possible to use it for other projects.

 

It depends on Waarp Common for the logging and the xml reading facilities.

 

The XML configuration file for SNMP is as follow:

<snmpconfig>

  <config>

    <localaddress>udp:IP/PORT</localaddress>

        Local Address to use as listen in format udp:address/port or tcp:address/port

        where IP is an IP address, and PORT the associated port. If IP is 0.0.0.0, all available IP will be used to listen to SNMP requests.

    <localaddress>tcp:IP/PORT</localaddress>

        Multiple local address could be set.

    <nbthread>4</nbthread>

        The number of thread to use (default is 4)

    <filtered>False</filtered>

        Enables or disables source address filtering for incoming SNMPv1 or SNMPv2c packets. By default source address filtering is disabled! If enabled, only messages received for community based security models are processed, that match an address in the snmpTargetAddressTable with the transport tag associated with the community used.

    <usetrap>True</usetrap>

        Use Trap (True) or Inform (False) when generating push event

    <trapinformlevel>5</trapinformlevel>

        Level of trap or inform event generated: 0 None 1 Start/Stop 2 Critical 3 Error 4 Every events in Warning

  </config>

  <targets>

    <target> Used to send a notification

      <name>notificationV2c</name>

          Name To use as target

      <domain>UdpIpv4</domain>

          1 Value between: UdpIpV4 UdpIpv6 UdpIpV4e UdpIpv6z TcpIpv4 TcpIpv6 TcpIpv4z TcpIpv6z

      <address>127.0.0.1/162</address>

          As address/port as 192.168.0.1/162

      <timeout>200</timeout>

          Maximum delay to wait with an Inform mode event

      <retries>1</retries>

          Number of retries once the Inform is sent and not acknowledged

      <isv2>True</isv2>

          This entry is conformed with V2C or with V3 of SNMP

    </target>

    <target>

        Multiple targets are allowed

    </target>

  </targets>

  <securities>

    <security>

      <securityname>SHADES</securityname>

          Name To use as Name Entry for External Manager

      <securityauthprotocol>SHA</securityauthprotocol>

          Protocol between SHA or MD5

      <securityauthpass>SHADESAuthPassword</securityauthpass>

          Password (might be empty)

      <securityprivprotocol>PDES</securityprivprotocol>

          Optional Protocol as P3DES, PAES128, PAES192, PAES256, PDES

      <securityprivpass>SHADESPrivPassword</securityprivpass>

          Password (might be empty)

    </security>

    <security>

    </security>

        Multiple Security could be set.

  </securities>

</snmpconfig>