[SNMP4J] how to SET?

Frank Fock fock at agentpp.com
Tue Mar 20 09:41:03 CET 2007


Hi,

You should ask this question on the NET-SNMP mailing list.
This is the SNMP4J mailing list!

Best regards,
Frank

Chandrakant Kumar wrote:
> hi
> 
> I have to use device port in  UCD-snmp version: 4.1.1
> My command is
> 
> snmpget -v 2c -c  respcom  deviceIp .1.3.6.1.2.1.1.3.0
> it is running fine
> 
> system.sysUpTime.0 = Timeticks: (2657837612) 307 days, 14:52:56.12
> 
>  but when i include device port as follows :
> 
> snmpget -v 2c -c  respcom   deviceIp:161  .1.3.6.1.2.1.1.3.0
> its giving the result like this
> snmpget: Unknown host (No such file or directory)
> 
> 
> for higher version, its working fine even I include device port  also.
> 
> 
> for UCD-snmp version: 4.1.1 how to use device port?
> I know that the listening port by default is 161 but i have to use it in UCD-snmp version: 4.1.1 ..
> Please help..
> Thanks & Regards
> Chandrakant Kumar
> 
> -----Original Message-----
> From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org]On
> Behalf Of Frank Fock
> Sent: Monday, March 19, 2007 11:33 PM
> To: Daniel Gyorfi
> Cc: snmp4j at agentpp.org
> Subject: Re: [SNMP4J] how to SET?
> 
> 
> Hi Daniel,
> 
> Have you checked your access rights for write
> access to the agent?
> 
> Best regards,
> Frank
> 
> Daniel Gyorfi wrote:
>> Hi All!
>>
> 
>> I want to send a PDU with SET type.
>> I have a working method, which returns a perfect result for a single
>> GET type and I changed the type and added a value for the single
>> variablebinding:
>>
> 
>>            PDU request = new PDU();
>>            if (set){
>>                request.add(new VariableBinding(new OID(oid), new
>> OctetString(setValue)));
>>                request.setType(PDU.SET);
>>            } else{
>>                request.add(new VariableBinding(new OID(oid)));
>>                request.setType(pduType);
>>            }
>>            ResponseEvent responseEvent = snmp.send(request, target);
>>
> 
>>            PDU response = null;
>>            if (responseEvent != null) {
>>                response = responseEvent.getResponse();
>>            } else response = null;
>>            snmp.close();
>>            return response;
>>
> 
>> I didnt changed anything else, but Im not able to receive valid (not
>> null) response.
>> Do I have to change something also?
>> Am I missing something else?
>>
> 
>> Many thanks,
> 
> --
> 
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
> 
>             -**************Nihilent***************
> 
> " *** All information contained in this communication is confidential, proprietary, privileged and is intended for the addressees only. If you have received this E-mail in error please notify mail administrator by telephone on +91-20-39846100 or E-mail the sender by replying to this message, and then delete this E-mail and other copies of it from your computer system. Any unauthorized dissemination, publication, transfer or use of the contents of this communication, with or without modifications is punishable under the relevant law.
> 
> 
> Nihilent has scanned this mail with current virus checking technologies. However, Nihilent makes no representations or warranties to the effect that this communication is virus-free.
> 
> 
> Nihilent reserves the right to monitor all E-mail communications through  its Corporate Network. *** "
> 
> *************************************************************************-

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list