Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / mail_command_server.c
blob194e8bf1d172d6742c5204d9d9105ea303ff2643
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* mail_command_server 3
6 /* SUMMARY
7 /* single-command server
8 /* SYNOPSIS
9 /* #include <mail_proto.h>
11 /* int mail_command_server(stream, type, name, ...)
12 /* VSTREAM *stream;
13 /* int type;
14 /* const char *name;
15 /* DESCRIPTION
16 /* This module implements the server interface for single-command
17 /* requests: a clients sends a single command and expects a single
18 /* completion status code.
20 /* Arguments:
21 /* .IP stream
22 /* Server endpoint.
23 /* .IP "type, name, ..."
24 /* Attribute list as defined in attr_scan(3).
25 /* DIAGNOSTICS
26 /* Fatal: out of memory.
27 /* SEE ALSO
28 /* attr_scan(3)
29 /* mail_command_client(3) client interface
30 /* mail_proto(3h), client-server protocol
31 #include <mail_proto.h>
32 /* LICENSE
33 /* .ad
34 /* .fi
35 /* The Secure Mailer license must be distributed with this software.
36 /* AUTHOR(S)
37 /* Wietse Venema
38 /* IBM T.J. Watson Research
39 /* P.O. Box 704
40 /* Yorktown Heights, NY 10598, USA
41 /*--*/
43 /* System library. */
45 #include <sys_defs.h>
46 #include <stdlib.h> /* 44BSD stdarg.h uses abort() */
47 #include <stdarg.h>
48 #include <string.h>
50 /* Utility library. */
52 #include <vstream.h>
54 /* Global library. */
56 #include "mail_proto.h"
58 /* mail_command_server - read single-command request */
60 int mail_command_server(VSTREAM *stream,...)
62 va_list ap;
63 int count;
65 va_start(ap, stream);
66 count = attr_vscan(stream, ATTR_FLAG_MISSING, ap);
67 va_end(ap);
68 return (count);