Hi,
I had written an SNMP Subagent to handle GET/SET request for resyncVar object.
In the SNMP Subagent, I have registered a handler (mentioned below) using
netsnmp_register_scalar function for the MIB object resyncVar to handle the
GET/SET requests.
Handler for handling GET/SET request from a server:
int do_resyncVar(netsnmp_mib_handler *ptr_handler,
netsnmp_handler_registration *ptr_reginfo,
netsnmp_agent_request_info *ptr_reqinfo,
netsnmp_request_info *ptr_requests)
Now whenever a SET request comes from a server, handler function get called,
which in turn calls a Perl script which initiates resynchronization for the
server requesting resynchronization.
Now, to start Resynchronization we need to extract the IP address of the server
requesting Resynchronization from the SET request received. I tried some of the
below functions of NET-SNMP API to fetch the IP address, but none of them are
working as expected.
1) ptr_addr_string = ptr_transport->f_fmtaddr(ptr_transport,
ptr_reqinfo->asp->pdu->transport_data,
ptr_reqinfo->asp->pdu->transport_data_length
);
{ to retrieve the transport information
netsnmp_transport *ptr_transport = NULL; }
2) static char * netsnmp_udp_fmtaddr(netsnmp_transport *t, void *data, int len)
3) static int netsnmp_udp_recv(netsnmp_transport *t, void *buf, int size,
void **opaque, int *olength)
I am not been able to fetch IP address of the EMS requesting resynchronization
through SET request. Please help me in this respect.
The NET-SNMP API version I am using is 5.4.2.
Thanks in advance!!
Regards,
Sonia
===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders