#!/bin/ksh -p
#pragma ident "@(#)decIP	1.1 96/11/12 SMI"
#
# Copyright 12 Nov 1996 Sun Microsystems, Inc. All Rights Reserved
#
# Synopsis: decIP (int)ipaddr
#  returns: (dotted decimal)

decIP() {
	typeset -i10 x
	(( x = $1 >> 24 & 16#FF ))
	y=$x
	(( x = $1 >> 16 & 16#FF ))
	y=$y.$x
	(( x = $1 >> 8 & 16#FF ))
	y=$y.$x
	(( x = $1 & 16#FF ))
	print $y.$x
}
