www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - TCP/IP API


Set_IP_Type_Of_Service

Set socket's default Type-Of-Service put into the IP datagram header's TOS field.

int Set_IP_Type_Of_Service ( int sd, unsigned char tos,
                             int *error );

Parameters

sd

Socket descriptor.

tos

Type-Of-Service for IP datagrams

error

Output parameter:  Failure code, 0 on success.

Return Value

0 = success
Non-zero = Failure (see error output parameter)

Comments

Bits in the IP Type-Of-Service field of a IP datagram:
    Bits 0-2: Datagram precedence, 7 is the highest.
    Bits 3-5: type of transport, see TCP/IP documentation e.g.
            Internet networking with TCP/IP by Douglas E.Comer
    Bits 6-7: unused

Note:   Many routers ignore this IP datagram header field.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.


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


End of document