--===============0684849472==
Content-Type: multipart/alternative;
boundary="----=_Part_115098_6090362.1178723204888"

------=_Part_115098_6090362.1178723204888
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all,
I currently wrote some code to handle the snmp trap from agent, I can
receive the trap pdu, but when I parsed the pdu, the agent's IP address was
always 0.0.0.0, I thought maybe there was something related to configure
files such as snmpd.conf, snmptrapd.conf, but I can't correct it. What is
the reason, and how to solve it. Thanks!
The code is as follow:
struct in_addr *sInAddr = (struct in_addr *)pdu->agent_addr;
char *strIpAddress = inet_ntoa(*sInAddr);
printf("Agent address: %s\n", strIpAddress);


yaoyu

------=_Part_115098_6090362.1178723204888
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all,

   I currently wrote some code to handle the snmp trap from agent, I can receive the trap pdu, but when I parsed the pdu, the agent's IP address was always 0.0.0.0, I thought maybe there was something related to configure files such as
snmpd.conf, snmptrapd.conf, but I can't correct it. What is the reason, and how to solve it. Thanks!

 The code is as follow:

     struct in_addr *sInAddr = (struct in_addr *)pdu->agent_addr;

     char *strIpAddress = inet_ntoa(*sInAddr);

     printf("Agent address: %s\n", strIpAddress);

 

                                                                                              yaoyu


------=_Part_115098_6090362.1178723204888--


--===============0684849472==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--===============0684849472==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============0684849472==--