Re: getting netsnmp_tdata pointer without request object

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/12/2  <[email protected]>:
> I have to add row to a table from an internal
> function in my daemon (not from SET request).
>
> how can I retrieve pointer to my table (I have the OID),
> previously registered via 'netsnmp_tdata_register' ?
>
> (of course i can save it in global variable, but that
> doesn't look right)


That's the most obvious approach if you're adding
a new row from somewhere within the same module
code.
   If this is being triggered from outside the module,
then I suggest you add a new API routine, that's
essentially a wrapper round the createEntry call,
and provides the missing table pointer.

Dave

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.