This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SOCKADDR not found

I cannot find the SOCKADDR or SOCKADDR_IN structure used in many functions such as bind http://www.keil.com/support/man/docs/rlarm/rlarm_bind.htm
or
recvfrom http://www.keil.com/support/man/docs/rlarm/rlarm_recvfrom.htm

I have included <RTL.h> header file in which there is no trace of SOCKADDR at all. Please Help!!!

Parents Reply Children
  • The basic TCP functions of RL and the method you communicate through them are somewhat different to the way you'd do it on something like linux.

    As I mentioned before, you might want to check out the BSD socket functions. This relatively new collection of functions have far greater similarity to Linux.

  • The problem was that I was installing MDK 4.23 and then the rl-arm library v 4.12 , so the RTL.h was being replaced with an older version; I didn't know that in the MDK 4.23 the library came integrated, now I know. Thanks to you.
    After seeing the BSD example projects, I have a question : does BSD implementation compulsorily require a RTOS (as in the example they have included rtx.h and used functions prototyped in it)? As far as I know implementation of BSD on linux distributions,say Ubuntu requires an OS but otherwise for using BSD on embedded platforms, we wont require an OS (hope I'm correct.)

  • Err... Linux is an OS - surely?!

    For RL-ARM, look at the feature list: http://www.keil.com/rl-arm/rl-tcpnet.asp

  • @Andrew : sorry didn't get you. Probably you are saying that linux is not an OS but a "kernel".

    My question really is that can I use BSD functions without system call functions like os_tsk_create_user () (which is used in the BSD examples for task switching) or os_tsk_create() (which is used in the BSD example to create a timer_task); can't I just use the BSD functions in my main() function without any sort of task switching ?

  • "can't I just use the BSD functions in my main() function without any sort of task switching ?"

    Not seen anything to say that the RTX is required with the BSD functions. A look at the header files suggests that TCP and/or UDP support must also be included (which would make sense).

  • Yes, BSD functions can be used without RTX in non-blocking mode.