~jack/libtelnet-haskell

ref: 435aa32599e2e9c1c4195732f05e960697c58058 libtelnet-haskell/src/Network/Telnet/LibTelnet/Iac.hsc -rw-r--r-- 1.0 KiB
435aa325Jack Kelly Fix comment typo 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{-# 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
 }