netlink-1.1.1.0: Netlink communication for Haskell
Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

System.Linux.Netlink.GeNetlink.Control

Description

This module provides utility functions and datatypes for the genetlink control protocol. This has to be used by implementations of netlink families based on genetlink to lookup their current id, since that is determined at runtime.

Synopsis

Documentation

data CtrlAttribute Source #

Attributes defined by the control family

Instances

Instances details
Show CtrlAttribute Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

Methods

showsPrec :: Int -> CtrlAttribute -> ShowS

show :: CtrlAttribute -> String

showList :: [CtrlAttribute] -> ShowS

Eq CtrlAttribute Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

data CtrlAttrMcastGroup Source #

Datatype for multicast groups as returned by the control protocol

Constructors

CAMG 

Fields

Instances

Instances details
Show CtrlAttrMcastGroup Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

Methods

showsPrec :: Int -> CtrlAttrMcastGroup -> ShowS

show :: CtrlAttrMcastGroup -> String

showList :: [CtrlAttrMcastGroup] -> ShowS

Eq CtrlAttrMcastGroup Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

data CtrlPacket Source #

Typesafe control packet

Instances

Instances details
Show CtrlPacket Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

Methods

showsPrec :: Int -> CtrlPacket -> ShowS

show :: CtrlPacket -> String

showList :: [CtrlPacket] -> ShowS

Eq CtrlPacket Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

Methods

(==) :: CtrlPacket -> CtrlPacket -> Bool

(/=) :: CtrlPacket -> CtrlPacket -> Bool

type CTRLPacket = GenlPacket NoData Source #

typedef for control messages

ctrlPacketFromGenl :: CTRLPacket -> Maybe CtrlPacket Source #

Convert "normal" Packets into typesafe CtrlPackets

data CtrlAttrOpData Source #

Datatype for AttrOpData as returned by the control protocol

Constructors

CAO 

Fields

Instances

Instances details
Show CtrlAttrOpData Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

Methods

showsPrec :: Int -> CtrlAttrOpData -> ShowS

show :: CtrlAttrOpData -> String

showList :: [CtrlAttrOpData] -> ShowS

Eq CtrlAttrOpData Source # 
Instance details

Defined in System.Linux.Netlink.GeNetlink.Control

ctrlPackettoGenl :: CtrlPacket -> CTRLPacket Source #

Convert the typesafe CtrPacket into a CTRLPacket so it can be sent

getFamilyId :: NetlinkSocket -> String -> IO Word16 Source #

Get the id for a netlink family by name

getFamilyIdS :: NetlinkSocket -> String -> IO (Maybe Word16) Source #

A safe version of getFamilyId

getFamilyWithMulticasts :: NetlinkSocket -> String -> IO (Word16, [CtrlAttrMcastGroup]) Source #

get the id and multicast groups of a netlink family by name

getFamilyWithMulticastsS :: NetlinkSocket -> String -> IO (Maybe (Word16, [CtrlAttrMcastGroup])) Source #

A safe version of getFamilyWithMulticasts

getMulticastGroups :: NetlinkSocket -> Word16 -> IO [CtrlAttrMcastGroup] Source #

get the mutlicast groups of a netlink family by id

getMulticast :: String -> [CtrlAttrMcastGroup] -> Maybe Word32 Source #

Get id of multicast group by name

getFamilie :: NetlinkSocket -> String -> IO (Maybe CtrlPacket) Source #

Get the CtrlPacket describing a single family

getFamilies :: NetlinkSocket -> IO [CtrlPacket] Source #

Get CtrlPackets for every currently registered GeNetlink family