TOS Defines#

Macros to configure the Type of Service (TOS) values.

These macros are used to define and manipulate the precedence field in the TOS byte, which indicates the priority and type of data for network packets.

Macros#

#define
IPTOS_PREC_MASK 0xE0

Mask to extract the precedence field from the TOS byte.

#define
IPTOS_PREC (tos)

Extract the precedence field from the TOS byte.

#define
IPTOS_PREC_NETCONTROL 0xe0

Indicates that the packet is designated for network control purposes, such as voice communications.

#define
IPTOS_PREC_INTERNETCONTROL 0xc0

Indicates that the packet is intended for internet control purposes, such as voice communications.

#define
IPTOS_PREC_CRITIC_ECP 0xa0

Indicates that the packet is for critical applications like video communications.

#define
IPTOS_PREC_FLASHOVERRIDE 0x80

Indicates that the packet should override other traffic, used for urgent applications such as time-sensitive video streaming.

#define
IPTOS_PREC_FLASH 0x60

Indicates that the packet is of high priority, used for important but non-urgent background data.

#define
IPTOS_PREC_IMMEDIATE 0x40

Indicates that the packet should be delivered as soon as possible, suitable for background tasks.

#define
IPTOS_PREC_PRIORITY 0x20

Indicates that the packet has a higher priority than routine data but is less urgent than immediate delivery.

#define
IPTOS_PREC_ROUTINE 0x00

Indicates that the packet is of routine and has the lowest priority, suitable for best-effort data.