Safe Haskell | None |
---|---|
Language | Haskell98 |
- openTapDevice :: DeviceName -> IO (Maybe Fd)
- tapSend :: Fd -> ByteString -> IO ()
- tapReceiveLoop :: Fd -> EthernetHandle -> IO ()
- tapReceive :: Fd -> IO ByteString
- c_read' :: Fd -> Ptr Word8 -> CSize -> IO CLong
- c_init_tap_device :: CString -> IO Fd
- c_write :: Fd -> Ptr Word8 -> CSize -> IO CLong
- c_read :: Fd -> Ptr Word8 -> CSize -> IO CLong
Documentation
openTapDevice :: DeviceName -> IO (Maybe Fd) Source
Open a device by name.
tapSend :: Fd -> ByteString -> IO () Source
Send an ethernet frame via a tap device.
TODO: make more use of the lazy bytestring
tapReceiveLoop :: Fd -> EthernetHandle -> IO () Source
Fork a reciever loop, and return an IO action to kill the running thread.
tapReceive :: Fd -> IO ByteString Source
Recieve an ethernet frame from a tap device.
c_init_tap_device :: CString -> IO Fd Source