gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.IPTosMessage

Description

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 socketReceiveMessage 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 Socket use:

c code

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

Since: 2.88

Synopsis

Exported types

newtype IPTosMessage Source #

Memory-managed wrapper type.

Instances

Instances details
Eq IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

GObject IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

ManagedPtrNewtype IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

TypedObject IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

Methods

glibType :: IO GType #

HasParentTypes IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

HasAttributeList IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

(info ~ ResolveIPTosMessageMethod t IPTosMessage, OverloadedMethod info IPTosMessage p, HasField t IPTosMessage p) => HasField (t :: Symbol) IPTosMessage (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

Methods

getField :: IPTosMessage -> p #

(info ~ ResolveIPTosMessageMethod t IPTosMessage, OverloadedMethodInfo info IPTosMessage) => IsLabel t (MethodProxy info IPTosMessage) Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

(info ~ ResolveIPTosMessageMethod t IPTosMessage, OverloadedMethod info IPTosMessage p) => IsLabel t (IPTosMessage -> p) Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

Methods

fromLabel :: IPTosMessage -> p #

IsGValue (Maybe IPTosMessage) Source #

Convert IPTosMessage to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.IPTosMessage

type AttributeList IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

type ParentTypes IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

type SignalList IPTosMessage Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

class (GObject o, IsDescendantOf IPTosMessage o) => IsIPTosMessage o Source #

Type class for types which can be safely cast to IPTosMessage, for instance with toIPTosMessage.

Instances

Instances details
(GObject o, IsDescendantOf IPTosMessage o) => IsIPTosMessage o Source # 
Instance details

Defined in GI.Gio.Objects.IPTosMessage

toIPTosMessage :: (MonadIO m, IsIPTosMessage o) => o -> m IPTosMessage Source #

Cast to IPTosMessage, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveIPTosMessageMethod (t :: Symbol) o where ... Source #

Equations

ResolveIPTosMessageMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveIPTosMessageMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveIPTosMessageMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveIPTosMessageMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveIPTosMessageMethod "getv" o = ObjectGetvMethodInfo 
ResolveIPTosMessageMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveIPTosMessageMethod "notify" o = ObjectNotifyMethodInfo 
ResolveIPTosMessageMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveIPTosMessageMethod "ref" o = ObjectRefMethodInfo 
ResolveIPTosMessageMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveIPTosMessageMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveIPTosMessageMethod "serialize" o = SocketControlMessageSerializeMethodInfo 
ResolveIPTosMessageMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveIPTosMessageMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveIPTosMessageMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveIPTosMessageMethod "unref" o = ObjectUnrefMethodInfo 
ResolveIPTosMessageMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveIPTosMessageMethod "getData" o = ObjectGetDataMethodInfo 
ResolveIPTosMessageMethod "getDscp" o = IPTosMessageGetDscpMethodInfo 
ResolveIPTosMessageMethod "getEcn" o = IPTosMessageGetEcnMethodInfo 
ResolveIPTosMessageMethod "getLevel" o = SocketControlMessageGetLevelMethodInfo 
ResolveIPTosMessageMethod "getMsgType" o = SocketControlMessageGetMsgTypeMethodInfo 
ResolveIPTosMessageMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveIPTosMessageMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveIPTosMessageMethod "getSize" o = SocketControlMessageGetSizeMethodInfo 
ResolveIPTosMessageMethod "setData" o = ObjectSetDataMethodInfo 
ResolveIPTosMessageMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveIPTosMessageMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveIPTosMessageMethod l o = MethodResolutionFailed l o :: Type 

getDscp

iPTosMessageGetDscp Source #

Arguments

:: (HasCallStack, MonadIO m, IsIPTosMessage a) 
=> a

message: a type-of-service message

-> m Word8

Returns: A DSCP value as described in RFC 2474.

Gets the differentiated services code point stored in message.

Since: 2.88

getEcn

iPTosMessageGetEcn Source #

Arguments

:: (HasCallStack, MonadIO m, IsIPTosMessage a) 
=> a

message: a type-of-service message

-> m EcnCodePoint

Returns: An ECN value as described in RFC 3168.

Gets the Explicit Congestion Notification code point stored in message.

Since: 2.88

new

iPTosMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word8

dscp: the DSCP value of the message

-> EcnCodePoint

ecn: the ECN value of the message

-> m IPTosMessage

Returns: a new type-of-service message

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

Since: 2.88