Hi
I'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'm getting trouble with my server because of that. I want to make this port more randomly.
Has nobody an idea? I just need to set the initial local port to another value than 1024.
maybe somebody does that has better things to do than looking at this forum every 1/2 hour.
Wasn't 30 min - was 1 and a half month he has waited for the answer.
Alas, I can't help. I don't use the Keil stack.
Sounds like you're gonna have to buy the sources, or go open source...
I got it!
In Net_lib.c I removed the static declaration in "static BSD_INFO bsd_scb[BSD_NUMSOCKS + BSD_SRVSOCKS];"
With this change I could access the LocPort member of the struct and set it to any value I want.
Fortunately I have only one BSD socket, so the index for the array bsd_scb[] is always 0.