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
commit5fc43723f988b12ed3bf3d9b055ca73cbadb98c5 (patch)
tree69e35d2ee6a608636b075a3caf124ffbd93e8fe6 /common/smtppass.h
parent1e72264ce076fd683f82a4216672a2171a4776c9 (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);