# Multiple applications on µIP FreeRTOS

**URL:** <https://forums.freertos.org/t/multiple-applications-on-ip-freertos/1577>\
**Category:** Kernel\
**Created:** [November 1, 2006, 12:54pm UTC](https://forums.freertos.org/t/multiple-applications-on-ip-freertos/1577 "2006-11-01T12:54:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 1, 2006, 12:54pm UTC](https://forums.freertos.org/t/multiple-applications-on-ip-freertos/1577/1 "2006-11-01T12:54:38Z")

</div>

**nobody** wrote on [Wednesday, November 01, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4a4a11a9/#5ac2):

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)  
{  
&nbsp;&nbsp; if(port == 80)  
&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http\_app();  
&nbsp;&nbsp; }

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

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

Thank you

/Johnny

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 1, 2006, 1:07pm UTC](https://forums.freertos.org/t/multiple-applications-on-ip-freertos/1577/2 "2006-11-01T13:07:42Z")

</div>

**nobody** wrote on [Wednesday, November 01, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4a4a11a9/#5ac2/4036):

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

it can be done by evaluating HTONS(uip\_conn-\>lport)

/Johnny
