packages feed

libtelnet-0.1.0.0: src/Network/Telnet/LibTelnet/Iac.hsc

{-# LANGUAGE GeneralizedNewtypeDeriving #-}

-- | Telnet interpret-as-command (IAC) codes.

module Network.Telnet.LibTelnet.Iac
  ( Iac(..)
  , iacNull
  , iacIac
  , iacDont
  , iacDo
  , iacWont
  , iacWill
  , iacSB
  , iacGA
  , iacEL
  , iacEC
  , iacAYT
  , iacAO
  , iacIP
  , iacBreak
  , iacDM
  , iacNOP
  , iacSE
  , iacEOR
  , iacAbort
  , iacSusp
  , iacEOF
  ) where

import Foreign (Storable)
import Foreign.C (CUChar)

#include <libtelnet.h>

-- | Wrapper for telnet commands and special values.
newtype Iac = Iac { unIac :: CUChar } deriving (Eq, Show, Storable)
#{enum Iac, Iac
 , iacNull = 0
 , iacIac = TELNET_IAC
 , iacDont = TELNET_DONT
 , iacDo = TELNET_DO
 , iacWont = TELNET_WONT
 , iacWill = TELNET_WILL
 , iacSB = TELNET_SB
 , iacGA = TELNET_GA
 , iacEL = TELNET_EL
 , iacEC = TELNET_EC
 , iacAYT = TELNET_AYT
 , iacAO = TELNET_AO
 , iacIP = TELNET_IP
 , iacBreak = TELNET_BREAK
 , iacDM = TELNET_DM
 , iacNOP = TELNET_NOP
 , iacSE = TELNET_SE
 , iacEOR = TELNET_EOR
 , iacAbort = TELNET_ABORT
 , iacSusp = TELNET_SUSP
 , iacEOF = TELNET_EOF
 }