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
Sent from the lwip-users mailing list archive at Nabble.com.

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

Reply via email to