(ref-id) ( ref-id stratum -- string )


Vocabulary
ntp.private

Inputs
ref-idan object
stratuman object


Outputs
stringan object


Definition


: (ref-id) ( ref-id stratum -- string )
[
{
[ -24 shift 255 bitand ]
[ -16 shift 255 bitand ]
[ -8 shift 255 bitand ]
[ 255 bitand ]
} cleave
] dip {
{ 0 [ "%c%c%c%c" sprintf ] }
{ 1 [ "%c%c%c%c" sprintf ] }
[
[ 1 > ] [ 255 < ] bi and
[ "%d.%d.%d.%d" sprintf ]
[ "invalid stratum" throw ] if
]
} case ;