lwip-users
[Top][All Lists]
Advanced

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

AW: [lwip-users] LWIP on Gigabit Ethernet MAC (raw api)


From: Daniel Klingler
Subject: AW: [lwip-users] LWIP on Gigabit Ethernet MAC (raw api)
Date: Mon, 18 Sep 2006 14:50:44 +0200

Hi together,

relating to Christiaan's answer we can use the raw api with gigabit Ethernet
in the same way how we used it with fast Ethernet.

If anybody will see still some problems, they will answer here. In the other
case I will try it out.

Thanks for all the commentaries!

Regards,
Daniel Klingler


-----Ursprüngliche Nachricht-----
Von: address@hidden
[mailto:address@hidden Im Auftrag
von Christiaan Simons
Gesendet: Montag, 18. September 2006 14:32
An: address@hidden
Betreff: Re: [lwip-users] LWIP on Gigabit Ethernet MAC (raw api)


Sathya,

> Is it true that Sockets API builds on RAW API?

Yes.

> The Sockets port requires a kernel and hence this port does the same.

True except for "hence", ports generally can (and do)
make this assumption. It would be good practice to make
this clear in the port name.

E.g. the eCos port was clearly designed for a
specific  kernel in mind.  Thus apps using this port
will most likely use the socket API, though
they are not obliged to use the socket API.

Other ports like the c16x or the original 6502 do
not depend on a kernel, but may be used with it
if the user wishes todo so.

> Can you explain how the Sockets API works on RAW ?

Well I'm not an expert on the sockets thing,
but if you have a look at e.g. api_msg.c do_write()
you can clearly see a call to tcp_write() which is in turn
part of the raw-API as documented in doc/rawapi.txt

So a write on a socket eventually ends up as
a raw-API write. This isn't very clear because of
the mailbox stuff, but it actually _is_ using the raw-API.

> Although the functions for packet processing are the same at the
> ethernet level,
> the fact that there are multiple threads that are used to take care
> of packet processing,
> reading packets from ethernet and the tcpip thread which is used for
> communication
> between application and stack makes the working different unless I
> am missing something.

This separation of tasks does not separate the APIs.
The socket layer is just stacked on top of a lot of other things.
(and therefore it is quite inefficient and slow,
mainly because of overused mailboxes)

application (top)

[ sockets-API ]
[ netconn-API ]
[ lwIP core (raw-API) ]
[ netif i/o, driver  ]

network (bottom)

The raw API is just a collection of lwIP core functions.
They are always there, and always available.

>  The RAW API port always has been working based on the call backs
> being set up by the application for various stack events.

True, this is exactly what is needed by some users
that want to run lwIP without a kernel and sockets.

They can leave out the netconn and socket files
from their build.

Bye,

Christiaan Simons

Hardware Designer
Axon Digital Design

http://www.axon.tv




_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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