RE: EXTERNAL: How to initialize a struct netsnmp_transport_s?

"Roedersheimer, Drew A. via Net-snmp-coders" <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
Ed Fair <quackspasm@....>
writes:

> I'm trying to understand the extended session API, as documented in snmp_api.h.  These
> three functions require an netsnmp_transport_s*.   How can I initialize this structure?


You can get the transport from your session handle using snmp_sess_transport().  For
example (untested and no error checking):

struct snmp_session session_str;
void *sess_hdl = NULL;
netsnmp_transport *transport;


snmp_sess_init(&session_str);
sess_hdl = snmp_sess_open(&session_str);

transport = snmp_sess_transport(sess_hdl);



-Drew



_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
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.