From 53396e4923e191b0bbb831c7319862bbaa37609d Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 18 Jul 1999 23:13:11 +0000 Subject: [PATCH] new constants for getipnodeby* git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6472 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/roken-common.h | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/lib/roken/roken-common.h b/lib/roken/roken-common.h index b33726ee1..c035f9fee 100644 --- a/lib/roken/roken-common.h +++ b/lib/roken/roken-common.h @@ -121,6 +121,59 @@ #define SIG_ERR ((RETSIGTYPE (*)())-1) #endif +#ifndef HOST_NOT_FOUND +#define HOST_NOT_FOUND 1 +#endif + +#ifndef TRY_AGAIN +#define TRY_AGAIN 2 +#endif + +#ifndef NO_RECOVERY +#define NO_RECOVERY 3 +#endif + +#ifndef NO_DATA +#define NO_DATA 4 +#endif + +#ifndef NO_ADDRESS +#define NO_ADDRESS NO_DATA +#endif + +#if 0 + +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + size_t ai_addrlen; + char *ai_canonname; + struct sockaddr *ai_addr; + struct addrinfo *ai_next; +}; + +#define EAI_ADDRFAMILY 1 /* address family for nodename not supported */ +#define EAI_AGAIN 2 /* temporary failure in name resolution */ +#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ +#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ +#define EAI_FAMILY 5 /* ai_family not supported */ +#define EAI_MEMORY 6 /* memory allocation failure */ +#define EAI_NODATA 7 /* no address associated with nodename */ +#define EAI_NONAME 8 /* nodename nor servname provided, or not known */ +#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ +#define EAI_SYSTEM 11 /* system error returned in errno */ + +/* flags for getaddrinfo() */ + +#define AI_PASSIVE 0x01 +#define AI_CANONNAME 0x02 +#define AI_NUMERICHOST 0x04 + +#endif + #ifndef HAVE___ATTRIBUTE__ #define __attribute__(x) #endif