/*++ /* NAME /* attr_print0 3 /* SUMMARY /* send attributes over byte stream /* SYNOPSIS /* #include <attr.h> /* /* int attr_print0(fp, flags, type, name, ..., ATTR_TYPE_END) /* VSTREAM fp; /* int flags; /* int type; /* char *name; /* /* int attr_vprint0(fp, flags, ap) /* VSTREAM fp; /* int flags; /* va_list ap; /* DESCRIPTION /* attr_print0() takes zero or more (name, value) simple attributes /* and converts its input to a byte stream that can be recovered with /* attr_scan0(). The stream is not flushed. /* /* attr_vprint0() provides an alternate interface that is convenient /* for calling from within variadic functions. /* /* Attributes are sent in the requested order as specified with the /* attr_print0() argument list. This routine satisfies the formatting /* rules as outlined in attr_scan0(3). /* /* Arguments: /* .IP fp /* Stream to write the result to. /* .IP flags /* The bit-wise OR of zero or more of the following. /* .RS /* .IP ATTR_FLAG_MORE /* After sending the requested attributes, leave the output stream in /* a state that is usable for more attribute sending operations on /* the same output attribute list. /* By default, attr_print0() automatically appends an attribute list /* terminator when it has sent the last requested attribute. /* .RE /* .IP List of attributes followed by terminator: /* .RS /* .IP "SEND_ATTR_INT(const char *name, int value)" /* The arguments are an attribute name and an integer. /* .IP "SEND_ATTR_LONG(const char *name, long value)" /* The arguments are an attribute name and a long integer. /* .IP "SEND_ATTR_STR(const char *name, const char *value)" /* The arguments are an attribute name and a null-terminated /* string. /* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)" /* The arguments are an attribute name, an attribute value /* length, and an attribute value pointer. /* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)" /* The arguments are a function pointer and generic data /* pointer. The caller-specified function returns whatever the /* specified attribute printing function returns. /* .IP "SEND_ATTR_HASH(const HTABLE *table)" /* .IP "SEND_ATTR_NAMEVAL(const NVTABLE *table)" /* The content of the table is sent as a sequence of string-valued /* attributes with names equal to the table lookup keys. /* .IP ATTR_TYPE_END /* This terminates the attribute list. /* .RE /* DIAGNOSTICS /* The result value is 0 in case of success, VSTREAM_EOF in case /* of trouble. /* /* Panic: interface violation. All system call errors are fatal. /* SEE ALSO /* attr_scan0(3) recover attributes from byte stream /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.