/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* Get client's IP address via ioctl. This avoids using the NIS.
* Copyright (C) 1990, Sun Microsystems, Inc.
*/
#include <rpc/pmap_prot.h>
#include <stdio.h>
#include <syslog.h>
#include <malloc.h>
#include <unistd.h>
#include <stropts.h>
#include <stdlib.h>
#include <errno.h>
/*
* don't use gethostbyname, which would invoke NIS
*/
void
{
int s;
int ret;
exit(1);
}
do {
if (ret < 0) {
exit(1);
}
exit(1);
}
do {
if (ret < 0) {
"get_myaddress: ioctl (get interface configuration): %m");
exit(1);
}
/*
* set default to loopback in case nothing is found.
*/
do {
if (ret < 0) {
exit(1);
}
continue;
continue;
continue;
continue;
break;
}
(void) close(s);
}