diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-01-24 22:47:25 +0000 |
commit | fe856aa957978504137c1d425815d4ed8a22be40 (patch) | |
tree | a5bb46ce0e64b2056f75700eadbf27aba7c39418 /plugins/getaddrinfo.h | |
parent | 210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff) | |
download | monitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz |
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/getaddrinfo.h')
-rw-r--r-- | plugins/getaddrinfo.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/plugins/getaddrinfo.h b/plugins/getaddrinfo.h deleted file mode 100644 index d4115245..00000000 --- a/plugins/getaddrinfo.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #ifndef _getaddrinfo_h | ||
2 | #define _getaddrinfo_h | ||
3 | /* | ||
4 | * This file is part of libESMTP, a library for submission of RFC 2822 | ||
5 | * formatted electronic mail messages using the SMTP protocol described | ||
6 | * in RFC 2821. | ||
7 | * Modified by Jeremy T. Bouse for use in Nagios plugins | ||
8 | * | ||
9 | * Copyright (C) 2001,2002 Brian Stafford <brian@stafford.uklinux.net> | ||
10 | * | ||
11 | * This library is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU Lesser General Public | ||
13 | * License as published by the Free Software Foundation; either | ||
14 | * version 2.1 of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This library is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | * Lesser General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU Lesser General Public | ||
22 | * License along with this library; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 | */ | ||
25 | |||
26 | /* Structure and prototypes aken from RFC 2553 | ||
27 | * | ||
28 | * $Id$ | ||
29 | */ | ||
30 | |||
31 | struct addrinfo | ||
32 | { | ||
33 | int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ | ||
34 | int ai_family; /* PF_xxx */ | ||
35 | int ai_socktype; /* SOCK_xxx */ | ||
36 | int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ | ||
37 | size_t ai_addrlen; /* length of ai_addr */ | ||
38 | char *ai_canonname; /* canonical name for nodename */ | ||
39 | struct sockaddr *ai_addr; /* binary address */ | ||
40 | struct addrinfo *ai_next; /* next structure in linked list */ | ||
41 | }; | ||
42 | |||
43 | /* Supposed to be defined in <netdb.h> */ | ||
44 | #define AI_PASSIVE 1 /* Socket address is intended for `bind'. */ | ||
45 | #define AI_CANONNAME 2 /* Request for canonical name. */ | ||
46 | #define AI_NUMERICHOST 4 /* Don't use name resolution. */ | ||
47 | |||
48 | /* Supposed to be defined in <netdb.h> */ | ||
49 | #define EAI_ADDRFAMILY 1 /* address family for nodename not supported */ | ||
50 | #define EAI_AGAIN 2 /* temporary failure in name resolution */ | ||
51 | #define EAI_BADFLAGS 3 /* invalid value for ai_flags */ | ||
52 | #define EAI_FAIL 4 /* non-recoverable failure in name resolution */ | ||
53 | #define EAI_FAMILY 5 /* ai_family not supported */ | ||
54 | #define EAI_MEMORY 6 /* memory allocation failure */ | ||
55 | #define EAI_NODATA 7 /* no address associated with nodename */ | ||
56 | #define EAI_NONAME 8 /* nodename nor servname provided, or not known */ | ||
57 | #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ | ||
58 | #define EAI_SOCKTYPE 10 /* ai_socktype not supported */ | ||
59 | #define EAI_SYSTEM 11 /* system error returned in errno */ | ||
60 | |||
61 | /* RFC 2553 / Posix resolver */ | ||
62 | int getaddrinfo (const char *nodename, const char *servname, | ||
63 | const struct addrinfo *hints, struct addrinfo **res); | ||
64 | |||
65 | /* Free addrinfo structure and associated storage */ | ||
66 | void freeaddrinfo (struct addrinfo *ai); | ||
67 | |||
68 | /* Convert error return from getaddrinfo() to string */ | ||
69 | const char *gai_strerror (int code); | ||
70 | |||
71 | #endif | ||