1 /*	$NetBSD: attr_clnt.h,v 1.3 2022/10/08 16:12:50 christos Exp $	*/
2 
3 #ifndef _ATTR_CLNT_H_INCLUDED_
4 #define _ATTR_CLNT_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	attr_clnt 3h
9 /* SUMMARY
10 /*	attribute query-reply client
11 /* SYNOPSIS
12 /*	#include <attr_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.h>
25 
26  /*
27   * External interface.
28   */
29 typedef struct ATTR_CLNT ATTR_CLNT;
30 typedef int (*ATTR_CLNT_PRINT_FN) (VSTREAM *, int, va_list);
31 typedef int (*ATTR_CLNT_SCAN_FN) (VSTREAM *, int, va_list);
32 typedef int (*ATTR_CLNT_HANDSHAKE_FN) (VSTREAM *);
33 
34 extern ATTR_CLNT *attr_clnt_create(const char *, int, int, int);
35 extern int attr_clnt_request(ATTR_CLNT *, int,...);
36 extern void attr_clnt_free(ATTR_CLNT *);
37 extern void attr_clnt_control(ATTR_CLNT *, int,...);
38 
39 #define ATTR_CLNT_CTL_END	0
40 #define ATTR_CLNT_CTL_PROTO	1	/* print/scan functions */
41 #define ATTR_CLNT_CTL_REQ_LIMIT	2	/* requests per connection */
42 #define ATTR_CLNT_CTL_TRY_LIMIT	3	/* attempts per request */
43 #define ATTR_CLNT_CTL_TRY_DELAY	4	/* pause between requests */
44 #define ATTR_CLNT_CTL_HANDSHAKE	5	/* handshake before first request */
45 
46 /* LICENSE
47 /* .ad
48 /* .fi
49 /*	The Secure Mailer license must be distributed with this software.
50 /* AUTHOR(S)
51 /*	Wietse Venema
52 /*	IBM T.J. Watson Research
53 /*	P.O. Box 704
54 /*	Yorktown Heights, NY 10598, USA
55 /*
56 /*	Wietse Venema
57 /*	Google, Inc.
58 /*	111 8th Avenue
59 /*	New York, NY 10011, USA
60 /*--*/
61 
62 #endif
63