-
Notifications
You must be signed in to change notification settings - Fork 16
/
hans.cabal
170 lines (152 loc) · 6.67 KB
/
hans.cabal
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: hans
version: 3.1.0
cabal-version: >= 1.18
license: BSD3
license-file: LICENSE
author: Galois Inc.
maintainer: [email protected]
category: Networking
synopsis: Network Stack
build-type: Simple
tested-with: GHC == 7.8.4, GHC == 7.10.2, GHC == 7.10.3, GHC == 8.0.1
description:
HaNS is a lightweight, pure Haskell network stack that can be used for Haskell
networking in the context of the HaLVM, or with a Linux tap device.
source-repository head
type: git
location: git://github.com/GaloisInc/HaNS.git
flag examples
description: Build example programs
default: False
flag raw-ethernet
description: Use raw ethernet packets
default: False
library
if os(HALVM)
cpp-options: -DHANS_TARGET_XEN
build-depends: XenDevice >= 2.0.0 && < 3,
HALVMCore >= 2.0.0 && < 3
other-modules: Hans.Device.Xen
if os(darwin) || os(linux) && !flag(raw-ethernet)
cpp-options: -DHANS_TARGET_UNIX
build-depends: unix
other-modules: Hans.Device.Tap
include-dirs: cbits
c-sources: cbits/tapdevice.c
if os(linux) && flag (raw-ethernet)
cpp-options: -DHANS_TARGET_RAW_ETHERNET
build-depends: unix
other-modules: Hans.Device.RawEthernet
include-dirs: cbits
c-sources: cbits/ethernet.c
-- XXX: Tap devices are supported on windows, someone should add support
default-language: Haskell2010
ghc-options: -Wall -O2
hs-source-dirs: src
build-depends: base >= 4.0.0.0 && < 5,
cereal >= 0.5.0.0,
heaps == 0.3.*,
psqueues,
bytestring,
containers,
array,
time,
hashable,
array,
BoundedChan,
random,
monadLib,
SHA
-- XXX: which of these should be exposed?
exposed-modules: Hans
Hans.Addr
Hans.Addr.Types
Hans.Checksum
Hans.Config
Hans.Device
Hans.Device.Loopback
Hans.Device.Types
Hans.Dns
Hans.Dns.Packet
Hans.Ethernet
Hans.Ethernet.Types
Hans.HashTable
Hans.IP4
Hans.IP4.ArpTable
Hans.IP4.Dhcp.Client
Hans.IP4.Dhcp.Codec
Hans.IP4.Dhcp.Packet
Hans.IP4.Dhcp.Options
Hans.IP4.Fragments
Hans.IP4.Icmp4
Hans.IP4.Input
Hans.IP4.Output
Hans.IP4.Packet
Hans.IP4.RoutingTable
Hans.IP4.State
Hans.Input
Hans.Lens
Hans.Monad
Hans.Nat
Hans.Network
Hans.Network.Types
Hans.Serialize
Hans.Socket
Hans.Socket.Handle
Hans.Tcp.Input
Hans.Tcp.Message
Hans.Tcp.Output
Hans.Tcp.Packet
Hans.Tcp.RecvWindow
Hans.Tcp.SendWindow
Hans.Tcp.State
Hans.Tcp.Tcb
Hans.Tcp.Timers
Hans.Time
Hans.Types
Hans.Udp.Input
Hans.Udp.Output
Hans.Udp.Packet
Hans.Udp.State
other-modules: Hans.Buffer.Datagram
Hans.Buffer.Signal
Hans.Buffer.Stream
Hans.Nat.Forward
Hans.Nat.State
Hans.Socket.Tcp
Hans.Socket.Types
Hans.Socket.Udp
Hans.Threads
executable echo-server
if flag(examples)
build-depends: base >= 4.0.0.0 && < 5,
bytestring,
hans
else
buildable: False
default-language: Haskell2010
main-is: Main.hs
hs-source-dirs: examples/echo-server
ghc-options: -Wall -threaded -O2
test-suite hans-tests
default-language: Haskell2010
type: exitcode-stdio-1.0
build-depends: base >= 4.4 && < 5,
bytestring,
tasty >= 0.11,
tasty-quickcheck,
tasty-ant-xml,
QuickCheck,
cereal,
hans
ghc-options: -Wall -threaded
hs-source-dirs: tests
main-is: Main.hs
other-modules: Tests.Checksum
Tests.Ethernet
Tests.IP4
Tests.IP4.Fragmentation
Tests.IP4.Icmp4
Tests.IP4.Packet
Tests.Network
Tests.Utils