Multiple applications on µIP FreeRTOS

nobody wrote on Wednesday, November 01, 2006:

Hi, is it possible to run both Telnet and a webserver on a µIP stack?

In theory all you have to do is create somthing like this

#define UIP_APPCALL switch_function

switch_function(void)
{
   if(port == 80)
   {
      http_app();
   }

   if(port == 23)
   {
      telnetd();
   }
}

Is there anyway to evaluate which port on the current connection?, and is it truely enough?

Thank you

/Johnny

nobody wrote on Wednesday, November 01, 2006:

Sorry, my bad…i missed it in the manual.

it can be done by evaluating HTONS(uip_conn->lport)

/Johnny