aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmail-remote/qmail-remote.h
blob: 80593441d3da084c4ffe7668cf6b7e83771df66f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ISC license. */

#ifndef QMAIL_REMOTE_H
#define QMAIL_REMOTE_H

#include <stddef.h>
#include <stdint.h>

#include <skalibs/cdb.h>
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>

#include "qmailr.h"

#define dienomem() qmailr_tempsys("Unable to grow stralloc")


/* dns */

typedef struct mxip_s mxip, *mxip_ref ;
struct mxip_s
{
  size_t pos4 ;
  size_t pos6 ;
  uint16_t n4 ;
  uint16_t n6 ;
} ;
#define MXIP_ZERO { 0 }

extern void dns_stuff (char const *, char const *const *, unsigned int, size_t *, genalloc *, stralloc *, unsigned int, char const *, unsigned int, char const *, unsigned int, uint32_t) ;


/* smtproutes */

typedef struct smtproutes_s smtproutes ;
struct smtproutes_s
{
  cdb map ;
} ;
#define SMTPROUTES_ZERO { .map = CDB_ZERO }

extern int smtproutes_init (smtproutes *) ;
extern int smtproutes_match (smtproutes const *, char const *, stralloc *, size_t *, uint16_t *) ;
extern void smtproutes_free (smtproutes *) ;

#endif