interger to I P address

Robert D. Scott wrote:
> The harder way:
> Decimal: 1089055123
> Hex (dashes inserted at octals): 40-E9-A9-93
> Decimal (of each octet): 64-233-169-147
> IP Address:

The Python way

>>> import socket, struct
>>> socket.inet_ntoa(struct.pack('>l', 1089055123))

The Tops-10/DDT way:

.r ddt
0! 1089055123.
lsh 4$x

$10r$8o0/ 64.,233.,169.,147.,0. ^Z



Gonna be hard to top that one for sheer old-skool geekitude.

(No, it's OK, the monitor needed cleaning anyhow... :slight_smile:

her at the apnic meeting, we are indulging for a bit into the deep topic
of how ot textually represent 32-bit AS numbers. is it xxxx.xxxx or
xxxxxxxx? while we readily admit that a deep many year discussion of a
dot is clearly a topic for the ietf, we do have to allocate these
things, so actually need an answer.

on the other hand, i wonder if this ingenious community could come up
with the extraodinarily difficult programming task of routines to
convert between the two notations.


At AusNOG last week, it was pointed out that using a "." in the middle
of an AS number wrecks AS path regexes in RPSL.

So those of us using IRR's have to go back and rewrite all our policies.
And IRRToolSet needs to be updated, which is probably an even worse
proposition :slight_smile:

I'm strongly in favour of ASPLAIN. I reckon the people who advocate
using dots because they think 32-bit ASNs up to 4 billion are too long
to remember are probably getting old :slight_smile:

   - mark

Hmm, ITS TECO is a bit more verbose in this case: