<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.network.snmp4j.general">
    <title>gmane.network.snmp4j.general</title>
    <link>http://blog.gmane.org/gmane.network.snmp4j.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2236"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2228"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2225"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2223"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2221"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2212"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2211"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2203"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2200"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2198"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2197"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2193"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2192"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2180"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2168"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2166"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2164"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2153"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2152"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.network.snmp4j.general/2149"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2236">
    <title>Fwd:  Fwd: Table Model</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2236</link>
    <description>&lt;pre&gt;Hi Frank,

 Thanks for your response. According to instrumentation guide I am updating
the table model before the request is processed based on external event.
Our table will be small tables doesn't exceed 20 row max. The problem we
are having is not with the order, it is actually with the content. I have
a test data as follow:

Set1:
Component_set1_1
Component_set1_2
Component_set1_3

Set2:
Component_set2_1
Component_set2_2
Component_set2_3

When I send a request from a Mib browser, the table content gets mixed. For
example the data in the table could be something like that:

Component_set1_1
Component_set2_2
Component_set1_3

Which is not what I have expected as my model should have either Set1 or
Set2 but not mix of both.

As you know I am implementing MOServerLookupListener interface and in
queryEvent(MOServerLookupEvent event)  I am building my table model. I know
queryEvent method get called multiple times based on number of columns and
rows, and maybe that's why I am getting mixed results even though I am
clearing the model.

I am sure I am doing something wrong, and appricate your help.

Thanks.
AF



On Thu, May 2, 2013 at 4:28 PM, Frank Fock &amp;lt;fock-uhZIdBdo/7ZBDgjK7y7TUQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Aiman Farhat</dc:creator>
    <dc:date>2013-05-03T09:57:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2228">
    <title>Why 'stop' on SocketException in DefaultUdpTransportMapping.ListenThread?</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2228</link>
    <description>&lt;pre&gt;I am a little confused by this change.  

We have run into this issue, with a sporadic socket closed exception, the cause of which we have not been able to identify.  What we are seeing is that the new behavior results in a busy-loop, since we go right back to a receive that is guaranteed to fail.  

This strikes me as a case where we need to either remediate the socket directly, or cancel the listener.  What am I missing?

Regards,
Kelly.


On 12.07.2011 14:02, Fock, Frank wrote:
&lt;/pre&gt;</description>
    <dc:creator>Kelly Dyer</dc:creator>
    <dc:date>2013-04-30T21:05:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2225">
    <title>Cannot change the snmp password remotely</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2225</link>
    <description>&lt;pre&gt;Hello,

In order to remotely change the authentication password of a user I do the following steps:


1.       Get the usmUsrSpinLock.0 and save in sValue

2.       I obtain the old key of the user whose password I want to change as follows:
byte[] oldKey = snmp.getUSM().getUser(engineId, new OctetString(user)).getUsmUser().getAuthenticationPassphrase();

3.       Then I generate the new key as follows:

byte[] newKey = SecurityProtocols.getInstance().passwordToKey(AuthMD5.ID, new OctetString(newPassword), engineId.toByteArray());

4.       Then I generate the key change value as follows:

byte[] keyChange = new AuthMD5().changeDelta(oldKey, newKey, random.getBytes());

5.       And finally I do a SET to the usmUserTable:

SET(usmUserSpinLock.0=sValue, usmUserAuthKeyChange=keyChange, usmUserPublic=random)

When I read the usmUserTable MIB table after the SET I can see the random value in the usmUserPublic column, however when I do a request using the new password the agent responds that the password is not correct.

Am I missing something in the password change procedure? I have tried to follow the procedure described in RFC 3414 (KeyChange).

Best regards,
Roger Vilagut Abad

________________________________
Este correo electr?nico y, en su caso, cualquier fichero anexo al mismo, contiene informaci?n de car?cter confidencial exclusivamente dirigida a su destinatario o destinatarios. Si no es vd. el destinatario indicado, queda notificado que la lectura, utilizaci?n, divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la legislaci?n vigente. En el caso de haber recibido este correo electr?nico por error, se ruega notificar inmediatamente esta circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) confidential information that is exclusively addressed to its recipient(s). If you are not the indicated recipient, you are informed that reading, using, disseminating and/or copying it without authorisation is forbidden in accordance with the legislation in effect. If you have received this email by mistake, please immediately notify the sender of the situation by resending it to their email address.
Avoid printing this message if it is not absolutely necessary.
&lt;/pre&gt;</description>
    <dc:creator>Vilagut Abad, Roger</dc:creator>
    <dc:date>2013-04-17T11:58:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2223">
    <title>Sending v1/2c Traps With Authentication</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2223</link>
    <description>&lt;pre&gt;Let's say I have a community user with a name like "public", which is associated with a v3 user security name for compatibility purposes. Does SNMP4j somehow support explicitly sending a trap on behalf of "public", so that trap-receivers with v1/2c authentication can recognize it?

Thanks
       
&lt;/pre&gt;</description>
    <dc:creator>m k</dc:creator>
    <dc:date>2013-04-16T14:40:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2221">
    <title>Intercepting gets and sets from the Network Manager to individual cells in an MOTable</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2221</link>
    <description>&lt;pre&gt;We have been tasked to create an SNMP agent for our application.   Our application can have multiple instances within the same JVM, and we have been able to create an agent using MOTables that shows each instance as a row in a table to the Network Manager.    However we are struggling with how to go about intercepting the 'getValue' or 'setValue' to each cell in this table as we have been able to do quite easily for MOScalar - by simply subclassing it and over-riding the getValue and setValue methods.

We don't see the analogue for the MOScalar getValue/setValue in DefaultMOTable.    So, we tried using VariantVariable for each cell in the table.  However, we have found that the VariantVariable is overwritten when a set is received by the SNMP4J from the NetworkManager.  So, the VariantVariableCallback 'updateVariable' works well, until a 'set' is received from the Network Manager -- after which the VariantVariableCallback stops working because the VariableVariable object appears to have been de-referenced.

What is the best way to implement this scenario such that we can intercept the sets and gets to each cell in the table?

Brad Charan
FPX LLC
Bloomington, MN, USA


This message may contain confidential information, if you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.
&lt;/pre&gt;</description>
    <dc:creator>Charan, Brad</dc:creator>
    <dc:date>2013-04-04T16:32:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2212">
    <title>SET access to created managed objects</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2212</link>
    <description>&lt;pre&gt;Dear colleagues, 

 

I create a very simple scalar in my agent:

 

OID oidTest = new OID("1.3.6.1.3.22.1.5.0");

MOScalar sysScalarTest = new MOScalar(oidTest,
MOAccessImpl.ACCESS_READ_WRITE, new Integer32(15));

server.registerManagedObject(sysScalarTest);

 

and then would like to change its value remotely using the MIB browser. What
I get back on the debug in Eclipse is the "Error 'Authorization error'
generated at: 1.3.6.1.3.22.1.5.0 = 123" preceded by debug information about
the message exchange and status exchange between agent and MIB browser.
Everything seems fine, i.e., "private" community is found, request with the
private scope was created and proper object was found. However, when time to
change came around, no change was done. 

 

===========================================================

 

20353 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping  - Received message from
localhost/127.0.0.1/56019 with length 45:
30:2b:02:01:01:04:07:70:72:69:76:61:74:65:a3:1d:02:04:5a:ad:24:55:02:01:00:0
2:01:00:30:0f:30:0d:06:08:2b:06:01:03:16:01:05:00:02:01:7b

20354 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG org.snmp4j.Snmp  -
Fire process PDU event: CommandResponderEvent[securityModel=2,
securityLevel=1, maxSizeResponsePDU=65535, pduHandle=PduHandle[1521296469],
stateReference=StateReference[msgID=0,pduHandle=PduHandle[1521296469],securi
tyEngineID=null,securityModel=null,securityName=private,securityLevel=1,cont
extEngineID=null,contextName=null,retryMsgIDs=null],
pdu=SET[requestID=1521296469, errorStatus=Success(0), errorIndex=0,
VBS[1.3.6.1.3.22.1.5.0 = 123]], messageProcessingModel=1,
securityName=private, processed=false, peerAddress=127.0.0.1/56019,
transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping&amp;lt; at &amp;gt;36c8e545,
tmStateReference=null]

20354 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Looking up coexistence info for
'private'

20355 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Found coexistence info for
'private'=CoexistenceInfo[securityName=cprivate,contextEngineID=80:00:13:70:
01:c0:a8:01:04,contextName=private,transportTag=]

20356 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Address 127.0.0.1/56019 passes
filter, because source address filtering is disabled

20356 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.agent.request.SnmpRequest  - Created subrequest 0 with scope
org.snmp4j.agent.DefaultMOContextScope[context=private,lowerBound=1.3.6.1.3.
22.1.5.0,lowerIncluded=true,upperBound=1.3.6.1.3.22.1.5.0,upperIncluded=true
] from 1.3.6.1.3.22.1.5.0 = 123

20356 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.agent.request.SnmpRequest  - SnmpSubRequests initialized:
[org.snmp4j.agent.request.SnmpRequest$SnmpSubRequest[scope=org.snmp4j.agent.
DefaultMOContextScope[context=private,lowerBound=1.3.6.1.3.22.1.5.0,lowerInc
luded=true,upperBound=1.3.6.1.3.22.1.5.0,upperIncluded=true],vb=1.3.6.1.3.22
.1.5.0 =
123,status=org.snmp4j.agent.request.RequestStatus&amp;lt; at &amp;gt;6ceac619,query=null,index=
0,targetMO=null]]

20358 [DefaultUDPTransportMapping_127.0.0.1/2001] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping  - Sending message to
127.0.0.1/56019 with length 45:
30:2b:02:01:01:04:07:70:72:69:76:61:74:65:a2:1d:02:04:5a:ad:24:55:02:01:10:0
2:01:01:30:0f:30:0d:06:08:2b:06:01:03:16:01:05:00:02:01:7b

java.lang.Exception: Error 'Authorization error' generated at:
1.3.6.1.3.22.1.5.0 = 123

                at
org.snmp4j.agent.request.SnmpRequest$SnmpSubRequest.requestStatusChanged(Snm
pRequest.java:617)

                at
org.snmp4j.agent.request.RequestStatus.fireRequestStatusChanged(RequestStatu
s.java:89)

                at
org.snmp4j.agent.request.RequestStatus.setErrorStatus(RequestStatus.java:52)

                at
org.snmp4j.agent.CommandProcessor.setAuthorizationError(CommandProcessor.jav
a:499)

                at
org.snmp4j.agent.CommandProcessor.processRequest(CommandProcessor.java:378)

                at
org.snmp4j.agent.CommandProcessor.dispatchCommand(CommandProcessor.java:339)

                at
org.snmp4j.agent.CommandProcessor$Command.run(CommandProcessor.java:559)

                at
org.snmp4j.agent.CommandProcessor.processPdu(CommandProcessor.java:162)

                at
org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:6
64)

                at
org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:
297)

                at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:3
68)

                at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:3
28)

                at
org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(AbstractTra
nsportMapping.java:76)

                at
org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpT
ransportMapping.java:378)

                at java.lang.Thread.run(Unknown Source)

 

===========================================================

 

Definition of the "public" and "private" communities are as follows:

 

                protected void addCommunities(SnmpCommunityMIB communityMIB)


                {

                                Variable[] com2sec1 = new Variable[] 

                                { 

                                                new OctetString("public"),

                                                new OctetString("cpublic"),
// security name

 
getAgent().getContextEngineID(), // local engine ID

                                                new OctetString("public"),
// default context name

                                                new OctetString(), //
transport tag

                                                new
Integer32(StorageType.nonVolatile), // storage type

                                                new
Integer32(RowStatus.active) // row status

                                };

                                

                                Variable[] com2sec2 = new Variable[] 

                                { 

                                                new OctetString("private"),

                                                new OctetString("cprivate"),
// security name

 
getAgent().getContextEngineID(), // local engine ID

                                                new OctetString("private"),
// default context name

                                                new OctetString(), //
transport tag

                                                new
Integer32(StorageType.nonVolatile), // storage type

                                                new
Integer32(RowStatus.active) // row status

                                };                             

                                

                                MOTableRow row2 =
communityMIB.getSnmpCommunityEntry().createRow(new
OctetString("private").toSubIndex(true), com2sec2);

                                MOTableRow row1 =
communityMIB.getSnmpCommunityEntry().createRow(new
OctetString("public").toSubIndex(true), com2sec1);

 
communityMIB.getSnmpCommunityEntry().addRow(row2);

 
communityMIB.getSnmpCommunityEntry().addRow(row1);

                                

                }

 

and

 

                /**

                * Adds initial VACM configuration.

                */

                &amp;lt; at &amp;gt;Override

                protected void addViews(VacmMIB vacm) 

                {

 
vacm.addGroup(SecurityModel.SECURITY_MODEL_SNMPv2c, new
OctetString("cpublic"), new OctetString("v1v2group"),
StorageType.nonVolatile);

 
vacm.addGroup(SecurityModel.SECURITY_MODEL_SNMPv2c, new
OctetString("cprivate"), new OctetString("v1v2group"),
StorageType.nonVolatile);

                                

                                vacm.addAccess(new OctetString("v1v2group"),
new OctetString("public"), SecurityModel.SECURITY_MODEL_ANY,
SecurityLevel.NOAUTH_NOPRIV, MutableVACM.VACM_MATCH_EXACT, new
OctetString("fullReadView"), new OctetString("fullWriteView"), new
OctetString("fullNotifyView"), StorageType.nonVolatile);

                                vacm.addAccess(new OctetString("v1v2group"),
new OctetString("private"), SecurityModel.SECURITY_MODEL_SNMPv2c,
SecurityLevel.NOAUTH_NOPRIV, MutableVACM.VACM_MATCH_EXACT, new
OctetString("fullReadView"), new OctetString("fullWriteView"), new
OctetString("fullNotifyView"), StorageType.nonVolatile);

                                

                                // vacm.addViewTreeFamily(new
OctetString("fullReadView"), new OID("1.3"), new OctetString(),
VacmMIB.vacmViewIncluded, StorageType.nonVolatile);

                                vacm.addViewTreeFamily(new
OctetString("fullWriteView"), new OID("1.3.6.1.3.22.2.10"), new
OctetString(), VacmMIB.vacmViewIncluded, StorageType.nonVolatile);

                }

 

I think all the areas where changes were needed, were added. The only
suspicion that I have is that the default context for all newly created
objects may be set to "public" rather than "private" and I have no clue
right now where to change it and how to do it. 

 

Any suggestions / hints?

 

Thank you in advance

 

Marek
&lt;/pre&gt;</description>
    <dc:creator>Marek Hajduczenia</dc:creator>
    <dc:date>2013-04-02T09:13:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2211">
    <title>SNMPv3 Trap reception where autodiscovery of EID is notpossible</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2211</link>
    <description>&lt;pre&gt;Hi,

In our management environment, some of the agents operate in push only mechanism where they only send out the SNMPv3 traps to management station and will not respond for any of the SNMPGet's.
In this scenario, autodiscovery of EngineID fails hence the management station is doing the following -


1.)     Creating the user with the EID of the agent  (fixed value that is known to the administrator)

new USM(SecurityProtocols.getInstance(),new OctetString(eID), 0);

2.)     Adding this to the MPv3 model in addition to it's local EID that was added during initialization.
Snmp.getMessageDispatcher().addMessageProcessingModel(new MPv3(usm));

Can someone please help clarify if this is the right approach as though the specification recommends usage of a unique EID, to unblock the reception of traps this is being done.

Also, when trying to delete the old EID anytime the user information is modified or deleted, the below code is deleting the MPv3 model altogether. So not using this code leads to only additions of EID's for every single node IP where auto discovery of EID is not possible.
Snmp.getMessageDispatcher().removeMessageProcessingModel(new MPv3(eID.getBytes()));


Kindly clarify the right approach for this use case. Thank you.


Regards
&lt;/pre&gt;</description>
    <dc:creator>Ganesh, Lakshmi Prabha</dc:creator>
    <dc:date>2013-04-02T08:47:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2203">
    <title>Creating public / private v2c communities</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2203</link>
    <description>&lt;pre&gt;Dear colleagues, 

Following the online tutorials and the structure of the BaseAgent.java
class, I am trying to add read and write community definitions into my
project. I am extending the BaseAgent.java class, and I have done the
following changes to the following extensions:

[1] changes in method protected void addCommunities(SnmpCommunityMIB
communityMIB)

              Variable[] com2sec1 = new Variable[] 

              { 

                     new OctetString("public"),

                     new OctetString("cpublic"), // security name

                     getAgent().getContextEngineID(), // local engine ID

                     new OctetString("public"), // default context name

                     new OctetString(), // transport tag

                     new Integer32(StorageType.nonVolatile), // storage type

                     new Integer32(RowStatus.active) // row status

              };

              

              Variable[] com2sec2 = new Variable[] 

              { 

                     new OctetString("private"),

                     new OctetString("cprivate"), // security name

                     getAgent().getContextEngineID(), // local engine ID

                     new OctetString("private"), // default context name

                     new OctetString(), // transport tag

                     new Integer32(StorageType.nonVolatile), // storage type

                     new Integer32(RowStatus.active) // row status

              };            

              

              MOTableRow row2 =
communityMIB.getSnmpCommunityEntry().createRow(new
OctetString("private").toSubIndex(true), com2sec2);

              MOTableRow row1 =
communityMIB.getSnmpCommunityEntry().createRow(new
OctetString("public").toSubIndex(true), com2sec1);

              communityMIB.getSnmpCommunityEntry().addRow(row2);

              communityMIB.getSnmpCommunityEntry().addRow(row1);

if I understand the code correctly, I am adding here information about two
communities, one with the name "public" and another with the name "private"
(names will be changed later on, after testing is done). The respectove
entries ae added into the communityMIB. 

[2] changes in the method protected void addViews(VacmMIB vacm)

       {

              vacm.addGroup(SecurityModel.SECURITY_MODEL_SNMPv2c, new
OctetString("cpublic"), new OctetString("v1v2group"),
StorageType.nonVolatile);

              vacm.addGroup(SecurityModel.SECURITY_MODEL_SNMPv2c, new
OctetString("cprivate"), new OctetString("v1v2group"),
StorageType.nonVolatile);

              

              vacm.addAccess(new OctetString("v1v2group"), new
OctetString("public"), SecurityModel.SECURITY_MODEL_ANY,
SecurityLevel.NOAUTH_NOPRIV, MutableVACM.VACM_MATCH_EXACT, new
OctetString("fullReadView"), new OctetString("fullWriteView"), new
OctetString("fullNotifyView"), StorageType.nonVolatile);

              vacm.addAccess(new OctetString("v1v2group"), new
OctetString("private"), SecurityModel.SECURITY_MODEL_SNMPv2c,
SecurityLevel.NOAUTH_NOPRIV, MutableVACM.VACM_MATCH_EXACT, new
OctetString("fullReadView"), new OctetString("fullWriteView"), new
OctetString("fullNotifyView"), StorageType.nonVolatile);

              

              vacm.addViewTreeFamily(new OctetString("fullReadView"), new
OID("1.3"), new OctetString(), VacmMIB.vacmViewIncluded,
StorageType.nonVolatile);

       }

where I only replicated the entries for public community already in place
before for the private community. I did not replicate the
vacm.addViewTreeFamily entry though, since I cannot really figure out how it
is connected to communities. 

I would appreciate any pointers to what else needs to be done to make sure
that some of the managed objects I am adding in the programe can be actually
set?

Right now, every time I try to set an object at OID 1.3.6.1.3.22.2.10.1
(defined with MOAccessImpl.ACCESS_READ_WRITE), I get the following debug
sequence and the following Euthorization Error. I can clearly see that the
"private" community was found correctly in the definitions, and that the
requests are created correctly, but for some reason the processing stops and
error is thrown out. 

27709 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping  - Received message from
localhost/127.0.0.1/60096 with length 45:
30:2b:02:01:01:04:07:70:72:69:76:61:74:65:a3:1d:02:04:51:b3:d9:86:02:01:00:0
2:01:00:30:0f:30:0d:06:08:2b:06:01:03:16:02:0a:01:02:01:01

27709 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG org.snmp4j.Snmp  -
Fire process PDU event: CommandResponderEvent[securityModel=2,
securityLevel=1, maxSizeResponsePDU=65535, pduHandle=PduHandle[1370741126],
stateReference=StateReference[msgID=0,pduHandle=PduHandle[1370741126],securi
tyEngineID=null,securityModel=null,securityName=private,securityLevel=1,cont
extEngineID=null,contextName=null,retryMsgIDs=null],
pdu=SET[requestID=1370741126, errorStatus=Success(0), errorIndex=0,
VBS[1.3.6.1.3.22.2.10.1 = 1]], messageProcessingModel=1,
securityName=private, processed=false, peerAddress=127.0.0.1/60096,
transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping&amp;lt; at &amp;gt;b50daf,
tmStateReference=null]

27710 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Looking up coexistence info for
'private'

27710 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Found coexistence info for
'private'=CoexistenceInfo[securityName=cprivate,contextEngineID=80:00:13:70:
01:c0:a8:01:04,contextName=private,transportTag=]

27710 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.agent.mo.snmp.SnmpCommunityMIB  - Address 127.0.0.1/60096 passes
filter, because source address filtering is disabled

27710 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.agent.request.SnmpRequest  - Created subrequest 0 with scope
org.snmp4j.agent.DefaultMOContextScope[context=private,lowerBound=1.3.6.1.3.
22.2.10.1,lowerIncluded=true,upperBound=1.3.6.1.3.22.2.10.1,upperIncluded=tr
ue] from 1.3.6.1.3.22.2.10.1 = 1

27710 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.agent.request.SnmpRequest  - SnmpSubRequests initialized:
[org.snmp4j.agent.request.SnmpRequest$SnmpSubRequest[scope=org.snmp4j.agent.
DefaultMOContextScope[context=private,lowerBound=1.3.6.1.3.22.2.10.1,lowerIn
cluded=true,upperBound=1.3.6.1.3.22.2.10.1,upperIncluded=true],vb=1.3.6.1.3.
22.2.10.1 =
1,status=org.snmp4j.agent.request.RequestStatus&amp;lt; at &amp;gt;1e820764,query=null,index=0,
targetMO=null]]

27715 [DefaultUDPTransportMapping_127.0.0.1/2002] DEBUG
org.snmp4j.transport.DefaultUdpTransportMapping  - Sending message to
127.0.0.1/60096 with length 45:
30:2b:02:01:01:04:07:70:72:69:76:61:74:65:a2:1d:02:04:51:b3:d9:86:02:01:10:0
2:01:01:30:0f:30:0d:06:08:2b:06:01:03:16:02:0a:01:02:01:01

java.lang.Exception: Error 'Authorization error' generated at:
1.3.6.1.3.22.2.10.1 = 1

       at
org.snmp4j.agent.request.SnmpRequest$SnmpSubRequest.requestStatusChanged(Snm
pRequest.java:617)

       at
org.snmp4j.agent.request.RequestStatus.fireRequestStatusChanged(RequestStatu
s.java:89)

       at
org.snmp4j.agent.request.RequestStatus.setErrorStatus(RequestStatus.java:52)

       at
org.snmp4j.agent.CommandProcessor.setAuthorizationError(CommandProcessor.jav
a:499)

       at
org.snmp4j.agent.CommandProcessor.processRequest(CommandProcessor.java:378)

       at
org.snmp4j.agent.CommandProcessor.dispatchCommand(CommandProcessor.java:339)

       at
org.snmp4j.agent.CommandProcessor$Command.run(CommandProcessor.java:559)

       at
org.snmp4j.agent.CommandProcessor.processPdu(CommandProcessor.java:162)

       at
org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:6
64)

       at
org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:
297)

       at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:3
68)

       at
org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:3
28)

       at
org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(AbstractTra
nsportMapping.java:76)

       at
org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpT
ransportMapping.java:378)

       at java.lang.Thread.run(Unknown Source)

Thank you in advance

Marek
&lt;/pre&gt;</description>
    <dc:creator>Marek Hajduczenia</dc:creator>
    <dc:date>2013-03-31T09:46:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2200">
    <title>Registering multiple managed objects andorg.snmp4j.agent.DuplicateRegistrationException error</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2200</link>
    <description>&lt;pre&gt;Dear colleagues, 

 

I am continuing the development of my project and now I have a rather simple
task that keeps on generating errors for some reason I do not quite
understand. But let me first describe what I am doing and what the output
is:

 

[1] I create 4 individual OID to be used later on 

 

OID oidLocalHostName = new OID(".1.3.6.1.3.22.1.1"); // nomeServidor 

OID oidRootFolder = new OID(".1.3.6.1.3.22.1.2"); // diretoriaBase 

OID oidDefaultPlayer = new OID(".1.3.6.1.3.22.1.3"); // musicPlayer 

OID oidNumberOfMusicFiles = new OID(".1.3.6.1.3.22.1.4"); //
nTotalmMsicasDisp

 

[2] then I try to register individual new managed objects as follows

 

server.registerManagedObject(MOCreator.createReadOnly(oidLocalHostName,
java.net.InetAddress.getLocalHost().getHostName()));

server.registerManagedObject(MOCreator.createReadOnly(oidDefaultPlayer,
"VLC")); // HERE IS THE LINE WITH ERROR

server.registerManagedObject(MOCreator.createReadOnly(oidRootFolder,
folder.getAbsolutePath()));

server.registerManagedObject(MOCreator.createReadOnly(oidNumberOfMusicFiles,
0));

 

the function registerManagedObject is just a simple wrapper defined as
follows:

 

       public void registerManagedObject(ManagedObject mo) 

       {

              try 

              {

                     server.register(mo, null);

              } 

              catch (DuplicateRegistrationException ex) 

              {

                     throw new RuntimeException(ex);

              }

       }

 

I get however the following error on console:

 

208 [main] INFO org.snmp4j.agent.DefaultMOServer  - Registered MO
org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.3.22.1.1,access=org.snmp4j.agent.mo
.MOAccessImpl&amp;lt; at &amp;gt;3ce3e8f3,value=Marek-HP,volatile=false] in default context
with scope
org.snmp4j.agent.mo.MOScalar[oid=1.3.6.1.3.22.1.1,access=org.snmp4j.agent.mo
.MOAccessImpl&amp;lt; at &amp;gt;3ce3e8f3,value=Marek-HP,volatile=false]

Exception in thread "main" java.lang.RuntimeException:
org.snmp4j.agent.DuplicateRegistrationException:
org.snmp4j.agent.DefaultMOContextScope[context=null,lowerBound=1.3.6.1.3.22.
1,lowerIncluded=true,upperBound=1.3.6.1.3.22.2,upperIncluded=false]

       at
org.snmpagent.snmpAgentServer.registerManagedObject(snmpAgentServer.java:177
)

       at
org.snmpagent.snmpAgentClientMain.main(snmpAgentClientMain.java:160)

Caused by: org.snmp4j.agent.DuplicateRegistrationException:
org.snmp4j.agent.DefaultMOContextScope[context=null,lowerBound=1.3.6.1.3.22.
1,lowerIncluded=true,upperBound=1.3.6.1.3.22.2,upperIncluded=false]

       at
org.snmp4j.agent.DefaultMOServer.register(DefaultMOServer.java:279)

       at
org.snmpagent.snmpAgentServer.registerManagedObject(snmpAgentServer.java:173
)

       ... 1 more

 

With the information that the content was registered at OID of
1.3.6.1.3.22.1.1 (oidLocalHostName) with the default context (null). The
attempt to perform registration for OID of 1.3.6.1.3.22.2 causes the
org.snmp4j.agent.DuplicateRegistrationException for some reason. I looked
through the documentation associated with this error, but cannot still
locate what the problem is. Any hints?

 

Also, is there a better / cleaner way to create a number of OIDs with
specific values? I looked through the examples in the SampleAgent class, but
there is no clear example of how that could be done. 

 

Thanks for any help 

 

Marek
&lt;/pre&gt;</description>
    <dc:creator>Marek Hajduczenia</dc:creator>
    <dc:date>2013-03-30T13:35:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2198">
    <title>HP LaserJet usage-printer-total-charge</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2198</link>
    <description>&lt;pre&gt;I send SNMP reqest to HP LaserJet 3005 with MIB 
"usage-printer-total-charge" (1.3.6.1.4.1.11.2.3.9.4.2.1.1.16.1.2.0) and 
get the following response:
======================
1.3.6.1.4.1.11.2.3.9.4.2.1.1.16.1.2.0 = 47:9b:54:00
======================
Printer WEB interface shows me total count of printed pages = 79528.
Can anybody tell me how 47:9b:54:00 corresponds with 79528 ?
I tried any binary representations, forward and backward. I tried ASCII 
codes. But I cannot find any connection!
&lt;/pre&gt;</description>
    <dc:creator>Константин Лохтин</dc:creator>
    <dc:date>2013-03-30T13:08:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2197">
    <title>SNMP4J 2.2.0 and SNMP4J-SMI 1.0 Released</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2197</link>
    <description>&lt;pre&gt;Hi,

SNMP4J 2.2.0 and SNMP4-SMI 1.0 have been released and are available for
download from http://www.snmp4j.org/html/download.html

The new SNMP4J-SMI provides MIB support for any SNMP4J application
without the need of changing existing code. Adding a few lines of code
is all you need to do. For more details see:
http://www.snmp4j.org/smi/doc/com/snmp4j/smi/package-summary.html

With SNMP4J-SMI, you can compile MIB modules at runtime into your
application and OID values are displayed as object names, SMI variables can
be parsed from their DISPLAY-HINT representation or enumeration value
for example.

SNMP4J 2.2.0 contains several enhancements but also a major bugfix regarding
the processing of SNMPv3 reports. To ensure higher security and 
compatibility
with RFC 3412 and 3414, reports will be sent back to the command generator
with the same security level as the command was received, except for a few
exceptions described in the RFCs.
By configuration the behavior of SNMP4J &amp;lt; 2.2.0 can be restored and also a
strategy can be chosen, that does not accept noAuthNoPriv reports at all
as command generator.
See 
http://www.snmp4j.org/doc/org/snmp4j/SNMP4JSettings.ReportSecurityLevelStrategy.html

SNMP4J 2.2.0 can be used in conjunction of SNMP4J-Agent 2.0.7, 
SNMP4J-AgentX 2.1.0,
and SNMP4J-JMX 2.0.0.

SNMP4J 2.2.0 CHANGES
=====================

* Added: Option in SNMP4Settings to allow parsing Counter64 variables in 
SNMPv1 PDUs
   which is not allowed by SNMPv1 but a common bug in many devices.
* Fixed [SFJ-69]: For the following report PDUs the securityLevel now is 
set to the same as
   in the request (which is in SNMP4J 2.1 and prior not the case):
   RFC3414 §3.2.3 Unkown engine ID.
   RFC3414 §3.2.4 Unknown security name
   RFC3414 §3.2.5 Unsupported security level
   RFC3414 §3.2.6 Wrong digest -&amp;gt; authentication failure
   The prior 2.2 behavior can be reactivated using 
SNMP4JSettings.setReportSecurityLevelStrategy(..).
* Fixed Javadoc title tag.
* Improved: Logging of USM time exceptions.
* Fixed: Race condition in DummyTransport.
* Added: New Constructor in VariableBinding to directly create a VB by 
parsing OID and variable from a string
   in conjunction with SNMP4J-SMI.
* Improved SMI formatting.
* Fixed issue in TreeUtils in conjunction with SNMPv1, the end event was 
not properly called back.
* Updated repository URLs in pom.xml.
* Added: setSecurityModel and setSecurityLevel in Target interface.
* Added: OIDTextFormat usage in OID class.
* Added: contextEngineID support in SnmpURI and DefaultPDUFactory.
* Fixed [SFJ-66]: Fixed lexicographic ordering check in TreeUtils for 
multiple root OIDs.
* Improved: TimeTicks setValue from String and extended PDUFactory by 
GETBULK parameter handling.
* Improved: TLS JavaDoc.
* Added: Default target in SnmpURI.

Frank Fock

&lt;/pre&gt;</description>
    <dc:creator>Frank Fock</dc:creator>
    <dc:date>2013-03-27T22:41:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2193">
    <title>Maven checksum issue with v2.1.0</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2193</link>
    <description>&lt;pre&gt;Hi,

I just tried to use v2.1.0 from Maven and received checksum errors for the JAR file:

[WARNING] Checksum validation failed, expected 10e37bdf61fd8f870d36570c4086352762963f86 but is 60c86ea9e41d4c46d5c035470f4fee89c5f7f20e for http://artifactory/artifactory/libs-release/org/snmp4j/snmp4j/2.1.0/snmp4j-2.1.0.jar
[WARNING] Checksum validation failed, expected 10e37bdf61fd8f870d36570c4086352762963f86 but is 60c86ea9e41d4c46d5c035470f4fee89c5f7f20e for http://artifactory/artifactory/libs-release/org/snmp4j/snmp4j/2.1.0/snmp4j-2.1.0.jar


(Note: this is a WARNING because I've told my Artifactory to ignore checksum errors for https://oosnmp.net/dist/release)

According to an old mailing list entry (http://lists.agentpp.org/pipermail/snmp4j/2012-March/004801.html) this issue was present in v2.0.3 and should be resolved "with the next version". Has anyone else experienced this issue with v2.1.0?


Kind regards,

Duncan Jones CISSP
Advanced Solutions Group Manager

Thales
Jupiter House, Station Road, Cambridge, CB1 2JD
www.thalesgroup.com/iss

Tel: +44 (0)1223 723623. Mob: +44 (0)7766 076631
e-mail: Duncan.Jones-vn+3mORIPc+ju1H+chf1WFaTQe2KTcn/&amp;lt; at &amp;gt;public.gmane.org






Consider the environment before printing this mail.

Thales e-Security Limited is incorporated in England and Wales with company registration number 2518805. Its registered office is located at 2 Dashwood Lang Road, The Bourne Business Park, Addlestone, Nr. Weybridge, Surrey KT15 2NX.

The information contained in this e-mail is confidential. It may also be privileged. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee or the intended addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform us immediately on +44 (0)1223 723600 and delete it and all copies from your system.  Commercial matters detailed or referred to in this e-mail are subject to a written contract signed for and on behalf of Thales e-Security Limited.
&lt;/pre&gt;</description>
    <dc:creator>Duncan Jones</dc:creator>
    <dc:date>2013-03-12T16:07:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2192">
    <title>Question about User Localization (Agent side)</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2192</link>
    <description>&lt;pre&gt;
Hello,

I have a confusion I'd like to clear up about localization. So, if I understand correctly, these should be the results when adding a user according
to different function signatures:

usm.addUser(user.getSecurityName(), usm.getLocalEngineID(), user);  &amp;lt;-- User is localized (password + engine + algorithm = key)

usm.addUser(user.getSecurityName(), null, user) &amp;lt;-- Not localized  ? (password + algorithm = key)

usm.addUser(user.getSecurityName(), user) &amp;lt;-- Not localized ? (password + algorithm = key)


....

However, I'm confused, because I have tried to add the user in all these ways, but I never have to change this command:

"snmpget -v 3 -u MYUSER -l authPriv -a SHA -A MYUSERAuthPassword -x DES -X MYUSERPrivPassword localhost:1161 .1.3.6.1.2.1.1.1.0"

The command ALWAYS works. I would think that I should need to change some parameter or something to indicate that I'm using a localized key or non-localized key, but I don't. 
Is there some logic going on behind the scenes on the manager side or SNMP4j side to make this work somehow? 


Thanks

 
       
&lt;/pre&gt;</description>
    <dc:creator>m k</dc:creator>
    <dc:date>2013-03-12T01:53:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2180">
    <title>Please Help, Notification Filtering (code included)</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2180</link>
    <description>&lt;pre&gt;
Hello,

I'm trying to figure out notification filtering, and only having a bit of success. I managed to set up a notification profile that is checked, but it turns out that no matter what I do,
 ALL notifications are blocked. In this example, I'm trying to ALLOW the coldstart notification to notify--and its not working. I'd really appreciate some help.


Thanks

.....

The following is the code, but this might look mangled on the mailing list, so I'm including a pastebin, too.

http://pastebin.com/ti0efAMv


Code:

/* Works. Creates filter profile */

notificationMIB.getNotifyFilterProfileTable().addRow(
                    notificationMIB.getNotifyFilterProfileTable().createRow(
                        new OctetString("v2c").toSubIndex(true), // true - implied length    
                        new Variable[]{
                            new OctetString("onlyDefault"),
                            new Integer32(StorageType.permanent),
                            new Integer32(RowStatus.active)}));
                            

                            
/* Fails. Matches nothing, blocks everything */                            
notificationMIB.getNotifyFilterTable().addRow(
                    notificationMIB.getNotifyFilterTable().createRow( 
                                                        // false - Not implied length              true - Implied length
                            new OctetString("onlyDefault").toSubIndex(false).append(new OID(new int[]{1,3,6}).toSubIndex(true)), 
                            new Variable[]{
                                new OID(new int[]{1,3,6}), 
                                new OctetString(),
                                new Integer32(1), // Included
                                new Integer32(StorageType.permanent),
                                new Integer32(RowStatus.active)}));
                                
109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl  - Notification 1.3.6.1.6.3.1.1.5.1 reported with [] for context
109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] INFO org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl  - Notification 1.3.6.1.6.3.1.1.5.1 did not pass filter 118.50.99
109 [LexBeanRunInterruptable(LexLocalHostBean):Thread-15] WARN org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl  - Access denied by VACM for 1.3.6.1.6.3.1.1.5.1
       
&lt;/pre&gt;</description>
    <dc:creator>m k</dc:creator>
    <dc:date>2013-03-06T15:20:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2168">
    <title>agent-jmx methods</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2168</link>
    <description>&lt;pre&gt;Hi,

i'm having a method that should add actions to the MIB, and I also add 
the OID's to the ACTION_OIDS array.

here's some code:


Object[][] ret = new Object[mappings.length][3];
   for (int cnt = 0; cnt &amp;lt; mappings.length; cnt++) {
     ret[cnt][0] = mappings[cnt].getOid(dynIndex);
     MBeanStateInfo[] states = new MBeanStateInfo[] {
new MBeanStateInfo(2, null, null) };
     ret[cnt][1] = states;
     MBeanActionInfo[] actions = new MBeanActionInfo[] {
new MBeanActionInfo(
mappings[cnt].getActionDef().getActionId(),
mappings[cnt].getActionDef().getMemberName(),
new Object[0] )
};
     ret[cnt][2] = actions;
   }
   scalarSupportActions.addAll(new ObjectName(name), ret);

consider that the OID is correct (everytime an action is found I print 
the OID) and unique, also the ActionId is different for each action. A 
MOScalar is also registered at the server.

I can call one method (the one method I created long time ago), but none 
of the new methods I just created today.

Can you think of anything why the behaviour is like this? access is 
always read and write, variables are always the same, and the method 
signatures are also the same (except some variation in the method name 
of course, but the mapping is correct).

Thanks for hints, that's really confusing.

BR
david
&lt;/pre&gt;</description>
    <dc:creator>david pocivalnik</dc:creator>
    <dc:date>2013-03-04T15:50:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2166">
    <title>UnknowHost Exception while sending the snmp trap</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2166</link>
    <description>&lt;pre&gt;Hi,

I'm using the following code to create the target address.

Address targetAddress =
GenericAddress.parse("udp:&amp;lt;HostName&amp;gt;:&amp;lt;TrapReceiverPort&amp;gt;/162");

This goes through fine when I use the snmp4j1.0.jar. However, this
particular version seems does not support the IPv6 addresses. For IPv6
requests it throws the java.nio.BufferOverFlowException.
java.nio.BufferOverflowException
    at java.nio.Buffer.nextPutIndex(Unknown Source)
    at java.nio.HeapByteBuffer.put(Unknown Source)
    at org.snmp4j.asn1.BEROutputStream.write(BEROutputStream.java:65)
    at org.snmp4j.asn1.BER.encodeOID(BER.java:437)
    at org.snmp4j.smi.OID.encodeBER(OID.java:205)
    at org.snmp4j.smi.VariableBinding.encodeBER(VariableBinding.java:176)
    at org.snmp4j.PDUv1.encodeBER(PDUv1.java:207)
    at org.snmp4j.mp.MPv1.prepareOutgoingMessage(MPv1.java:108)
    at
org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:376)
    at org.snmp4j.Snmp.sendMessage(Snmp.java:900)
    at org.snmp4j.Snmp.send(Snmp.java:779)
    at org.snmp4j.Snmp.send(Snmp.java:771)

To fix the above issue, I picked up the latest jars snmp4j2.1.0.jar,
snmp4j1.11.3.jar, and snmp4j1.10.jar. All of these throw the unknown host
exception. What I notice is that snm4j sends hostname as
"hostname:trapreceiverport" to underneath java api to resolve the address,
hence the issue unknownhostexception. The same code works with 1.0 version
of jar. Are there any difference from now and then? Any help is very much
appreciated.

Thanks,
Parash
&lt;/pre&gt;</description>
    <dc:creator>Hallur,Parashuram</dc:creator>
    <dc:date>2013-03-04T11:24:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2164">
    <title>agent-jmx - method call with arguments</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2164</link>
    <description>&lt;pre&gt;Hi,

I've defined a method call that doesn't take any arguments successfully. 
Now I defined the following method

void startExport(String s);

and created the MOScalar as the one w/o any arguments

expCall = moFactory.createScalar(oidExpCall, 
moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE), new 
Integer32());

and registered it.

in the *Inst.java class I added the OID to the ACTION_OIDS and created 
the following array:

private static final Object[][] SCALAR_MBEANS_EXP_ACTIONS = {
{ TestManagementMib.oidExpCall,
new MBeanStateInfo[] { new MBeanStateInfo(2, null, null) },
new MBeanActionInfo[] { new MBeanActionInfo(4, "startExport", new 
Object[1]) } } };

I figured the first parameter in the new MBeanActionInfo can't be the 
same as the one used previously (which was 3), thus I increased it. 
Also, I though the integer in the Object[] defines the number of 
arguments that the method takes, thus i set it to one.

finally I added SCALAR_MBEANS_EXP_ACTIONS to scalarSupportActions.

Something must be wrong, as the Agent isn't starting. The following error:
Exception in thread "main" java.lang.ExceptionInInitializerError

when I set the number of arguments to 0 (Object[0]) then the agent 
starts successfully, but i can't pass along any argument, e.g.

$ snmpget someOID s myStringToPass

Thanks for any hints and BR
david
&lt;/pre&gt;</description>
    <dc:creator>david pocivalnik</dc:creator>
    <dc:date>2013-02-28T08:31:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2153">
    <title>Updating registered managed objects (adding rows to MIBtable)</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2153</link>
    <description>&lt;pre&gt;Dear all, 

 

I am writing a small SNMP related project for my course. The task is to
create an SNMP agent that will monitor a local selected folder and list all
files stored in this folder in a MIB. I have already MIB designed, agent
working fine on the initial pass, i.e., it creates a MIB table, populates
initial values (files found at first pass through the folder) and then
registers MIB with the agent. 

 

The code snippet building the table structure is shown below:

 

MOTableBuilder builder = new MOTableBuilder(oidNewRoot);

                                                

// MIB structure

                                

builder.addColumnType(SMIConstants.SYNTAX_INTEGER32,MOAccessImpl.ACCESS_READ
_ONLY);

builder.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_R
EAD_ONLY);

builder.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_O
NLY);             

builder.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_R
EAD_ONLY);                                               

builder.addColumnType(SMIConstants.SYNTAX_INTEGER32,MOAccessImpl.ACCESS_READ
_ONLY);                                        

builder.addColumnType(SMIConstants.SYNTAX_INTEGER32,MOAccessImpl.ACCESS_READ
_ONLY);                                        

builder.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_R
EAD_ONLY);                                               

builder.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_R
EAD_ONLY);                                               

builder.addColumnType(SMIConstants.SYNTAX_INTEGER32,MOAccessImpl.ACCESS_READ
_ONLY);                                        

builder.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_W
RITE);

 

The code snippet adding a row is shown below (it is repeated in a loop to
add all found files):

 

builder.addRowValue(new Integer32(index));

index++;

builder.addRowValue(new OctetString(fileName.getName()));

builder.addRowValue(new Integer32(3));

builder.addRowValue(new OctetString(fileName.getPath()));

builder.addRowValue(new Integer32((int)fileName.length()));

builder.addRowValue(new Integer32(323));

builder.addRowValue(new OctetString("Artista"));

builder.addRowValue(new OctetString("Album"));

builder.addRowValue(new Integer32(1980));

builder.addRowValue(new Integer32(4));

 

Finally, I register the new MIB with the agent:

 

server.registerManagedObject(builder.build());

 

After that, I run agent on a loop, every 5 seconds checking whether a new
file was added to the folder. When that happens, I can detect a new file
added and create list of such files. However, I do not know (could not find
any information) on how to add row to already registered MIB. One thought
was on reusing previously constructed table and just deregister it, then add
new rows as needed and the register again but it seems like a very crude
solution to me. Is there any way to do that better? if so, I would
appreciate any pointers. 

 

Thank you in advance

 

Marek
&lt;/pre&gt;</description>
    <dc:creator>Marek Hajduczenia</dc:creator>
    <dc:date>2013-02-26T16:17:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2152">
    <title>Persistence: Bootcounter file created, Config file is not</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2152</link>
    <description>&lt;pre&gt;
Hello,

I'm having an issue. Starting with neither file existing in my project folder, I run TestAgent.java, perform a set on the sysLocation (successfully), but upon shutting down and restarting the agent, the value is gone. I noticed that the configuration file that (as I understand it) holds the persistence data was never created. The bootcounter file was created, however, so it doesn't seem like a matter of permissions. I did this on a windows box, and what I found really funny is that I tried it at home on my linux box and it worked just fine. I used Netbeans both times. I temporarily ran my IDE as an administrator on linux because it didn't like my binding to a low port, but I also tried to run as admin on the windows box just to be sure--with no success.

I'm wondering if there is anything obvious that I'm missing, or any suggested sanity-check I might do? 
       
&lt;/pre&gt;</description>
    <dc:creator>m k</dc:creator>
    <dc:date>2013-02-26T14:43:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2149">
    <title>AGENT++/SNMP4J Mailing List Available Again</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2149</link>
    <description>&lt;pre&gt;
The AGENT++/SNMP4J mailing lists have been moved successfully to a new 
server
(new IP but same DNS "agentpp.org") and all the lists are online again.

You may now continue to send messages and ask your valuable questions 
and comments!

CHANGES:

* To avoid relaying unwanted email message through the mailman bounce 
processing,
emails from non-members will be discarded instead of rejected.

* The mailman list admin pages are exclusively accessible through HTTPs 
using the oosnmp.net
domain name. Existing links will be automatically redirected, so you do 
not need to update
your bookmarks.

Best regards,
Frank Fock

&lt;/pre&gt;</description>
    <dc:creator>Frank Fock</dc:creator>
    <dc:date>2013-02-24T20:21:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.network.snmp4j.general/2148">
    <title>Mailing List Maintenance</title>
    <link>http://comments.gmane.org/gmane.network.snmp4j.general/2148</link>
    <description>&lt;pre&gt;
The AGENT++/SNMP4J mailing list will be offline from today 12:00 MET
until Monday 25.2.2013 10:00 MET.

You will receive a message from the mailing lists you have subscribed to
when the lists are online again.

Please do not send messages to the lists while the lists are down, because
those messages might get lost during maintenance.

Thank you very much for your cooperation and understanding!

Best regards,
Frank Fock

&lt;/pre&gt;</description>
    <dc:creator>Frank Fock</dc:creator>
    <dc:date>2013-02-22T09:29:15</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.network.snmp4j.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.network.snmp4j.general</link>
  </textinput>
</rdf:RDF>
