Forum Discussion
Altera_Forum
Honored Contributor
16 years agoThank you for your reply.regarding to second question: it works exactly as you have described.
--- Quote Start --- You're welcome (for the example). You catch the packets you want by specifying the callback. For example, if you call tcp_recv you will be called back with data as it arrives from the connection on the pcb. There is also udp_recv and raw_recv if you want those callbacks. raw has to be enabled with a# define and only it will allow seeing all packets. I've never had reason to use this. --- Quote End --- Regarding to the first question: As i understand, i must to specify the callback function. At which stage do i must to do it? In your code(example),as i uns=derstand, i must to insert reading function where i put stars.Is it correct? // Process lwIP timer dependent code if(lwipProcessTimerFlag) lwipProcessTimers(); // Poll lwIP for incoming packets. ethernetif_input(&alteraTseNetif); *************************** Where i puted the stars, do i must to specify the callback function?