BSD API tcp echo server port

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

BSD API tcp echo server port

Andrew Lentvorski
Folks,

I took the "unix" port, copied it to a new "unix_bsd_echoserver" port,
stripped out everything except the tcp echo server, changed it to a
single thread for the server (although lwip still has at least one other
thread for the underlying stack), and converted the API to use the
BSD-like API.

Does somebody want to take a look at this?  It ought to be somewhat
useful to other folks trying to get the hang of the BSD-like API.

It's also quite a bit simpler than the mainline "unix" port.

If someone wants to take a look at this (and hopefully incorporate it
into the ports tree), let me know what procedure I should follow.

Thanks,
-a

As a side note: the reason why I changed the server to a single thread
is that I am preparing for an environment where I only get two threads.
  My next step is to look at the underlying code and make sure it is
only using one extra thread beyond the main server.


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: BSD API tcp echo server port

Kieran Mansley
On Wed, 2007-04-11 at 03:16 -0700, Andrew Lentvorski wrote:
> If someone wants to take a look at this (and hopefully incorporate it
> into the ports tree), let me know what procedure I should follow.

Is this something you'd be willing to maintain on an ongoing basis?  I'm
operating a "no code in the ports tree unless it has an active
maintainer" policy at the moment.  I may live to regret this, but hope
to archive anything that doesn't have an active maintainer before the
next release.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: BSD API tcp echo server port

Andrew Lentvorski
Kieran Mansley wrote:
> On Wed, 2007-04-11 at 03:16 -0700, Andrew Lentvorski wrote:
>> If someone wants to take a look at this (and hopefully incorporate it
>> into the ports tree), let me know what procedure I should follow.
>
> Is this something you'd be willing to maintain on an ongoing basis?

Probably not given the current organization of the lwip code.

I've gotten spoiled by scons (build system) and mercurial (distributed
version control system).  They let me maintain "upstreams" of projects
fairly easily so that I can incorporate new patches from the original
code with far less pain.  In addition, I can maintain a mercurial
repository alongside the main lwip code even if you don't want it as an
official part of lwip.  I can't do those things as easily with make and
CVS/SVN.

When I have to work with make and CVS/SVN, it feels ... primitive.

Is there a Wiki or something that I could put a repository or zip/tar
file on?  It seems a shame to just let this fade into the ether since
there are zero BSD examples.

> I'm operating a "no code in the ports tree unless it has an active
> maintainer" policy at the moment.  I may live to regret this, but hope
> to archive anything that doesn't have an active maintainer before the
> next release.

I can understand that.  Time is always the most valuable.

It's disappointing that none of the vendors using lwip have contributed
any documentation back in return.

Even the broken ports are better documentation than nothing.  Rather
than archiving and removing them, what about moving them to a "broken"
subdirectory.

-a


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE : BSD API tcp echo server port

Frédéric BERNON
In reply to this post by Andrew Lentvorski
Kieran, if the sample is only based on BSD or RAW api, I think it can be add in "contrib/apps". I think these samples have to be done in the same skeleton than "chargen" sample. I think that some tools like a "ping" or a "dns client", or the "http server" could be useful to most of developers. Perhaps just have a subdir for raw api samples, and another one for BSD samples? They can also be a reference for tests or performance measures?
 
====================================
Frédéric BERNON
HYMATOM SA
Chef de projet informatique
Microsoft Certified Professional
Tél. : +33 (0)4-67-87-61-10
Fax. : +33 (0)4-67-70-85-44
Email : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Andrew Lentvorski
Envoyé : mercredi 11 avril 2007 23:37
À : Mailing list for lwIP users
Objet : Re: [lwip-users] BSD API tcp echo server port


Kieran Mansley wrote:
> On Wed, 2007-04-11 at 03:16 -0700, Andrew Lentvorski wrote:
>> If someone wants to take a look at this (and hopefully incorporate it
>> into the ports tree), let me know what procedure I should follow.
>
> Is this something you'd be willing to maintain on an ongoing basis?

Probably not given the current organization of the lwip code.

I've gotten spoiled by scons (build system) and mercurial (distributed
version control system).  They let me maintain "upstreams" of projects
fairly easily so that I can incorporate new patches from the original
code with far less pain.  In addition, I can maintain a mercurial
repository alongside the main lwip code even if you don't want it as an
official part of lwip.  I can't do those things as easily with make and
CVS/SVN.

When I have to work with make and CVS/SVN, it feels ... primitive.

Is there a Wiki or something that I could put a repository or zip/tar
file on?  It seems a shame to just let this fade into the ether since
there are zero BSD examples.

> I'm operating a "no code in the ports tree unless it has an active
> maintainer" policy at the moment.  I may live to regret this, but hope
> to archive anything that doesn't have an active maintainer before the
> next release.

I can understand that.  Time is always the most valuable.

It's disappointing that none of the vendors using lwip have contributed
any documentation back in return.

Even the broken ports are better documentation than nothing.  Rather
than archiving and removing them, what about moving them to a "broken"
subdirectory.

-a


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

=?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?= (810 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: BSD API tcp echo server port

Kieran Mansley
In reply to this post by Andrew Lentvorski
On Wed, 2007-04-11 at 14:37 -0700, Andrew Lentvorski wrote:

> Kieran Mansley wrote:
> > On Wed, 2007-04-11 at 03:16 -0700, Andrew Lentvorski wrote:
> >> If someone wants to take a look at this (and hopefully incorporate it
> >> into the ports tree), let me know what procedure I should follow.
> >
> > Is this something you'd be willing to maintain on an ongoing basis?
>
> Probably not given the current organization of the lwip code.
>
> I've gotten spoiled by scons (build system) and mercurial (distributed
> version control system).  They let me maintain "upstreams" of projects
> fairly easily so that I can incorporate new patches from the original
> code with far less pain.  In addition, I can maintain a mercurial
> repository alongside the main lwip code even if you don't want it as an
> official part of lwip.

That would be fine.  Or just having your mercurial patch queue available
relative to an lwIP release would also be fine.  I'm not fussy about
what form things are distributed in, or even if they are in the contrib
ports tree or not (there are a lot of ports that aren't, and I suspect
those are the ones that are maintained) but code that isn't kept up to
date is not much use.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE : BSD API tcp echo server port

JamminJimP
In reply to this post by Frédéric BERNON

Actually, Frederic has suggested something here that I have previously considered recommending... I think it would be much easier for new users to adopt lwIP and much more useful for all of us when adding/maintaining applications if we split the 'contrib' area into separate subsections: 1)Ports (os/platform specific), 2)Apps-raw, and 3)Apps-socket. Thoughts?

And you're right Kieran, outdated contrib modules probably cause more confusion and harm than good in some cases... For example, someone trying to create an Ethernet driver would probably be more likely to find examples of 'old' and invalid interface code in contrib, since they'll be looking for something that supports their MAC/PHY - not the generic (and up-to-date) ethernetif example. Yet, the 'old' code might be just what they need for the actual hardware interface, so I'd hate to just discard it.

Perhaps we could arrange for some 'volunteers' to offer to brush up some of the contrib stuff? If everyone pitched in and at least got the contribs up to the current APIs, things would be much better... I know how time pressure on all of us might make bringing everything up to date a daunting task, but if we divide up the load and only worry about things that no longer conform to the API - it might be doable.


-----Original Message-----
From: lwip-users-bounces+jim.pettinato=[hidden email] [mailto:lwip-users-bounces+jim.pettinato=[hidden email]] On Behalf Of Frédéric BERNON
Sent: Wednesday, April 11, 2007 9:49 PM
To: Mailing list for lwIP users
Subject: RE : [lwip-users] BSD API tcp echo server port


Kieran, if the sample is only based on BSD or RAW api, I think it can be add in "contrib/apps". I think these samples have to be done in the same skeleton than "chargen" sample. I think that some tools like a "ping" or a "dns client", or the "http server" could be useful to most of developers. Perhaps just have a subdir for raw api samples, and another one for BSD samples? They can also be a reference for tests or performance measures?
 
====================================
Frédéric BERNON
HYMATOM SA
Chef de projet informatique
Microsoft Certified Professional
Tél. : +33 (0)4-67-87-61-10
Fax. : +33 (0)4-67-70-85-44
Email : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Andrew Lentvorski Envoyé : mercredi 11 avril 2007 23:37 À : Mailing list for lwIP users Objet : Re: [lwip-users] BSD API tcp echo server port


Kieran Mansley wrote:
> On Wed, 2007-04-11 at 03:16 -0700, Andrew Lentvorski wrote:
>> If someone wants to take a look at this (and hopefully incorporate it
>> into the ports tree), let me know what procedure I should follow.
>
> Is this something you'd be willing to maintain on an ongoing basis?

Probably not given the current organization of the lwip code.

I've gotten spoiled by scons (build system) and mercurial (distributed
version control system).  They let me maintain "upstreams" of projects
fairly easily so that I can incorporate new patches from the original
code with far less pain.  In addition, I can maintain a mercurial
repository alongside the main lwip code even if you don't want it as an
official part of lwip.  I can't do those things as easily with make and
CVS/SVN.

When I have to work with make and CVS/SVN, it feels ... primitive.

Is there a Wiki or something that I could put a repository or zip/tar
file on?  It seems a shame to just let this fade into the ether since
there are zero BSD examples.

> I'm operating a "no code in the ports tree unless it has an active
> maintainer" policy at the moment.  I may live to regret this, but hope
> to archive anything that doesn't have an active maintainer before the
> next release.

I can understand that.  Time is always the most valuable.

It's disappointing that none of the vendors using lwip have contributed
any documentation back in return.

Even the broken ports are better documentation than nothing.  Rather
than archiving and removing them, what about moving them to a "broken"
subdirectory.

-a


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: RE : BSD API tcp echo server port

Kieran Mansley
On Thu, 2007-04-12 at 08:41 -0400, Pettinato, Jim wrote:
> Actually, Frederic has suggested something here that I have previously
> considered recommending... I think it would be much easier for new
> users to adopt lwIP and much more useful for all of us when
> adding/maintaining applications if we split the 'contrib' area into
> separate subsections: 1)Ports (os/platform specific), 2)Apps-raw, and
> 3)Apps-socket. Thoughts?

That sounds like a good layout.

I intend to as a first step create an "old" or "archive" directory in
the top of the contrib module, move everything into that, and then set
up something like you describe.  Maintainers can then move things back
from this old/archive directory into the new directory structure when
they are brought up to the new spec.  This should mean we only have
things in there that are maintained.  I also intend to create a FILES
readme sort of document that will list who is maintaining what, so it is
at least a bit more traceable.

I suspect though that maintainers will be very thin on the ground,
despite it not being a particularly arduous job, and that the vast
majority will stay in the old archive.  Volunteers welcome!

I'd also like to assemble a list of externally distributed ports, as
they would also be of use to others, particularly if they are
maintained.  Any suggestions for this would be welcome too.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users