netdb.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_COMPAT_NETDB_H
10 #define SQUID_COMPAT_NETDB_H
11 
12 #if HAVE_NETDB_H
13 #include <netdb.h>
14 #endif
15 
17 struct hostent * xgethostbyname(const char * name);
18 
20 struct servent * xgetservbyname(const char * name, const char * proto);
21 
22 #if !(_SQUID_WINDOWS_ || _SQUID_MINGW_)
23 
24 inline struct hostent *
25 xgethostbyname(const char *name)
26 {
27  return gethostbyname(name);
28 }
29 
30 inline struct servent *
31 xgetservbyname(const char *name, const char *proto)
32 {
33  return getservbyname(name, proto);
34 }
35 
36 #endif /* !(_SQUID_WINDOWS_ || _SQUID_MINGW_) */
37 #endif /* SQUID_COMPAT_NETDB_H */
struct hostent * xgethostbyname(const char *name)
POSIX gethostbyname(3) equivalent.
Definition: netdb.h:25
struct servent * xgetservbyname(const char *name, const char *proto)
POSIX getservbyname(3) equivalent.
Definition: netdb.h:31

 

Introduction

Documentation

Support

Miscellaneous