This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/66AK2H12: Is INADDR_LOOPBACK supported?

Part Number: 66AK2H12
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

CCSv9, NDK 3.61, SYSBIOS 6.76, GNU 7.2

I'd like to use BSD style pipes but they do not seem to be supported. In lieu of that I'm like to create a pair of sockets and connect them by binding and listening on one and connecting with the other. So I's like to use sin.sin_addr.s_addr = INADDR_LOOPBACK. But I can't find INADDR_LOOPBACK.

Is the loop back interface supported?

Mike

  • Hi,

    I found from inc\usertype.h is:

    /*----------------------------------------------------------------------- */
    /* IP Address Related Equates */
    #define IN_CLASSA(x) (((uint32_t)(x) & 0x00000080) == 0)
    #define IN_CLASSB(x) (((uint32_t)(x) & 0x000000c0) == 0x00000080)
    #define IN_CLASSC(x) (((uint32_t)(x) & 0x000000e0) == 0x000000c0)
    #define IN_CLASSD(x) (((uint32_t)(x) & 0x000000f0) == 0x000000e0)
    #define IN_MULTICAST(x) IN_CLASSD(x)
    #define IN_EXPERIMENTAL(x) (((uint32_t)(x) & 0x000000f0) == 0x000000f0)
    #define IN_LOOPBACK(x) (((uint32_t)(x) & 0x000000ff) == 0x0000007f)
    #define INADDR_ANY 0x00000000 /* 0.0.0.0 */
    #define INADDR_BROADCAST 0xffffffff /* 255.255.255.255 */

    Regards, Eric