Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
This module provides wrappers for functionality provided by the netlink route family
- data Packet a
- type RoutePacket = Packet Message
- getRoutePackets :: ByteString -> Either String [RoutePacket]
- data Message
- = NLinkMsg {
- interfaceType :: LinkType
- interfaceIndex :: Word32
- interfaceFlags :: Word32
- | NAddrMsg {
- addrFamily :: AddressFamily
- addrMaskLength :: Word8
- addrFlags :: Word8
- addrScope :: Word8
- addrInterfaceIndex :: Word32
- | NNeighMsg {
- neighFamily :: Word8
- neighIfindex :: Int32
- neighState :: Word16
- neighFlags :: Word8
- neighType :: Word8
- = NLinkMsg {
- getLinkAddress :: AttributeReader LinkAddress
- getLinkBroadcast :: AttributeReader LinkAddress
- getLinkName :: AttributeReader String
- getLinkMTU :: AttributeReader Word32
- getLinkQDisc :: AttributeReader String
- getLinkTXQLen :: AttributeReader Word32
- getIFAddr :: AttributeReader ByteString
- getLLAddr :: AttributeReader LinkAddress
- getDstAddr :: AttributeReader ByteString
- putLinkAddress :: AttributeWriter LinkAddress
- putLinkBroadcast :: AttributeWriter LinkAddress
- putLinkName :: AttributeWriter String
- putLinkMTU :: AttributeWriter Word32
- putLinkQDisc :: AttributeWriter String
- putLinkTXQLen :: AttributeWriter Word32
Documentation
The generic netlink message type
type RoutePacket = Packet Message Source #
Typedef for route messages
getRoutePackets :: ByteString -> Either String [RoutePacket] Source #
Get
a route message or an error
The static data for route messages
NLinkMsg | |
| |
NAddrMsg | |
| |
NNeighMsg | |
|
getLinkAddress :: AttributeReader LinkAddress Source #
get L2 address from netlink attributes
getLinkBroadcast :: AttributeReader LinkAddress Source #
get L2 broadcast address from netlink attributes
getLinkName :: AttributeReader String Source #
get interface name from netlink attributes
getLinkMTU :: AttributeReader Word32 Source #
get mtu from netlink attributes
getLinkQDisc :: AttributeReader String Source #
I actually have no idea what QDisc is
getLinkTXQLen :: AttributeReader Word32 Source #
I should look this up
getIFAddr :: AttributeReader ByteString Source #
get interface address from netlink attributes of NAddrMsg
getLLAddr :: AttributeReader LinkAddress Source #
get L2 address from netlink attributes of NNeighMsg
getDstAddr :: AttributeReader ByteString Source #
get destination address from netlink attributes of NNeighMsg
putLinkAddress :: AttributeWriter LinkAddress Source #
set L2 address on netlink attributes
putLinkBroadcast :: AttributeWriter LinkAddress Source #
set L2 broadcast address on netlink attributes
putLinkName :: AttributeWriter String Source #
set interface name on netlink attributes
putLinkMTU :: AttributeWriter Word32 Source #
set mtu on netlink attributes
putLinkQDisc :: AttributeWriter String Source #
I actually have no idea what QDisc is
putLinkTXQLen :: AttributeWriter Word32 Source #
I should look this up