nss-myhostname.c revision df2ce9dbb6e0d55aa375f57293a7b2bf31f44be7
/* $Id$ */
/*
* This file is part of nss-myhostname.
*
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* nss-myhostname is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with nss-myhostname; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include <limits.h>
#include <nss.h>
#include <netdb.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
static enum nss_status fill_in_hostent(
const char *hn,
char *buffer,
int *errnop,
int *h_errnop) {
*h_errnop = NO_RECOVERY;
return NSS_STATUS_TRYAGAIN;
}
idx = l+1;
idx += sizeof(char*);
idx += 4;
return NSS_STATUS_SUCCESS;
}
const char *name,
int af,
char *buffer,
int *errnop,
int *h_errnop) {
return NSS_STATUS_NOTFOUND;
}
*h_errnop = NO_RECOVERY;
return NSS_STATUS_TRYAGAIN;
}
return NSS_STATUS_NOTFOUND;
}
}
const char *name,
char *buffer,
int *errnop,
int *h_errnop) {
return _nss_myhostname_gethostbyname2_r(
name,
h_errnop);
}
const void* addr,
int len,
int af,
char *buffer,
int *errnop,
int *h_errnop) {
return NSS_STATUS_NOTFOUND;
}
*h_errnop = NO_RECOVERY;
return NSS_STATUS_TRYAGAIN;
}
}