Re: oid textual representation

2012-01-31 Thread opium
Thank you Dave, this exactly what i wanted. snprint_objid suited me the best for this purpose, as i was able to assign buffer output to variable. In case others are interested how this is done: static char buf[SPRINT_MAX_LEN]; int res = snprint_objid(buf,sizeof(buf)-1,oid,oid_length); buf[sizeof

netsnmp_subtree_load

2012-01-31 Thread baicaiaichibaicai
hi: I have problem with netsnmp_subtree_load when i learn snmpd code: 1.what's the effect of this function 2. how doese these case work: if (!netsnmp_subtree_find_first(context_name)) { static int inloop = 0; if (!inloop) { oid ccitt[1] = { 0 }; oi

Re: Changing system time with a net-snmp-base application running can freeze the app

2012-01-31 Thread Bart Van Assche
On Tue, Jan 31, 2012 at 4:30 PM, Alban Rochel wrote: > I work on a Linux application which does an extensive use of net-snmp to > monitor and control a bunch of external equipments, all synchronised on > a ptp or ntp clock. The "fun" part is that the clock is not always > available, and that the s

Changing system time with a net-snmp-base application running can freeze the app

2012-01-31 Thread Alban Rochel
Hello all, I work on a Linux application which does an extensive use of net-snmp to monitor and control a bunch of external equipments, all synchronised on a ptp or ntp clock. The "fun" part is that the clock is not always available, and that the system can be completely out of synch at startup

Re: oid textual representation

2012-01-31 Thread Dave Shield
On 31 January 2012 11:28, opium wrote: > Are there any C API functions which would return textual representation of > OID ? $ man mib_api : Output print_objid will take an object identifier (as returned by read_objid, snmp_parse_oid or get_module_node), and prints the

oid textual representation

2012-01-31 Thread opium
Are there any C API functions which would return textual representation of OID ? If there's not, what is the best approach to do this ? in other words this is what i'm trying to acomplish: snmptranslate -OS .1.3.6.1.2.1.2.2.1.6 => IF-MIB::ifPhysAddress --