From 88dc0b1c096ab8f8103ecd69de780b96e1de277d Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Wed, 8 May 2024 13:51:49 +0100 Subject: [PATCH] net.lisp (ipmask-cidr-slash): Rename from `ipmask-cidl-slash'. I can only plead incompetence. --- net.lisp | 8 ++++---- zone.lisp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/net.lisp b/net.lisp index 7996827..13f390c 100644 --- a/net.lisp +++ b/net.lisp @@ -301,8 +301,8 @@ "Given an integer I, return an N-bit netmask with its I top bits set." (- (ash 1 n) (ash 1 (- n i)))) -(export 'ipmask-cidl-slash) -(defun ipmask-cidl-slash (width mask) +(export 'ipmask-cidr-slash) +(defun ipmask-cidr-slash (width mask) "Given a netmask MASK, try to compute a prefix length. Return an integer N such that (integer-netmask WIDTH N) = MASK, or nil if @@ -386,7 +386,7 @@ (with-ipnet (net nil mask) ipn (format nil "~A/~A" (ipaddr-string net) - (or (ipmask-cidl-slash (ipnet-width ipn) mask) + (or (ipmask-cidr-slash (ipnet-width ipn) mask) (ipaddr-string (make-instance (class-of net) :addr mask)))))) (defmethod print-object ((ipn ipnet) stream) @@ -484,7 +484,7 @@ (let* ((addr-class (extract-class-name (ipnet-net ipn))) (width (ipaddr-width addr-class)) (max (- width - (or (ipmask-cidl-slash width (ipnet-mask ipn)) + (or (ipmask-cidr-slash width (ipnet-mask ipn)) (error "Base network has complex netmask"))))) (multiple-value-bind (addr mask) (parse-subnet addr-class width max (stringify str) diff --git a/zone.lisp b/zone.lisp index 0979120..7649f54 100644 --- a/zone.lisp +++ b/zone.lisp @@ -1031,7 +1031,7 @@ (write-char #\space out)) (let* ((width (ipnet-width net)) (mask (ipnet-mask net)) - (plen (ipmask-cidl-slash width mask))) + (plen (ipmask-cidr-slash width mask))) (unless plen (error "invalid netmask in network ~A" net)) (format out "~A~A:~A~@[/~D~]" -- 2.11.0