2016-07-12 22:47:51 +00:00
|
|
|
#lang syndicate/actor
|
2015-10-18 00:33:10 +00:00
|
|
|
;; Demonstration stack configuration for various hosts.
|
|
|
|
|
|
|
|
(require racket/match)
|
|
|
|
(require (only-in mzlib/os gethostname))
|
|
|
|
(require "configuration.rkt")
|
|
|
|
|
2016-07-12 22:47:51 +00:00
|
|
|
(actor
|
2016-08-24 20:29:08 +00:00
|
|
|
(match (gethostname)
|
|
|
|
["skip"
|
|
|
|
(assert (gateway-route (bytes 0 0 0 0) 0 (bytes 192 168 1 1) "en0"))
|
|
|
|
(assert (host-route (bytes 192 168 1 222) 24 "en0"))]
|
|
|
|
[(or "hop" "walk")
|
|
|
|
(assert (gateway-route (bytes 0 0 0 0) 0 (bytes 192 168 1 1) "wlan0"))
|
|
|
|
(assert (host-route (bytes 192 168 1 222) 24 "wlan0"))]
|
|
|
|
["stockholm.ccs.neu.edu"
|
|
|
|
(assert (host-route (bytes 129 10 115 94) 24 "eth0"))
|
|
|
|
(assert (gateway-route (bytes 0 0 0 0) 0 (bytes 129 10 115 1) "eth0"))]
|
|
|
|
[other
|
|
|
|
(error 'demo-config "No setup for hostname ~a" other)]))
|