Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data CtrlAttribute
- data CtrlAttrMcastGroup = CAMG {}
- data CtrlPacket = CtrlPacket {}
- type CTRLPacket = GenlPacket NoData
- ctrlPacketFromGenl :: CTRLPacket -> Maybe CtrlPacket
- data CtrlAttrOpData = CAO {}
- ctrlPackettoGenl :: CtrlPacket -> CTRLPacket
- getFamilyId :: NetlinkSocket -> String -> IO Word16
- getFamilyIdS :: NetlinkSocket -> String -> IO (Maybe Word16)
- getFamilyWithMulticasts :: NetlinkSocket -> String -> IO (Word16, [CtrlAttrMcastGroup])
- getFamilyWithMulticastsS :: NetlinkSocket -> String -> IO (Maybe (Word16, [CtrlAttrMcastGroup]))
- getMulticastGroups :: NetlinkSocket -> Word16 -> IO [CtrlAttrMcastGroup]
- getMulticast :: String -> [CtrlAttrMcastGroup] -> Maybe Word32
- getFamilie :: NetlinkSocket -> String -> IO (Maybe CtrlPacket)
- getFamilies :: NetlinkSocket -> IO [CtrlPacket]
Documentation
data CtrlAttribute Source #
Attributes defined by the control family
data CtrlAttrMcastGroup Source #
Datatype for multicast groups as returned by the control protocol
data CtrlPacket Source #
Typesafe control packet
type CTRLPacket = GenlPacket NoData Source #
typedef for control messages
ctrlPacketFromGenl :: CTRLPacket -> Maybe CtrlPacket Source #
Convert "normal" Packet
s into typesafe CtrlPacket
s
data CtrlAttrOpData Source #
Datatype for AttrOpData as returned by the control protocol
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 CtrlPacket
s for every currently registered GeNetlink family