xref: /netbsd-src/external/ibm-public/postfix/dist/src/global/anvil_clnt.h (revision f14316bcbc544b96a93e884bc5c2b15fd60e22ae)
1 /*	$NetBSD: anvil_clnt.h,v 1.1.1.1 2009/06/23 10:08:45 tron Exp $	*/
2 
3 #ifndef _ANVIL_CLNT_H_INCLUDED_
4 #define _ANVIL_CLNT_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	anvil_clnt 3h
9 /* SUMMARY
10 /*	connection count and rate management client interface
11 /* SYNOPSIS
12 /*	#include <anvil_clnt.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * System library.
18   */
19 #include <stdarg.h>
20 
21  /*
22   * Utility library.
23   */
24 #include <attr_clnt.h>
25 
26  /*
27   * Protocol interface: requests and endpoints.
28   */
29 #define ANVIL_SERVICE		"anvil"
30 #define ANVIL_CLASS		"private"
31 
32 #define ANVIL_ATTR_REQ		"request"
33 #define ANVIL_REQ_CONN		"connect"
34 #define ANVIL_REQ_DISC		"disconnect"
35 #define ANVIL_REQ_MAIL		"message"
36 #define ANVIL_REQ_RCPT		"recipient"
37 #define ANVIL_REQ_NTLS		"newtls"
38 #define ANVIL_REQ_NTLS_STAT	"newtls_status"
39 #define ANVIL_REQ_LOOKUP	"lookup"
40 #define ANVIL_ATTR_IDENT	"ident"
41 #define ANVIL_ATTR_COUNT	"count"
42 #define ANVIL_ATTR_RATE		"rate"
43 #define ANVIL_ATTR_MAIL		"mail"
44 #define ANVIL_ATTR_RCPT		"rcpt"
45 #define ANVIL_ATTR_NTLS		"newtls"
46 #define ANVIL_ATTR_STATUS	"status"
47 
48 #define ANVIL_STAT_OK		0
49 #define ANVIL_STAT_FAIL		(-1)
50 
51  /*
52   * Functional interface.
53   */
54 typedef struct ANVIL_CLNT ANVIL_CLNT;
55 
56 extern ANVIL_CLNT *anvil_clnt_create(void);
57 extern int anvil_clnt_connect(ANVIL_CLNT *, const char *, const char *, int *, int *);
58 extern int anvil_clnt_mail(ANVIL_CLNT *, const char *, const char *, int *);
59 extern int anvil_clnt_rcpt(ANVIL_CLNT *, const char *, const char *, int *);
60 extern int anvil_clnt_newtls(ANVIL_CLNT *, const char *, const char *, int *);
61 extern int anvil_clnt_newtls_stat(ANVIL_CLNT *, const char *, const char *, int *);
62 extern int anvil_clnt_lookup(ANVIL_CLNT *, const char *, const char *, int *, int *, int *, int *, int *);
63 extern int anvil_clnt_disconnect(ANVIL_CLNT *, const char *, const char *);
64 extern void anvil_clnt_free(ANVIL_CLNT *);
65 
66 /* LICENSE
67 /* .ad
68 /* .fi
69 /*	The Secure Mailer license must be distributed with this software.
70 /* AUTHOR(S)
71 /*	Wietse Venema
72 /*	IBM T.J. Watson Research
73 /*	P.O. Box 704
74 /*	Yorktown Heights, NY 10598, USA
75 /*--*/
76 
77 #endif
78