44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/*
|
|
* SPDX-FileCopyrightText: 2022 Matteo Settenvini <matteo.settenvini@montecristosoftware.eu>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
#include <nss.h>
|
|
#include <netdb.h>
|
|
|
|
// Work around enums in netdb.h defined as macros instead :-p
|
|
|
|
enum class HErrno {
|
|
Success = 0,
|
|
HostNotFound = HOST_NOT_FOUND,
|
|
TryAgain = TRY_AGAIN,
|
|
NoRecovery = NO_RECOVERY,
|
|
NoData = NO_DATA,
|
|
#ifdef __USE_MISC
|
|
Internal = NETDB_INTERNAL,
|
|
#endif
|
|
};
|
|
|
|
enum class EaiRetcode {
|
|
Success = 0,
|
|
BadFlags = EAI_BADFLAGS,
|
|
NoName = EAI_NONAME,
|
|
Fail = EAI_FAIL,
|
|
Family = EAI_FAMILY,
|
|
SockType = EAI_SOCKTYPE,
|
|
Service = EAI_SERVICE,
|
|
Memory = EAI_MEMORY,
|
|
System = EAI_SYSTEM,
|
|
Overflow = EAI_OVERFLOW,
|
|
#ifdef __USE_GNU
|
|
NoData = EAI_NODATA,
|
|
AddrFamily = EAI_ADDRFAMILY,
|
|
InProgress = EAI_INPROGRESS,
|
|
Canceled = EAI_CANCELED,
|
|
NotCanceled = EAI_NOTCANCELED,
|
|
AllDone = EAI_ALLDONE,
|
|
Interrupted = EAI_INTR,
|
|
IdnEncode = EAI_IDN_ENCODE,
|
|
#endif /* __USE_GNU */
|
|
};
|