1.43 <GIPTosMessage>

Class: <GIPTosMessage>

It derives from <GSocketControlMessage>.

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 Gio.Socket.receive_message over UDP sockets (i.e. sockets in the ipv4 family with 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);

Procedures

Method: iptos-message:get-dscp self ⇒ %return
Method: get-dscp self ⇒ %return

Gets the differentiated services code point stored in self.

self

Passed: a <GIPTosMessage>.

a type-of-service message

%return

Returned: an unsigned 8-bit integer.

A DSCP value as described in RFC 2474.

Method: iptos-message:get-ecn self ⇒ %return
Method: get-ecn self ⇒ %return

Gets the Explicit Congestion Notification code point stored in self.

self

Passed: a <GIPTosMessage>.

a type-of-service message

%return

Returned: a <GEcnCodePoint>.

An ECN value as described in RFC 3168.

Procedure: iptos-message:new dscp ecn ⇒ %return

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

dscp

Passed: an unsigned 8-bit integer, or a character.

the DSCP value of the message

ecn

Passed: a <GEcnCodePoint>, or one of its symbols.

the ECN value of the message

%return

Returned: a <GSocketControlMessage>.

a new type-of-service message