|
@@ -75,4 +75,31 @@ extern int h_errno;
|
|
#define NO_RECOVERY 103
|
|
#define NO_RECOVERY 103
|
|
#define TRY_AGAIN 104
|
|
#define TRY_AGAIN 104
|
|
|
|
|
|
|
|
+struct addrinfo {
|
|
|
|
+ int ai_flags;
|
|
|
|
+ int ai_family;
|
|
|
|
+ int ai_socktype;
|
|
|
|
+ int ai_protocol;
|
|
|
|
+ socklen_t ai_addrlen;
|
|
|
|
+ struct sockaddr* ai_addr;
|
|
|
|
+ char* ai_canonname;
|
|
|
|
+ struct addrinfo* ai_next;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+#define EAI_ADDRFAMILY 1
|
|
|
|
+#define EAI_AGAIN 2
|
|
|
|
+#define EAI_BADFLAGS 3
|
|
|
|
+#define EAI_FAIL 4
|
|
|
|
+#define EAI_FAMILY 5
|
|
|
|
+#define EAI_MEMORY 6
|
|
|
|
+#define EAI_NODATA 7
|
|
|
|
+#define EAI_NONAME 8
|
|
|
|
+#define EAI_SERVICE 9
|
|
|
|
+#define EAI_SOCKTYPE 10
|
|
|
|
+#define EAI_SYSTEM 11
|
|
|
|
+
|
|
|
|
+int getaddrinfo(const char* __restrict node, const char* __restrict service, const struct addrinfo* __restrict hints, struct addrinfo** __restrict res);
|
|
|
|
+void freeaddrinfo(struct addrinfo* res);
|
|
|
|
+const char* gai_strerror(int errcode);
|
|
|
|
+
|
|
__END_DECLS
|
|
__END_DECLS
|