1 /* $NetBSD: smtp_stream.h,v 1.1.1.1 2009/06/23 10:08:48 tron Exp $ */ 2 3 #ifndef _SMTP_STREAM_H_INCLUDED_ 4 #define _SMTP_STREAM_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* smtp_stream 3h 9 /* SUMMARY 10 /* smtp stream I/O support 11 /* SYNOPSIS 12 /* #include <smtp_stream.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * System library. 18 */ 19 #include <stdarg.h> 20 #include <setjmp.h> 21 22 /* 23 * Utility library. 24 */ 25 #include <vstring.h> 26 #include <vstream.h> 27 28 /* 29 * External interface. The following codes are meant for use in longjmp(), 30 * so they must all be non-zero. 31 */ 32 #define SMTP_ERR_EOF 1 /* unexpected client disconnect */ 33 #define SMTP_ERR_TIME 2 /* time out */ 34 #define SMTP_ERR_QUIET 3 /* silent cleanup (application) */ 35 #define SMTP_ERR_NONE 4 /* non-error case */ 36 37 extern void smtp_timeout_setup(VSTREAM *, int); 38 extern void PRINTFLIKE(2, 3) smtp_printf(VSTREAM *, const char *,...); 39 extern void smtp_flush(VSTREAM *); 40 extern int smtp_fgetc(VSTREAM *); 41 extern int smtp_get(VSTRING *, VSTREAM *, ssize_t); 42 extern void smtp_fputs(const char *, ssize_t len, VSTREAM *); 43 extern void smtp_fwrite(const char *, ssize_t len, VSTREAM *); 44 extern void smtp_fputc(int, VSTREAM *); 45 46 extern void smtp_vprintf(VSTREAM *, const char *, va_list); 47 48 /* LICENSE 49 /* .ad 50 /* .fi 51 /* The Secure Mailer license must be distributed with this software. 52 /* AUTHOR(S) 53 /* Wietse Venema 54 /* IBM T.J. Watson Research 55 /* P.O. Box 704 56 /* Yorktown Heights, NY 10598, USA 57 /*--*/ 58 59 #endif 60