nino fattore | 28 May 00:43 2016

Please need help with trap filtering

I'd like to know what is wrong with my code!My goal is to learn how to filter notification sent out.With the
following  code i am trying to use the NotifyFilterTable and NotifyFilterProfileTable to send 
all the traps to all the targets. the following step (once the following code is working) is to try to send
different traps to different targets.Thanks,Nino

 protected void addNotificationTargets(SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB) {
    targetMIB.addTargetAddress(new OctetString("notificationV3"),
                               new OctetString(new UdpAddress("").getValue()),
                               500, 1,
                               new OctetString("notify"),
                               new OctetString("v3notify"),

    targetMIB.addTargetParams(new OctetString("v3notify"),
                              //new OctetString("v3notify"),
                             // new OctetString("SHADES"),
                              new OctetString("NINO"),
(Continue reading)

Sudharani S | 26 May 07:28 2016

Network discovery usig snmp4j

Hi  Frank,
Can you please in this.
I am new SNMP protocol ,I have below requirement.Can anyone please help in 
this below requirement.

I need the guidance to start with this,I mean please let me know what all the 
  things I need to include to do this.
   And how to do snmp walk to pim neighbors table?,I have a snmp service enabled 
   in my system apart from this what all the jar files need to be include let me 
   know please.
  The requirement follows like this:
  1)To implement multicast network discovery using snmp in java 2)Create 
   CompletedRouterList (initially NULL) to store the routers for which discovery 
  was complete and a PendingRouterList containing the routers for which 
  discover is pending.
  3)At initialization time, statically populate the PendingRouterList with 
  initial set of routers from some config file.
  4)For each router in the PendingRouterList, if multicast is enabled then 
  query the pimInterfaceTable to obtain the list of interfaces on which PIM is 
  enabled. For example if R1 has PIM enabled and has interfaces 1/1 and 1/2/ on 
   which PIM is enabled then we will have:-
            1/2         1/1
      --------- R1 ----------
 5)For each router that has at least 1 interface that has PIM enabled on it, 
 query it's PIM Neighbor table to obtain the list of it's PIM neighbors. PIM 
 neighbor table also gives the interface index with which the router is 
 connected with it's neighbor. This information can be used to build the link 
 between the router and neighbor(s).
(Continue reading)

ru_44 | 18 May 15:19 2016

Null Pointer Exception - MOSubTreeProxy snmp4jAgent v2.5.0

Hi Frank,I recently upgraded to snmp4j 2.5.0 and snmp4j agent v2.5.0. There’s a bugfix in SNMP4J v2.5.0
which causes a Null Pointer Exception when we use
the MOSubtreeProxy in SNMP4J-Agent v2.5.0

* Fixed [SFJ-121]:
DefaultPDUFactory.createPDU does not set contextName and contextEngineID on


The MOSubtreeProxy class needs to set (or initialize) the
contextEngineID & contextEngineName in the DefaultPDUFactory inside its
constructor.  Currently when the
DefaultPDUFactory.applyContextInfoToScopedPDU() is called via DefaultPDUFactory.createPDU(),
both fields are NULL.

22767 [DefaultUDPTransportMapping_192.168.1.90/161]
DEBUG  - Access allowed for view
'fullReadView2' by subtree 1.3 for OID

java.lang.NullPointerException: Context engine ID
must not be null


(Continue reading)

nino fattore | 13 May 20:47 2016

nedeed help to use the addNotificationtargets() API

I'd like to use the addNotificationTargets() agent API to add a new target for notifications when the agent
is running.How can get to it and providing the SnmpTargetMIB and SnmpNotiicationMIB?Thanks,Nino
SNMP4J mailing list
SNMP4J <at>
nino fattore | 13 May 20:21 2016

forget password to the list

how can i retrieve the password?ThanksNino Fattore
SNMP4J mailing list
SNMP4J <at>
atike.demirbas | 13 May 12:10 2016

[Fwd: java.lang.IllegalArgumentException error]

---------------------------- Original Message ----------------------------
Subject: java.lang.IllegalArgumentException error
From:    atike.demirbas <at>
Date:    Wed, May 11, 2016 4:02 pm
To:      snmp4j <at>

I have developed an software for my school project. I have tried to
collect information on agent machines. When i do it for snmpv1, it is okay
but when i do it for snmpv3 i have an error. I have searched this problem
however i haven't found it. Please, help me.

There is my code;

Snmp client=null;
            client=new Snmp(new DefaultUdpTransportMapping());
            Address add=new UdpAddress("");

          //  USM usm=new USM(SecurityProtocols.getInstance(),new
         //   SecurityModels.getInstance().addSecurityModel(usm);

             UsmUser user = new UsmUser(new OctetString("nagios"),
                                     new OctetString("User3Password"),
                                     new OctetString("User3Encyrption"));
(Continue reading)

Raymond Yan Lok Chan | 12 May 08:25 2016

Print all In new window [SMI-1.2.0]Translating OID to human readable string

Hi all,
I am currently trying to use SMI-1.2.0 API to translate an OID using the
following guide:
and come up with the following code:
    static {
            SmiManager smiManager = new SmiManager(null, new
        } catch (IOException e){

    public static void main(String[] args) {
        OID testPrivOID = new OID("");

According to the guide, I expected to see output "enterprises.4976", but
instead I am only getting "".

Just for a confirmation, I tried to put everything in the main and checked
if the smiManager loaded the required Mibs:

    public static void main(String[] args) throws {
(Continue reading)

Frank Fock | 11 May 00:32 2016

AgenPro 4.1, SNMP4J-Agent 2.5, SNMP4J-Model 1.0 Released


AgenPro 4.1 has been released which includes a new engine to protect
existing data. The new format to protect user code in generated files
now supports more programming languages (comment types).

AgenPro 4.1 adds support for generating a complete agent including
pom.xml, agent main, and file.
With that, you can generate ready-to-use agents from your MIB files
with a few clicks only.

AgenPro 4.1 also provides code generation templates for SNMP
command generator (manager) implememtation based on
SNMP4J-Model 1.0.
It provides proxy objects for scalar and tabular SNMP objects.
Trap directed polling will be supported soon, other trap handling
is already supported using the standard SNMP4J API.
SNMP4J-Model can be used with SNMP4J-SMI-PRO to map
SNMP types to Java native types like String, Integer, Long, etc.
at runtime. AgenPro can be used to do the mapping at
compile time, though.

You can download SNMP4J-Model 1.0 and the other new releases
There you can also find a link to the API JavaDoc.

Comments and feature requests on SNMP4J-Model are welcome!
Its features will be extended during the next weeks and months
anyway, but I would like to know your most important requirements
(Continue reading)

linhui (F | 4 May 05:12 2016

Bug report: org.snmp4j.MessageException: Socket is closed

In our code, we use Snmp Object to send a trap. The question is : while running for some time (may be a week) in
Windows platform, there will occur exception while sending trap.

The Exception stack is :
         org.snmp4j.MessageException: Socket is closed
         at org.snmp4j.MessageDispatcherImpl.sendPdu(
         at org.snmp4j.Snmp.sendMessage(
         at org.snmp4j.Snmp.send(
         at org.snmp4j.Snmp.send(

I have checked the source, The closed socket is DefaultUdpTransportMapping's DatagramSocket.

Another messages:

(1)     Before running the sending-trap thread, we use listen() function to listen the IP and port which is the
same as sending-trap IP and port.
For example, the IP is and port is 6666, we listen and use to send a trap.

(2)     SNMP4j's version is 1.11.2

At the beginning of the thread running, there are no exceptions occur. And I don't know why this exception occur.

Somebody can help me and explains this?

Best regards,
Lin Hui
(Continue reading)

Frank Fock | 3 May 23:51 2016

SNMP4J 2.5.0 and MIB Explorer 4.1.4 Released


SNMP4J 2.5.0 has been released and is now also available at Maven Central.
All other SNMP4J open source packages will also be updated and then 
on Maven Central too.


SNMP4J 2.5.0:
* Added [SFJ-120]: Maven Central deployment support (refactored pom.xml).
* Fixed [SFJ-118]: DefaultTcpTransportMapping: SocketEntry instances 
created for incoming TCP connections
   are not immediately removed when connection is closed remotely.
* Fixed [SFJ-119]: Snmp: NotificationListener cannot be registered with 
custom configured TransportMapping.
* Fixed [SFJ-121]: DefaultPDUFactory.createPDU does not set contextName 
and contextEngineID on ScopedPDU
* Fixed [SFJ-124]: ArgumentParser cannot parse formats with default 
values for parameters correctly.
* Added: Added MaxAccess, SubIndexInfo, and SubIndexInfoImpl to better 
support MIB specification
   based SNMP operations.
* Improved: Added custom OID configuration support for non-standard 
security protocols in
* Added PrivGeneric to reduce code size.
* Added SecurityPrivacy.isSupported() to be able to test security 
protocol support by JVM.
(Continue reading)

ru_44 | 27 Apr 19:10 2016

Subindex on table row

 For our custom MIB, we have added code to the MOValueValidationListener::validate() for a table column. 
 How do we figure out what the subindex is for the row's column that is being validated?
SNMP4J mailing list
SNMP4J <at>