version 1.3, 1996/03/27 19:32:58 |
version 1.4, 1996/04/21 23:44:11 |
|
|
/* $OpenBSD$ */ |
/* $OpenBSD$ */ |
/* $NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $ */ |
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1988, 1990, 1993 |
* Copyright (c) 1988, 1990, 1993 |
|
|
#ifndef lint |
#ifndef lint |
#if 0 |
#if 0 |
static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; |
static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; |
static char rcsid[] = "$NetBSD: commands.c,v 1.13 1996/02/28 21:03:53 thorpej Exp $"; |
static char rcsid[] = "$NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $"; |
#else |
#else |
static char rcsid[] = "$OpenBSD$"; |
static char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
|
|
if (temp != INADDR_NONE) { |
if (temp != INADDR_NONE) { |
sin.sin_addr.s_addr = temp; |
sin.sin_addr.s_addr = temp; |
sin.sin_family = AF_INET; |
sin.sin_family = AF_INET; |
(void) strcpy(_hostname, hostp); |
host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET); |
|
if (host) |
|
(void) strcpy(_hostname, host->h_name); |
|
else |
|
(void) strcpy(_hostname, hostp); |
hostname = _hostname; |
hostname = _hostname; |
} else { |
} else { |
host = gethostbyname(hostp); |
host = gethostbyname(hostp); |