/*-1* Copyright 1994, 1995 Massachusetts Institute of Technology2*3* Permission to use, copy, modify, and distribute this software and4* its documentation for any purpose and without fee is hereby5* granted, provided that both the above copyright notice and this6* permission notice appear in all copies, that both the above7* copyright notice and this permission notice appear in all8* supporting documentation, and that the name of M.I.T. not be used9* in advertising or publicity pertaining to distribution of the10* software without specific, written prior permission. M.I.T. makes11* no representations about the suitability of this software for any12* purpose. It is provided "as is" without express or implied13* warranty.14*15* THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS16* ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,17* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF18* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT19* SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,20* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT21* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF22* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,24* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT25* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*/2829#include <sys/param.h>30#include <sys/systm.h>3132#include <netinet/in.h>3334char *35inet_ntoa_r(struct in_addr ina, char *buf)36{37unsigned char *ucp = (unsigned char *)&ina;3839sprintf(buf, "%d.%d.%d.%d",40ucp[0] & 0xff,41ucp[1] & 0xff,42ucp[2] & 0xff,43ucp[3] & 0xff);44return buf;45}464748