~jack/libtelnet-haskell

ref: 6a8d7db4d1faac82a15e2d9905dd61d5f13d8471 libtelnet-haskell/src/Network/Telnet/LibTelnet/Options.hsc -rw-r--r-- 2.9 KiB
6a8d7db4Jack Kelly Documentation updates 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

{-|
Module      : Network.Telnet.LibTelnet.Options
Description : Constants for option codes
Copyright   : (c) 2017-2019 Jack Kelly
License     : GPL-3.0-or-later
Maintainer  : jack@jackkelly.name
Stability   : experimental
Portability : non-portable

Telnet option codes. Many of these are defined in their own RFC.
<http://www.omnifarious.org/~hopper/technical/telnet-rfc.html> is a
good index of known options.
-}

module Network.Telnet.LibTelnet.Options
  ( Option(..)
  , optBinary
  , optEcho
  , optRCP
  , optSGA
  , optNAMS
  , optStatus
  , optTM
  , optRCTE
  , optNAOL
  , optNAOP
  , optNAOCRD
  , optNAOHTS
  , optNAOHTD
  , optNAOFFD
  , optNAOVTS
  , optNAOVTD
  , optNAOLFD
  , optXASCII
  , optLogout
  , optBM
  , optDET
  , optSUPDUP
  , optSUPDUPOutput
  , optSNDLOC
  , optTType
  , optEOR
  , optTUID
  , optOUTMRK
  , optTTYLOC
  , opt3270Regime
  , optX3Pad
  , optNAWS
  , optTSpeed
  , optLFlow
  , optLineMode
  , optXDISPLOC
  , optEnviron
  , optAuthentication
  , optEncrypt
  , optNewEnviron
  , optMSSP
  , optCompress2
  , optZMP
  , optEXOPL
  , optMCCP2
  ) where

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

#include <libtelnet.h>

-- | Wrapper for telnet option codes.
newtype Option = Option { unOption :: CUChar } deriving (Eq, Show, Storable)
#{enum Option, Option
 , optBinary = TELNET_TELOPT_BINARY
 , optEcho = TELNET_TELOPT_ECHO
 , optRCP = TELNET_TELOPT_RCP
 , optSGA = TELNET_TELOPT_SGA
 , optNAMS = TELNET_TELOPT_NAMS
 , optStatus = TELNET_TELOPT_STATUS
 , optTM = TELNET_TELOPT_TM
 , optRCTE = TELNET_TELOPT_RCTE
 , optNAOL = TELNET_TELOPT_NAOL
 , optNAOP = TELNET_TELOPT_NAOP
 , optNAOCRD = TELNET_TELOPT_NAOCRD
 , optNAOHTS = TELNET_TELOPT_NAOHTS
 , optNAOHTD = TELNET_TELOPT_NAOHTD
 , optNAOFFD = TELNET_TELOPT_NAOFFD
 , optNAOVTS = TELNET_TELOPT_NAOVTS
 , optNAOVTD = TELNET_TELOPT_NAOVTD
 , optNAOLFD = TELNET_TELOPT_NAOLFD
 , optXASCII = TELNET_TELOPT_XASCII
 , optLogout = TELNET_TELOPT_LOGOUT
 , optBM = TELNET_TELOPT_BM
 , optDET = TELNET_TELOPT_DET
 , optSUPDUP = TELNET_TELOPT_SUPDUP
 , optSUPDUPOutput = TELNET_TELOPT_SUPDUPOUTPUT
 , optSNDLOC = TELNET_TELOPT_SNDLOC
 , optTType = TELNET_TELOPT_TTYPE
 , optEOR = TELNET_TELOPT_EOR
 , optTUID = TELNET_TELOPT_TUID
 , optOUTMRK = TELNET_TELOPT_OUTMRK
 , optTTYLOC = TELNET_TELOPT_TTYLOC
 , opt3270Regime = TELNET_TELOPT_3270REGIME
 , optX3Pad = TELNET_TELOPT_X3PAD
 , optNAWS = TELNET_TELOPT_NAWS
 , optTSpeed = TELNET_TELOPT_TSPEED
 , optLFlow = TELNET_TELOPT_LFLOW
 , optLineMode = TELNET_TELOPT_LINEMODE
 , optXDISPLOC = TELNET_TELOPT_XDISPLOC
 , optEnviron = TELNET_TELOPT_ENVIRON
 , optAuthentication = TELNET_TELOPT_AUTHENTICATION
 , optEncrypt = TELNET_TELOPT_ENCRYPT
 , optNewEnviron = TELNET_TELOPT_NEW_ENVIRON
 , optMSSP = TELNET_TELOPT_MSSP
 , optCompress2 = TELNET_TELOPT_COMPRESS2
 , optZMP = TELNET_TELOPT_ZMP
 , optEXOPL = TELNET_TELOPT_EXOPL
 , optMCCP2 = TELNET_TELOPT_MCCP2
 }