haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Network

Synopsis

Documentation

sysShutdown :: MonadIO m => Handle -> ShutFlag -> Flow m '[(), ErrorCode] Source #

Shut down part of a full-duplex connection

sysSendFile :: MonadIO m => Handle -> Handle -> Word64 -> Flow m '[Word64, ErrorCode] Source #

Call sendfile using implicit file cursor for input

sysSendFileWithOffset :: MonadInIO m => Handle -> Handle -> Word64 -> Word64 -> Flow m '[(Word64, Word64), ErrorCode] Source #

Call sendFile using explicit input offset, returns new offset

data SocketProtocol Source #

Socket protocol family

Constructors

SockProtUNSPEC

Unspecified (0)

SockProtLOCAL

Local to host (pipes and file-domain). Also called UNIX or FILE

SockProtIPv4

IP protocol family

SockProtAX25

Amateur Radio AX.25

SockProtIPX

Novell Internet Protocol

SockProtAPPLETALK

Appletalk DDP

SockProtNETROM

Amateur radio NetROM

SockProtBRIDGE

Multiprotocol bridge

SockProtATMPVC

ATM PVCs

SockProtX25

Reserved for X.25 project

SockProtIPv6

IP version 6

SockProtROSE

Amateur Radio X.25 PLP

SockProtDECnet

Reserved for DECnet project

SockProtNETBEUI

Reserved for 802.2LLC project

SockProtSECURITY

Security callback pseudo AF

SockProtKEY

PF_KEY key management API

SockProtNETLINK

Netlink. Also called ROUTE

SockProtPACKET

Packet family

SockProtASH

Ash

SockProtECONET

Acorn Econet

SockProtATMSVC

ATM SVCs

SockProtRDS

RDS sockets

SockProtSNA

Linux SNA Project

SockProtIRDA

IRDA sockets

SockProtPPPOX

PPPoX sockets

SockProtWANPIPE

Wanpipe API sockets

SockProtLLC

Linux LLC

SockProt27

Unknown. Added to simplify Enum deriving

SockProt28

Unknown. Added to simplify Enum deriving

SockProtCAN

Controller Area Network

SockProtTIPC

TIPC sockets

SockProtBLUETOOTH

Bluetooth sockets

SockProtIUCV

IUCV sockets

SockProtRXRPC

RxRPC sockets

SockProtISDN

mISDN sockets

SockProtPHONET

Phonet sockets

SockProtIEEE802154

IEEE 802.15.4 sockets

SockProtCAIF

CAIF sockets

SockProtALG

Algorithm sockets

SockProtNFC

NFC sockets

SockProtVSOCK

vSockets

data SocketRawType Source #

Constructors

SockRawTypeStream

Sequenced, reliable, connection-based byte streams

SockRawTypeDatagram

Connectionless, unreliable datagrams of fixed maximum length

SockRawTypeRaw

Raw protocol interface

SockRawTypeRDM

Reliably delivered messages

SockRawTypeSeqPacket

Sequenced, reliable, connection-based, datagrams of fixed maximum length

SockRawTypeDCCP

Datagram congestion control protocol

SockRawTypePacket

Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level

data IPType Source #

IP type

Constructors

IPv4 
IPv6 

Instances

sysSocket' :: MonadIO m => SocketRawType -> SocketProtocol -> Int -> [SocketOption] -> Flow m '[Handle, ErrorCode] Source #

Create a socket (low-level API)

subprotocol may be 0

sysSocket :: MonadIO m => SocketType -> [SocketOption] -> Flow m '[Handle, ErrorCode] Source #

Create a socket

sysSocketPair' :: MonadInIO m => SocketRawType -> SocketProtocol -> Int -> [SocketOption] -> Flow m '[(Handle, Handle), ErrorCode] Source #

Create a socket pair (low-level API)

subprotocol may be 0

sysSocketPair :: MonadInIO m => SocketType -> [SocketOption] -> Flow m '[(Handle, Handle), ErrorCode] Source #

Create a socket pair

sysBind :: (MonadInIO m, Storable a) => Handle -> a -> Flow m '[(), ErrorCode] Source #

Bind a socket

sysBindNetlink :: MonadInIO m => Handle -> Word32 -> Word32 -> Flow m '[(), ErrorCode] Source #

Bind a netlink socket

groups is a group mask

sysConnect :: (MonadInIO m, Storable a) => Handle -> a -> Flow m '[(), ErrorCode] Source #

Connect a socket

sysAccept :: (MonadInIO m, Storable a) => Handle -> a -> [SocketOption] -> Flow m '[Handle, ErrorCode] Source #

Accept a connection on a socket

We use accept4 (288) instead of accept (43) to support socket options

sysListen :: MonadIO m => Handle -> Word64 -> Flow m '[(), ErrorCode] Source #

Listen on a socket

@ backlog is the number of incoming requests that are stored