title: SNMP : add a trap destination
body: <p>I am fairly new to SNMP and i have created a SNMP Agent in java using the snmp4j library. 
  In my code, i have added localhost as a trap destination. I therefore receive the notifications on the port 162 :</p>
  
  <pre><code>    targetMIB.addTargetAddress(new OctetString("notification"),
          TransportDomains.transportDomainUdpIpv4,
          new OctetString(new UdpAddress("127.0.0.1/162").getValue()),
          200, 1,
          new OctetString("notify"),
          new OctetString("v2c"),
          StorageType.permanent);
  </code></pre>
  
  <p>What i am trying to do now is to receive traps from another ip address using a snmp browser such as iReasoning MIB Browser. But there i cannot manage to add an entry to the target mib. </p>
  
  <p>Am i missing something ?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT :</p>
  
  <p>I want to add an entry using the mib browser to the target Address table. With iReasoning Mib browser i don't have the create row button and with ManageEngine's tool i have an add button but it does not seem to do anything.</p>
  
  <p>I am therefore only trying here to change the row i have created with the code :</p>
  
  <p>Here is a screen shot of the mib browser :
  <img src="https://i.stack.imgur.com/zt924.jpg" alt="Mib Browser snmpTargetAddrTable"> </p>
  
  <p>When i try to change the ip address i get an error :
  <img src="https://i.stack.imgur.com/CJlGD.jpg" alt="Set window"></p>
  
  <p><img src="https://i.stack.imgur.com/Foe35.jpg" alt="Error message"></p>
  
  <p>I have tried to set the value using an OctetString with :
  127.0.0.1:162
  127.0.0.1/162
  0700000100A2
  0x0700000100A2</p>
  
  <p>but nothing works</p>