lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: [lwip-users] lwip UDP. ( newbie questions )


From: address@hidden
Subject: re: [lwip-users] lwip UDP. ( newbie questions )
Date: Tue, 17 Nov 2009 10:46:43 +0100

SergeV wrote:
> Could somebody show me a trivial working sample code for
> UDP-only lwip driver (raw api, raw machine: no OS).
Which CPU and network controller are you using?
Unfortunately a driver is tightly related to the hardware on
your board, so you probably will need to write one on your
own. But first ask your network controller or SoC
manufacturer, they might provide some code.

You might find some examples in the lwip CVS repository,
contrib section:
http://cvs.savannah.gnu.org/viewvc/contrib/ports/?root=lwip
Look also in the "old" directory: many drivers have been
moved there.

>  For
> example I'm a bit confused about netif_add() use:
> - netif_add() method has an argument "input"
> - I guessed I sould put there pointer to my implementation
of
> ethernetif_input()
No, if you want to use Ethernet (which is very likely) you
have to pass ethernet_input() (etharp.c). Note the slightly
different spelling of function names.

ethernetif_input() is not a real function, just a part of a
skeleton driver. It does not even have to have that name, as
lwip does never call that function: it's that function tha
calls lwip indeed!

Luca





reply via email to

[Prev in Thread] Current Thread [Next in Thread]