obtaining ip address

th exterit <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi there.

Does net-snmp provide a way to grab the IP address from whoever sent a
trap?  Basically, in snmptrapd.c, you have the main
'while(netsnmp_running)' loop and inside that 'snmp_read()' is called which
hands a pdu to a callback function.  I want to get the ip address of the
system that sent the trap.  The callback function has access to a
netsnmp_session variable and I thought 'session->peername' was what I wanted
but it doesn't look like it.
Or am I going to have to loop the readfs set, calling FD_ISSET(), after
select() returns and get it that way somehow?  I don't know if that is
doable since there are no' struct sockaddr_in's floating about anywhere to
give to inet_ntop().

Thanks.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb

_______________________________________________
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.