Control info for setting the Type of Service (IPv4) or Traffic Class (IPv6) header field on outgoing IPv4/IPv6 packets sent from an UDP socket. This is an 8-bit field, the lowest 6 bits are the DSCP (DiffServ Code Point) and the highest 2 bits are the ECN (Explicit Congestion Notification). To set the option, send a message to the UDP module with kind=UDP_C_SETOPTION and an and instance of this control info class attached.
See also: UDPCommandCode
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Name | Type | Description |
---|---|---|
UDPSetOptionCommand | class |
Base class for UDP socket option control info classes. |
Name | Type | Description |
---|---|---|
tos | char |
ToS byte for IPv4/IPv6 |
sockId | int |
must uniquely identify the socket in the UDP module |
// // Control info for setting the Type of Service (IPv4) or Traffic Class (IPv6) // header field on outgoing IPv4/IPv6 packets sent from an UDP socket. // This is an 8-bit field, the lowest 6 bits are the DSCP (DiffServ Code Point) // and the highest 2 bits are the ECN (Explicit Congestion Notification). // To set the option, send a message to the ~UDP module with kind=UDP_C_SETOPTION // and an and instance of this control info class attached. // // @see ~UDPCommandCode // class UDPSetTypeOfServiceCommand extends UDPSetOptionCommand { char tos; // ToS byte for IPv4/IPv6 }