Postfix3.3.1
mkmap_proxy.c
[詳解]
1 /*++
2 /* NAME
3 /* mkmap_proxy 3
4 /* SUMMARY
5 /* create or proxied database
6 /* SYNOPSIS
7 /* #include <mkmap.h>
8 /*
9 /* MKMAP *mkmap_proxy_open(path)
10 /* const char *path;
11 /* DESCRIPTION
12 /* This module implements support for updating proxy databases.
13 /*
14 /* mkmap_proxy_open() is a proxymap-specific helper for the
15 /* more general mkmap_open() routine.
16 /*
17 /* All errors are fatal.
18 /* SEE ALSO
19 /* dict_proxy(3), proxy client interface.
20 /* LICENSE
21 /* .ad
22 /* .fi
23 /* The Secure Mailer license must be distributed with this software.
24 /* AUTHOR(S)
25 /* Wietse Venema
26 /* IBM T.J. Watson Research
27 /* P.O. Box 704
28 /* Yorktown Heights, NY 10598, USA
29 /*--*/
30 
31 /* System library. */
32 
33 #include <sys_defs.h>
34 
35 /* Utility library. */
36 
37 #include <mymalloc.h>
38 #include <dict_proxy.h>
39 
40 /* Application-specific. */
41 
42 #include "mkmap.h"
43 
44 /* mkmap_proxy_open - create or open database */
45 
46 MKMAP *mkmap_proxy_open(const char *unused_path)
47 {
48  MKMAP *mkmap = (MKMAP *) mymalloc(sizeof(*mkmap));
49 
50  /*
51  * Fill in the generic members.
52  */
53  mkmap->open = dict_proxy_open;
54  mkmap->after_open = 0;
55  mkmap->after_close = 0;
56 
57  return (mkmap);
58 }
void(* after_open)(struct MKMAP *)
Definition: mkmap.h:28
void(* after_close)(struct MKMAP *)
Definition: mkmap.h:29
DICT * dict_proxy_open(const char *map, int open_flags, int dict_flags)
Definition: dict_proxy.c:396
MKMAP * mkmap_proxy_open(const char *unused_path)
Definition: mkmap_proxy.c:46
Definition: mkmap.h:25
DICT_OPEN_FN open
Definition: mkmap.h:26
void * mymalloc(ssize_t len)
Definition: mymalloc.c:150