RE: Problems with async

2014-03-19 Thread Pentasuglia, Corey
Thanks for the response Niels! I was actually missing that entire loop as I 
thought it wasn't necessary for my case. I added in the loop as shown in the 
async example and now everything works! Would you happen to know the best way 
to get the value of the response?

Right now I am using print_variable to see the results.

Ex.
Say I get the system description:
SNMPv2-MIB::sysDescr.0 = STRING: Linux system.name kernel#...so on
How can I just retrieve what comes have STRING: and store it off in I a string?


Thanks!
Corey

-Original Message-
From: Niels Baggesen [mailto:n...@users.sourceforge.net]
Sent: Tuesday, March 18, 2014 5:40 PM
To: Pentasuglia, Corey; net-snmp-coders@lists.sourceforge.net
Subject: Re: Problems with async

Den 17-03-2014 12:54, Pentasuglia, Corey skrev:
 Is there anything I'm missing here? This app is in c++, so the
 callback is the only method that is declared with extern C. If this
 is incorrect please let me know. I am not setting the void*, because I
 don't need to send any data to the callback. As a starting point I
 have a debug point on the callback method that doesn't get hit. The
 snmp_async_send does not show any errors being sent.

What is there looks OK, but I am missing the select loop that detects that 
responses have been received and calls snmp_read to handle them?

Have you checked with tcpdump/wireshark that the packets are flowing?

/Niels

--
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming
This message is intended only for the addressee and may contain information 
that is company confidential or privileged. Any technical data in this message 
may be exported only in accordance with the U.S. International Traffic in Arms 
Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 
CFR Parts 730-774). Unauthorized use is strictly prohibited and may be 
unlawful. If you are not the intended recipient, or the person responsible for 
delivering to the intended recipient, you should not read, copy, disclose or 
otherwise use this message. If you have received this email in error, please 
delete it, and advise the sender immediately.

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Problems with async

2014-03-19 Thread Niels Baggesen
Den 19-03-2014 20:27, Pentasuglia, Corey skrev:
 Say I get the system description:
 SNMPv2-MIB::sysDescr.0 = STRING: Linux system.name kernel#...so on
 How can I just retrieve what comes have STRING: and store it off in I a 
 string?

if (vars-type == ASN_OCTET_STR) {
char *str = malloc(vars-val_len+1);
memcpy(str, vars-val.string, vars-val_len);
str[vars-val_len] = '\0';
...

/Niels

-- 
Niels Baggesen - @home - Århus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Help Please

2014-03-19 Thread Srinivasa Rao Katta
Hi  SNMP Folks,
 
Good Evening.
 
This is Srinivas from Washington,DC.
 
I have a ldom Solaris server and it has following interface on it and snmpwalk 
was giving interface was down information.But interface was UP and working good.
 
Here is the interface information;
 
--
# ifconfig -a
lo0: flags=2001000849UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL mtu 8232 
index 1
inet 127.0.0.1 netmask ff00
vnet0: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4 mtu 1500 index 2
inet 192.168.60.180 netmask fc00 broadcast 192.168.63.255
ether 0:14:4f:fa:de:3
#
 
 # /usr/local/bin/snmpwalk -v 3 -u user-id -l authPriv -a SHA -A password -x 
AES128 -X password localhost .1.3.6.1.2.1.2.2.1.2.2
IF-MIB::ifDescr.2 = STRING: vnet0
 
 
# /usr/local/bin/snmpwalk -v 3 -u user-id -l authPriv -a SHA -A password -x 
AES128 -X password localhost .1.3.6.1.2.1.2.2.1.8.2
IF-MIB::ifOperStatus.2 = INTEGER: down(2)
 #
---
 
Do I need update any net-snmp source file or files and re-compile net-snmp 
5.7.2?
 
I downloaded net-snmp 5.7.2 and Compiled on Solaris sparc and x86 servers and 
everything is working fine for interfaces on all the servers except for nic 
interface vnet0 on Solaris sparc LDOM server.
 
Please advise me.
 
Thanks,
Srinivas









Srinivasa Rao Katta(System Administrator),

skatt...@hotmail.com,

 


  --
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders