|
From: | Mathias Zenger |
Subject: | AW: Re: [lwip-users] memory leak when sending snmp trap |
Date: | Thu, 11 Jun 2009 16:10:17 +0200 |
If the SNMP code really uses the raw API (not sure about) then
it won't work with your blocking FreeRTOS task. lwIP wiki (http://lwip.wikia.com/wiki/Raw/native_API)
says:
"When running in a multithreaded environment, raw API functions may only be called from the core thread (aka. the tcpip-thread) since raw API functions are not protected from concurrent access (aside from pbuf- and memory management functions). " "Raw API applications may never block since all packet processing (input and output) as well as timer processing (TCP mainly) is done in a single execution context." You should either use the netconn or the socket API (further description at wiki). No idea if any SNMP library exists which uses one of these APIs. However, it's perhaps not too hard to write your own SNMP functions. Usually SNMP uses UDP for transport. To send/receive UDP datagrams with the socket API is easy.
|
[Prev in Thread] | Current Thread | [Next in Thread] |