scsh-hackers
[Top] [All Lists]

[Scsh-hackers] Re: IP addresses

To: shivers@cc.gatech.edu
Subject: [Scsh-hackers] Re: IP addresses
From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Date: 19 Jun 2001 13:30:47 +0200
Cc: gasbichl@informatik.uni-tuebingen.de, scsh-hackers@lists.sourceforge.net, bdc@zurich.ai.mit.edu, alan@lcs.mit.edu
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
I'm sorry I missed this the first time around.

>>>>> "Olin" == Olin Shivers <shivers@cc.gatech.edu> writes:

>> internet-host-addresses are now represented as byte-vectors. There
>> exist a few conversion functions:
>> 
>> (number->internet-host-addresse address32) ->bv
>> (internet-host-address->number bv) -> old representation
>> 
>> (bytes->internet-host-address b4 b3 b2 b1) ->bv
>> (internet-host-address->-bytes bv) -> (b4 .. b1)
>> 
>> (internet-host-address->dotted-string bv) -> "123.123.123.123"
>> (dotted-string->internet-host-address string) ->bv

>> >>>> Brian should comment on this. Why do we need to represent IP addresses
>> >>>> with byte vectors?

>> I don't like the idea of having addresses floating around as normal
>> integers. Byte vectors are much more opaque, but maybe it's even
>> better to have a separate record for this.

Olin> Byte vectors are the wrong thing, because IP addresses have no
Olin> byte structure.

They sure do in a variety of settings as demonstrated by the
interface.  I've just been bitten by the fact that Martin took
INTERNET-HOST-ADDRESS-FROM-BYTES out of scsh --- otherwise, I have to
do

(+ (arithmetic-shift a1 24)
   (arithmetic-shift a2 16)
   (arithmetic-shift a3 8)
   a4)

somewhere in my code which is "just great".

Bring it back, I say!

-- 
Cheers =8-} M.
Friede, Völkerverständigung und überhaupt blabla


<Prev in Thread] Current Thread [Next in Thread>
  • [Scsh-hackers] Re: IP addresses, Michael Sperber [Mr. Preprocessor] <=