summaryrefslogtreecommitdiff
path: root/common/smtppass.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-10-22 17:05:22 +0000
committerStef Walter <stef@memberwebs.com>2004-10-22 17:05:22 +0000
commitd307d5223331734cc17f698c2d3736fad94b0e91 (patch)
tree09359d4e88fda30541b5e4909b27686b25f800cf /common/smtppass.h
parent778275a763acdd16cdf9f2ce825b98b01e3b1222 (diff)
- Added CLIENT and SERVER variables to VirusAction script environment.
- Even better logging for network errors.
Diffstat (limited to 'common/smtppass.h')
-rw-r--r--common/smtppass.h6
1 files changed, 5 insertions, 1 deletions
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);