ze-filter  (ze-filter-0.8.0-develop-180218)
ze-dns-parse.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : Fri Oct 8 15:44:40 CEST 2004
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program 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.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 
25 #ifndef __ZE_DNS_PARSE_H
26 
33 #define MAX_HOST 128
34 
35 typedef struct DNS_HOST_T
36 {
37  int pref;
38  char *ip;
39  char *name;
40  char *txt;
41 } DNS_HOST_T;
42 
43 typedef struct DNS_HOSTARR_T
44 {
45  char *domain;
47  int count;
49 
51 
52 int dns_get_a(char *domain, DNS_HOSTARR_T *a);
53 
54 int dns_get_aaaa(char *domain, DNS_HOSTARR_T *a);
55 
56 int dns_get_mx(char *domain, DNS_HOSTARR_T *mx);
57 
58 void print_dns_reply(DNS_REPLY_T * r, int level);
59 
62 # define __ZE_DNS_PARSE_H 1
63 #endif /* __ZE_DNS_PARSE_H */
void dns_free_hostarr(DNS_HOSTARR_T *mx)
Definition: ze-dns-parse.c:89
int dns_get_mx(char *domain, DNS_HOSTARR_T *mx)
Definition: ze-dns-parse.c:357
struct DNS_HOSTARR_T DNS_HOSTARR_T
struct DNS_HOST_T DNS_HOST_T
#define MAX_HOST
Definition: ze-dns-parse.h:33
char * name
Definition: ze-dns-parse.h:39
int dns_get_a(char *domain, DNS_HOSTARR_T *a)
Definition: ze-dns-parse.c:153
char * ip
Definition: ze-dns-parse.h:38
void print_dns_reply(DNS_REPLY_T *r, int level)
Definition: ze-dns-parse.c:393
int dns_get_aaaa(char *domain, DNS_HOSTARR_T *a)
Definition: ze-dns-parse.c:226
char domain[]
char * txt
Definition: ze-dns-parse.h:40