Hi Nick,

I will answer you next week, I have a minimal telnet server but it is

not exactly what you need, you will have to change it to suit your need.


Please write to my work mail n...@silrd.com and we will continue from there.


BR,

Noam.



From: lwip-users <lwip-users-bounces+noam=silrd....@nongnu.org> on behalf of 
nrichard <nrich...@ipgphotonics.com>
Sent: Friday, March 3, 2017 10:54 PM
To: lwip-users@nongnu.org
Subject: [lwip-users] Telnet - Raw API

Hello everyone!

I'm looking to get a telnet application working using the RAW API for lwip.
My goal is to have a simple console-like menu where each menu option will do
something when selected.  When searching for an example, all I could really
find is the TCP echo server (in the lwip contrib folder), which is
relatively close to what I want.  Rather than echoing, I want it to print a
menu and I'm able to select whichever option I'd like.

I was able to modify it slightly to print my menu to the telnet client over
and over when I type a character, but I'm having trouble trying to read the
input (so I know which menu operation to do).  The input comes in as a
pbuf->payload which is a void*.  At first I wanted to use a switch, but the
payload isn't an integer.  I tried casting it as an integer as well and that
also did not work.  I then tried an if statement using it as a string since
I can print it as a string.  For example, if (payload == "1") and that did
not work either.

So I guess my question is, how could I be able to read the incoming
payload/character so that I could do something with it?  Or is there a
better way of doing this?  Are there better telnet application examples out
there somewhere that achieve what I'm trying to do?

Thanks
-Nick



--
View this message in context: 
http://lwip.100.n7.nabble.com/Telnet-Raw-API-tp28928.html
lwip-users - Telnet - Raw 
API<http://lwip.100.n7.nabble.com/Telnet-Raw-API-tp28928.html>
lwip.100.n7.nabble.com
Telnet - Raw API. Hello everyone! I'm looking to get a telnet application 
working using the RAW API for lwip. My goal is to have a simple console-like 
menu where each menu option will do something...


Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users
lwip-users -- Mailing list for lwIP users - 
lists.nongnu.org<https://lists.nongnu.org/mailman/listinfo/lwip-users>
lists.nongnu.org
Welcome to the lwip-users mailing list. Use it to ask questions, share your 
experience and discuss new ideas. To see the collection of prior postings to 
the list ...


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to