libtelnet-0.1.0.1: Bindings to libtelnet
Copyright(c) 2017-2021 Jack Kelly
LicenseGPL-3.0-or-later
Maintainerjack@jackkelly.name
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Network.Telnet.LibTelnet.Ffi

Description

FFI binding to libtelnet. The vast majority of these functions are generated from foreign import declarations.

Synopsis

Documentation

cTelnetInit Source #

Arguments

:: Ptr TelnetTeloptT
const telnet_telopt_t *telopts
-> FunPtr TelnetEventHandlerT
telnet_event_handler_t eh
-> CUChar
unsigned char flags
-> Ptr ()
void *user_data
-> IO (Ptr TelnetT) 

C function telnet_init.

cTelnetFree :: Ptr TelnetT -> IO () Source #

C function telnet_free.

type TelnetEventHandlerT = Ptr TelnetT -> Ptr EventT -> Ptr () -> IO () Source #

Represents telnet_event_handler_t.

cTelnetRecv Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> CString
const char *buffer
-> CSize
size_t size
-> IO () 

C function telnet_recv.

cTelnetIac Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> Iac
unsigned char cmd
-> IO () 

C function telnet_iac.

cTelnetNegotiate Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> Iac

unsigned char cmd

-> Option

unsigned char opt

-> IO () 

C function telnet_negotiate.

cTelnetSend Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> CString
const char *buffer
-> CSize
size_t size
-> IO () 

C function telnet_send.

cTelnetSubnegotiation Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> Option
unsigned char telopt
-> CString
const char *buffer
-> CSize
size_t size
-> IO () 

C function telnet_subnegotiation.

cTelnetBeginCompress2 Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> IO () 

C function telnet_begin_compress2.

cTelnetBeginNewEnviron Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> ECmd
unsigned char type
-> IO () 

C function telnet_begin_newenviron.

cTelnetNewEnvironValue Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> EVar
unsigned char type
-> CString
const char *string
-> IO () 

C function telnet_newenviron_value.

cTelnetTTypeSend Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> IO () 

C function telnet_ttype_send.

cTelnetTTypeIs Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> CString
const char *ttype
-> IO () 

C function telnet_ttype_is.

cTelnetSendZmp Source #

Arguments

:: Ptr TelnetT
telnet_t *telnet
-> CSize
size_t argc
-> Ptr CString
const char **argv
-> IO () 

C function telnet_send_zmp.

useAsCStrings :: [ByteString] -> (Ptr CString -> IO a) -> IO a Source #

Collect '[ByteString]' into a temporary array of strings in a 'Ptr CString', for passing to C functions.