added internet-address->dotted-string

This commit is contained in:
mainzelm 2000-09-24 20:51:04 +00:00
parent d58a39d813
commit e3f2877ab9
2 changed files with 10 additions and 0 deletions

View File

@ -146,6 +146,15 @@
(byte-vector-ref address 1)
(byte-vector-ref address 0)))
;;; This proc and its inverse should be in a general IP module.
(define (internet-host-address->dotted-string bv)
(let* ((byte0 (byte-vector-ref bv 0))
(byte1 (byte-vector-ref bv 1))
(byte2 (byte-vector-ref bv 2))
(byte3 (byte-vector-ref bv 3)))
(string-append (number->string byte3) "." (number->string byte2) "."
(number->string byte1) "." (number->string byte0))))
(define (internet-host-address-to-number address)
(byte-vector->integer address))

View File

@ -669,6 +669,7 @@
internet-host-address-from-bytes
internet-host-address-to-number
internet-host-address-to-bytes
internet-host-address->dotted-string
host-info
host-info?