www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


setsockopt_bsd

Set socket option.

int far setsockopt_bsd ( int sd,
                         int protocol_level,
                         int optionName,
                         const char far * optionValue,
                         int optionLength ) ;

Parameters

sd

Socket descriptor

protocol_level

One of following constants:
    IP_PROTOIP_LEVEL
    IP_PROTOTCP_LEVEL
    SOCKET_LEVEL

optionName

Option's name constant.

optionValue

Pointer to socket option's desired value.

optionLength

Size of option data, in bytes.

Return Value

0 on success
-1: Failure, error code is available using get_socketerror.

Comments

This API function makes it possible to manipulate options associated with a socket.

Note that the socket options of an incoming connection (using accept or accept_bsd) will be the same as the socket options of the listening socket.

If the compilation switch

     #define BSD44_SOCKET_API_STYLE

is set as a global define in the user application prior to including the Beck C-library header files, the setsockopt() call can be used in BSD 4.4 compatible style with the parameters specified above.   Using this switch the CLIB TCPIP_Socket.H redefines setsockopt() to setsockopt_bsd() .

See Also

RTOS API

On the first call, this library function invokes a software interrupt which modifies the code at the calling site inside your application program.   A direct FAR JMP into the @CHIP-RTOS-x86 implementation for this function is installed so that on return and on any subsequent calls to this API this dynamic link reaches the function's implementation directly.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.36V1.36

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.20

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document