From 5fc43723f988b12ed3bf3d9b055ca73cbadb98c5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 22 Oct 2004 17:05:22 +0000 Subject: - Added CLIENT and SERVER variables to VirusAction script environment. - Even better logging for network errors. --- common/smtppass.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/smtppass.h') diff --git a/common/smtppass.h b/common/smtppass.h index 34758ba..418686e 100644 --- a/common/smtppass.h +++ b/common/smtppass.h @@ -67,6 +67,7 @@ typedef struct spio int fd; /* The file descriptor wrapped */ const char* name; /* The name for logging */ time_t last_action; /* Time of last action on descriptor */ + char peername[MAXPATHLEN]; /* Name of the peer on other side of socket */ /* Internal use only */ char line[SP_LINE_LENGTH]; @@ -77,9 +78,12 @@ spio_t; #define spio_valid(io) ((io)->fd != -1) -/* Setup the io structure (allocated elsewhere */ +/* Setup the io structure (allocated elsewhere) */ void spio_init(spio_t* io, const char* name); +/* Attach an open descriptor to a socket, optionally returning the peer */ +void spio_attach(struct spctx* ctx, spio_t* io, int fd, struct sockaddr_any* peer); + /* Connect and disconnect from sockets */ int spio_connect(struct spctx* ctx, spio_t* io, const struct sockaddr_any* sany, const char* addrname); void spio_disconnect(struct spctx* ctx, spio_t* io); -- cgit v1.2.3