[AGENT++] error in sending request
Frank Fock
fock at agentpp.com
Wed Oct 6 01:21:59 CEST 2010
Hi,
You need to create a Pdu object and the send BER encoded
content of the PDU.
Best regards,
Frank
On 02.10.2010 12:57, aymen amri wrote:
>
> Hi All
>
> I'm trying to send a test Msg using the send_snmp_request function.
> When I let the code by default running the code that I wrote doesnt apprear so I commented it
>
> Firstly I declared needed variable As follows:
>
> //declarations
> UdpAddress serv_adr;
> SnmpSocket sock_sn = socket(AF_INET, SOCK_STREAM, 0);
> unsigned char *test_buffer_to_send = (unsigned char*)"Test Msg \n";
>
>
> Then I did the call of the function :
>
> //affecting values of the server which has the role of SNMP MANAGER
> serv_adr = UdpAddress("172.16.125.19");
>
> //sending an snmp request to the srever
> send_snmp_request(sock_sn,test_buffer_to_send,10,serv_adr);
>
> but nothing is shown in the server application and what I get in Execution Is :
> the date and time:6040:(1)DEBUG : ++ SNMP++: sending to 172.16.125.19/0:
> the date and time:6040:(3)DEBUG : 54 65 73 20 4D 73 67 20 0A
> the date and time:6040:(1)DEBUG : Error sending packet : No error
>
> Is there any wrong step in my code,and what Shall I do if want to test to send a trap
>
> Thanks
> Best Regards
>
>
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
--
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the AGENTPP
mailing list