hans-2.4.0.0: IPv4 Network Stack

Safe HaskellNone
LanguageHaskell98

Hans.Device.Tap

Synopsis

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.