Search code examples
socketsvxworks

What types of sockets are available in VxWorks?


Vxworks supports standard IP v4 and IP v6 sockets, but sockets are also used for other purposes.
What other types of sockets are available?


Solution

  • The socket types you can use depend on the communication domain you create your socket in. The listed socket types are:

    SOCK_DGRAM      unreliable  not sequenced  possibly duplicated  message
    SOCK_STREAM     reliable      sequenced       non-duplicated    stream
    SOCK_SEQPACKET  reliable      sequenced       non-duplicated    message
    SOCK_RDM        reliable    not sequenced  possibly duplicated  message
    
    SOCK_RAW        protocol/interface dependent, access to internal protocol info
    

    VxWorks also defines the following communication domains:

    AF_INET     IPv4
    AF_INT6     IPv6
    AF_ROUTE    routing
    AF_LOCAL    local Inter-process Communications
    AF_TIPC     Transparent Inter-Process Communications
    AF_MOBILITY Mobile IPv6 
    

    Here is the list of the various sockets supported for the various domains:

    AF_INET     SOCK_DGRAM, SOCK_STREAM, SOCK_RAW
    AF_INT6     SOCK_DGRAM, SOCK_STREAM, SOCK_RAW
    AF_ROUTE    SOCK_RAW
    AF_LOCAL    SOCK_SEQPACKET
    AF_TIPC     SOCK_SEQPACKET, SOCK_RDM, SOCK_DGRAM, SOCK_STREAM
    AF_MOBILITY don't know