zname))))))
;;;--------------------------------------------------------------------------
+;;; Hostname abbreviations.
+
+(defvar *abbrev-subdomain*
+ (make-domain-name :labels '("abbrev") :absolutep nil))
+(defparameter *abbrev-used* (make-hash-table :test #'equal))
+
+(defzoneparse :abbrev (name data rec :zname zname)
+ (let* ((domain (zone-parse-host data
+ (domain-name-concat *abbrev-subdomain*
+ zname)))
+ (key (princ-to-string domain))
+ (existing (gethash key *abbrev-used*)))
+ (when existing
+ (error "Abbrev collision for ~A between ~A and ~A."
+ domain existing name))
+ (setf (gethash key *abbrev-used*) name)
+ (rec :name domain
+ :type :cname
+ :data name)))
+
+;;;--------------------------------------------------------------------------
;;; Other definitions.
(setf *default-zone-admin* "hostmaster@distorted.org.uk")
:srv ((:http www)
(:ftp ftp))
- ;; Entry is via little router box.
- (dmz :net dmz)
- (guvnor (dmz :addr guvnor.dmz))
- (nat (dmz :addr nat.dmz))
-
- ;; Wireless gateway.
- (wireless :net wireless)
- (evolution (safe :addr evolution.safe))
- (evolution :alias evo)
-
;; Colocated services.
- ((irc vox) (colo :svc jazz.colo :sshfp "jazz")
- (jump :svc jazz.jump :sshfp "jazz"))
+ ((irc vox keys) (colo :svc jazz.colo :sshfp "jazz")
+ (jump :svc jazz.jump :sshfp "jazz"))
((git www mail) (colo :svc stratocaster.colo :sshfp "stratocaster")
(jump :svc stratocaster.jump :sshfp "stratocaster"))
((www @) :tlsa (:https (:service-certificate-constraint
(colo :net colo)
(jump :net jump)
(gate (jump :addr gate.jump :sshfp "precision"))
+ (fender :abbrev f (colo :abbrev fc) (jump :abbrev fj))
(fender (colo :addr fender.colo :sshfp "fender")
(jump :addr fender.jump :sshfp "fender"))
+ (precision :abbrev p (colo :abbrev pc) (jump :abbrev pj) (vpn :abbrev pv))
(precision (colo :addr precision.colo :sshfp "precision")
- (jump :addr precision.jump :sshfp "precision"))
+ (jump :addr precision.jump :sshfp "precision")
+ (vpn :addr precision.vpn :sshfp "precision"))
+ (telecaster :alias tele :abbrev t
+ (colo :alias tele.colo :abbrev tc)
+ (jump :alias tele.jump :abbrev tj))
(telecaster (colo :addr telecaster.colo :sshfp "telecaster")
(jump :addr telecaster.jump :sshfp "telecaster"))
- (telecaster :alias tele)
+ (stratocaster :alias strat :abbrev s
+ (colo :alias strat.colo :abbrev sc)
+ (jump :alias strat.jump :abbrev sj))
(stratocaster (colo :addr stratocaster.colo :sshfp "stratocaster")
(jump :addr stratocaster.jump :sshfp "stratocaster"))
- (stratocaster :alias strat)
+ (jazz :abbrev z (colo :abbrev zc) (jump :abbrev zj) (vpn :abbrev :zv))
(jazz (colo :addr jazz.colo :sshfp "jazz")
(jump :addr jazz.jump :sshfp "jazz")
+ (vpn :addr jazz.vpn :sshfp "jazz")
(iodine :addr jazz.iodine :sshfp "jazz"))
;; Media server (on loan to Good Technology HSTG).
+ (jaguar :abbrev jag)
(jaguar (jump :addr jaguar.jump :sshfp "jaguar"))
;; Nicko's server.
(richmond (jump :svc richmond.jump))
+ ;; Entry is via little router box.
+ (dmz :net dmz)
+ (guvnor (dmz :addr guvnor.dmz))
+ (nat (dmz :addr nat.dmz))
+
+ ;; Wireless gateway.
+ (wireless :net wireless)
+ (evolution (safe :addr evolution.safe))
+ (evolution :alias evo)
+
+ ;; Switches.
+ (tp0 (safe :addr tp0.safe))
+ (tp1 (safe :addr tp1.safe))
+ (tp2 (safe :addr tp2.safe))
+
;; Wired ethernet.
(unsafe :net unsafe)
(safe :net safe)
(untrusted :net untrusted)
+ (vampire :abbrev v
+ (unsafe :abbrev vu) (dmz :abbrev vd) (vpn :abbrev vv)
+ (safe :abbrev vs) (untrusted :abbrev vx))
(vampire (unsafe :addr vampire.unsafe :sshfp "vampire")
(dmz :addr vampire.dmz :sshfp "vampire")
+ (vpn :addr vampire.vpn :sshfp "vampire")
(safe :addr vampire.safe :sshfp "vampire")
(untrusted :addr vampire.untrusted :sshfp "vampire"))
+ (ibanez :abbrev i (unsafe :abbrev iu) (dmz :abbrev id))
(ibanez (unsafe :addr ibanez.unsafe :sshfp "ibanez")
(dmz :addr ibanez.dmz :sshfp "ibanez"))
+ (radius :abbrev r
+ (unsafe :abbrev ru) (dmz :abbrev rd) (vpn :abbrev rv)
+ (safe :abbrev rs) (untrusted :abbrev rx))
(radius (unsafe :addr radius.unsafe :sshfp "radius")
(dmz :addr radius.dmz :sshfp "radius")
+ (vpn :addr radius.vpn :sshfp "radius")
(safe :addr radius.safe :sshfp "radius")
(untrusted :addr radius.untrusted :sshfp "radius"))
+ (roadstar :abbrev rg (unsafe :abbrev rgu) (dmz :abbrev rgd))
(roadstar (unsafe :addr roadstar.unsafe :sshfp "roadstar")
(dmz :addr roadstar.dmz :sshfp "roadstar"))
+ (jem :abbrev j (unsafe :abbrev ju) (dmz :abbrev jd))
(jem (unsafe :addr jem.unsafe :sshfp "jem")
(dmz :addr jem.dmz :sshfp "jem"))
+ (artist :abbrev a
+ (unsafe :abbrev au) (dmz :abbrev ad) (untrusted :abbrev ax))
(artist (unsafe :addr artist.unsafe :sshfp "artist")
(dmz :addr artist.dmz :sshfp "artist")
(untrusted :addr artist.untrusted :sshfp "artist"))
+ (groove :abbrev gr)
+ (groove (unsafe :addr groove.unsafe :sshfp "groove"))
;; DHCP hosts.
- (gibson :cname gibson.dhcp)
+ (gibson :cname gibson.dhcp :abbrev g)
(lespaul :cname lespaul.dhcp)
(firebird :cname firebird.dhcp)
(marauder :cname marauder.dhcp)
(invader :cname invader.dhcp)
+ (gretsch :cname gretsch.dhcp)
;; Virtual network.
(vpn :net vpn)
+ (crybaby :abbrev cb)
(crybaby (vpn :addr crybaby.vpn :sshfp "crybaby"))
(terror (vpn :addr terror.vpn :sshfp "terror"))
+ (orange :abbrev o)
(orange (vpn :addr orange.vpn :sshfp "orange"))
+ (haze :abbrev h)
(haze (vpn :addr haze.vpn :sshfp "haze"))
(iodine :net iodine)