tuntap-0.0.1: Interface to TUN/TAP drivers.Source codeContentsIndex
Network.TUNTAP
Synopsis
start :: IO TAP
finish :: TAP -> IO CInt
openTAP :: TAP -> String -> IO CInt
closeTAP :: TAP -> IO CInt
bringUp :: TAP -> IO CInt
setMTU :: TAP -> Int -> IO CInt
setIP :: TAP -> Word32 -> IO CInt
setMask :: TAP -> Word32 -> IO CInt
getMAC :: TAP -> IO DevMAC
data TAP
type Packet = ByteString
type DevMAC = [Word8]
readTAP :: TAP -> IO Packet
writeTAP :: TAP -> Packet -> IO CInt
withTAP :: Int -> (TAP -> IO a) -> IO ()
Documentation
start :: IO TAPSource
Allocate a TAP resource
finish :: TAP -> IO CIntSource
Deallocate a TAP resource
openTAP :: TAP -> String -> IO CIntSource
Open the TAP device
closeTAP :: TAP -> IO CIntSource
Close the TAP device
bringUp :: TAP -> IO CIntSource
Bring up the TAP device
setMTU :: TAP -> Int -> IO CIntSource
Set the MTU of the TAP device
setIP :: TAP -> Word32 -> IO CIntSource
Set the IPv4 address of the TAP device
setMask :: TAP -> Word32 -> IO CIntSource
Set the network mask of the TAP device
getMAC :: TAP -> IO DevMACSource
Get the MAC address assigned to the TAP device
data TAP Source
show/hide Instances
type Packet = ByteStringSource
ReadWritten to the TUNTAP device.
type DevMAC = [Word8]Source
A DevMAC is a hardware address 48 bits long.
readTAP :: TAP -> IO PacketSource
Read a packet from the TAP device
writeTAP :: TAP -> Packet -> IO CIntSource
Write a packet to the TAP device
withTAP :: Int -> (TAP -> IO a) -> IO ()Source
Accept an action and an MTU. Allocate a TAP and pass it to the action. Clean up when finished with the action.
Produced by Haddock version 2.7.2