diff options
| author | Sam Varshavchik | 2013-08-19 16:39:41 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2013-08-25 14:43:51 -0400 | 
| commit | 9c45d9ad13fdf439d44d7443ae75da15ea0223ed (patch) | |
| tree | 7a81a04cb51efb078ee350859a64be2ebc6b8813 /rfc1035/rfc1035mxlist.h | |
| parent | a9520698b770168d1f33d6301463bb70a19655ec (diff) | |
| download | courier-libs-9c45d9ad13fdf439d44d7443ae75da15ea0223ed.tar.bz2 | |
Initial checkin
Imported from subversion report, converted to git. Updated all paths in
scripts and makefiles, reflecting the new directory hierarchy.
Diffstat (limited to 'rfc1035/rfc1035mxlist.h')
| -rw-r--r-- | rfc1035/rfc1035mxlist.h | 57 | 
1 files changed, 57 insertions, 0 deletions
| diff --git a/rfc1035/rfc1035mxlist.h b/rfc1035/rfc1035mxlist.h new file mode 100644 index 0000000..e4349b8 --- /dev/null +++ b/rfc1035/rfc1035mxlist.h @@ -0,0 +1,57 @@ +#ifndef	rfc1035_mx_h +#define	rfc1035_mx_h + +/* +** Copyright 1998 - 1999 Double Precision, Inc. +** See COPYING for distribution information. +*/ + +#if	HAVE_CONFIG_H +#include "config.h" +#endif + +#include	<sys/types.h> +#include	<netinet/in.h> +#include	<arpa/inet.h> + + +#ifdef  __cplusplus +extern "C" { +#endif + +#define	RFC1035_MX_OK		0	/* Ok, records follow */ +#define	RFC1035_MX_SOFTERR	1	/* Soft DNS error */ +#define	RFC1035_MX_HARDERR	2	/* Hard DNS error */ +#define	RFC1035_MX_INTERNAL	3	/* Internal library error */ +#define	RFC1035_MX_BADDNS	4	/* Bad DNS records */ + +struct rfc1035_mxlist { +	struct rfc1035_mxlist *next; +	int	protocol; +#if	RFC1035_IPV6 +	struct sockaddr_storage address; +#else +	struct sockaddr address; +#endif +	int priority;	/* -1 for plain old A records */ +	int ad; +	char *hostname; +	} ; + +struct rfc1035_res; + +int rfc1035_mxlist_create(struct rfc1035_res *, +	const char *, struct rfc1035_mxlist **); +void rfc1035_mxlist_free(struct rfc1035_mxlist *); + +int rfc1035_mxlist_create_x(struct rfc1035_res *, +			    const char *, int, +			    struct rfc1035_mxlist **); +#define RFC1035_MX_AFALLBACK 1 +#define RFC1035_MX_IGNORESOFTERR 2 + +#ifdef  __cplusplus +} +#endif + +#endif | 
