aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmail-remote/qmail-remote.h
blob: ad36d8827480d039602b1808dc823f485b236fb5 (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
47
48
49
50
51
/* ISC license. */

#ifndef QMAIL_REMOTE_H
#define QMAIL_REMOTE_H

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

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

#include "qmailr.h"

#define dienomem() qmailr_tempusys("stralloc_catb")


/* dns */

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

extern unsigned int 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 *) ;


extern void run_tls (int, char const *, unsigned int, unsigned int, qmailr_tls const *, size_t, size_t const *, unsigned int, size_t, char const *) gccattr_noreturn ;

#endif