### Class

# Gio IPTosMessage

since: 2.88

#### Description [src]

    final class Gio.IPTosMessage : Gio.SocketControlMessage
    {
      /* No available fields */
    }

Contains the type of service (ToS) byte of an IPv4 header.

This consists of the DSCP field as per RFC 2474, and the ECN field as per RFC 3168.

It may be received using `g_socket_receive_message()` over UDP sockets (i.e. sockets in the `G_SOCKET_FAMILY_IPV4` family with `G_SOCKET_TYPE_DATAGRAM` type). The message is not meant for sending. To set ToS field to be used in datagrams sent on a `GSocket` use:

    g_socket_set_option (socket, IPPROTO_IP, IP_TOS, <ToS value>, &error);

Available since: 2.88

#### Hierarchy

#### Ancestors

- GSocketControlMessage
- GObject

#### Constructors

###### g_ip_tos_message_new

Creates a new type-of-service message with given DSCP and ECN values.

since: 2.88

#### Instance methods

###### g_ip_tos_message_get_dscp

Gets the differentiated services code point stored in `message`.

since: 2.88

###### g_ip_tos_message_get_ecn

Gets the Explicit Congestion Notification code point stored in `message`.

since: 2.88

##### Methods inherited from GSocketControlMessage (4)

###### g_socket_control_message_get_level

Returns the “level” (i.e. the originating protocol) of the control message. This is often SOL_SOCKET.

since: 2.22

###### g_socket_control_message_get_msg_type

Returns the protocol specific type of the control message. For instance, for UNIX fd passing this would be SCM_RIGHTS.

since: 2.22

###### g_socket_control_message_get_size

Returns the space required for the control message, not including headers or alignment.

since: 2.22

###### g_socket_control_message_serialize

Converts the data in the message to bytes placed in the message.

since: 2.22

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GioIPTosMessageClass {
      GSocketControlMessageClass parent_class;

    }

No description available.

###### Class members

`parent_class: GSocketControlMessageClass`

  No description available.