We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
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.