1 |
/* This file is part of GNU RADIUS. |
/* This file is part of GNU Radius. |
2 |
Copyright (C) 2000, Sergey Poznyakoff |
Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Radius is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2 of the License, or |
the Free Software Foundation; either version 2 of the License, or |
7 |
(at your option) any later version. |
(at your option) any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Radius is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
GNU General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software Foundation, |
along with GNU Radius; if not, write to the Free Software Foundation, |
16 |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
17 |
|
|
18 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
24 |
LOCK_DECLARE(lock) |
LOCK_DECLARE(lock) |
25 |
|
|
26 |
static int |
static int |
27 |
store_hostent(h_in, h_out, buf, buflen, h_errnop) |
store_hostent(struct hostent *h_in, |
28 |
struct hostent *h_in; |
struct hostent *h_out, |
29 |
struct hostent *h_out; |
char *buf, |
30 |
char *buf; |
int buflen, |
31 |
int buflen; |
int *h_errnop) |
|
int *h_errnop; |
|
32 |
{ |
{ |
33 |
int len, i; |
int len, i; |
34 |
char *base; |
char *base; |
94 |
} |
} |
95 |
|
|
96 |
struct hostent * |
struct hostent * |
97 |
rad_gethostbyname_r(name, result, buffer, buflen, h_errnop) |
rad_gethostbyname_r(const char *name, |
98 |
const char *name; |
struct hostent *result, |
99 |
struct hostent *result; |
char *buffer, |
100 |
char *buffer; |
int buflen, |
101 |
int buflen; |
int *h_errnop) |
|
int *h_errnop; |
|
102 |
{ |
{ |
103 |
struct hostent *host; |
struct hostent *host; |
104 |
|
|
111 |
} |
} |
112 |
|
|
113 |
struct hostent * |
struct hostent * |
114 |
rad_gethostbyaddr_r(addr, length, type, result, buffer, buflen, h_errnop) |
rad_gethostbyaddr_r(const char *addr, |
115 |
const char *addr; |
int length, |
116 |
int length; |
int type, |
117 |
int type; |
struct hostent *result, |
118 |
struct hostent *result; |
char *buffer, |
119 |
char *buffer; |
int buflen, |
120 |
int buflen; |
int *h_errnop) |
|
int *h_errnop; |
|
121 |
{ |
{ |
122 |
struct hostent *host; |
struct hostent *host; |
123 |
|
|