<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Set local port for Keil RTX BSD</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30371/set-local-port-for-keil-rtx-bsd</link><description> 
Hi 

 
I&amp;#39;m using the Keil BSD routines with an RTX environment (LPC2478).
Is there a way to set the local port for the sockets? Like in the
routine tcp_connect(...). 

 
The device always starts with port 1024 and I&amp;#39;m getting trouble
with my server</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Set local port for Keil RTX BSD</title><link>https://community.arm.com/thread/116841?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2012 23:43:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed69a188-5d25-4c44-9234-4b11472f6ac0</guid><dc:creator>Peter Bruegger</dc:creator><description>&lt;p&gt;&lt;p&gt;
I got it!&lt;/p&gt;

&lt;p&gt;
In Net_lib.c I removed the static declaration in &amp;quot;static BSD_INFO
bsd_scb[BSD_NUMSOCKS + BSD_SRVSOCKS];&amp;quot;&lt;/p&gt;

&lt;p&gt;
With this change I could access the LocPort member of the struct
and set it to any value I want.&lt;/p&gt;

&lt;p&gt;
Fortunately I have only one BSD socket, so the index for the array
bsd_scb[] is always 0.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set local port for Keil RTX BSD</title><link>https://community.arm.com/thread/60719?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2012 23:42:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:684b8337-388b-4db8-9184-ee45f747d73a</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sounds like you&amp;#39;re gonna have to buy the sources, or go open
source...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set local port for Keil RTX BSD</title><link>https://community.arm.com/thread/106001?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2012 15:29:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:22336c00-2a55-46b9-8086-7a1469d5d769</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Wasn&amp;#39;t 30 min - was 1 and a half month he has waited for the
answer.&lt;/p&gt;

&lt;p&gt;
Alas, I can&amp;#39;t help. I don&amp;#39;t use the Keil stack.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set local port for Keil RTX BSD</title><link>https://community.arm.com/thread/91540?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2012 13:07:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c2d34713-3772-489c-b8fd-44f6cdb7129d</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
maybe somebody does that has better things to do than looking at
this forum every 1/2 hour.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set local port for Keil RTX BSD</title><link>https://community.arm.com/thread/60720?ContentTypeID=1</link><pubDate>Mon, 02 Jul 2012 11:30:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b8650b38-8447-4d6b-a430-3aa510820bf9</guid><dc:creator>Bourgeois Frederic</dc:creator><description>&lt;p&gt;&lt;p&gt;
Has nobody an idea? I just need to set the initial local port to
another value than 1024.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>