diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-13 22:02:56 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-13 22:02:56 +0000 |
commit | a667cad6a34b7efa8b53891858ff5c77800b7813 (patch) | |
tree | 133d5ec6b4b43d4bf170a366fe97fea488aea75c /usr.sbin/smtpd/smtpd.h | |
parent | fcdbb6f81071cffc3aed63cc4af0907fcd70ebef (diff) |
Use safe fd limits in smtp, lka, queue, and control. Removes a
possibility for fd-starvation fatal when under heavy load.
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 43830fb1492..9d97d541903 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.160 2009/12/12 10:33:11 jacekm Exp $ */ +/* $OpenBSD: smtpd.h,v 1.161 2009/12/13 22:02:55 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -673,6 +673,11 @@ struct s_mda { size_t write_error; }; +struct s_control { + size_t sessions; + size_t sessions_active; +}; + struct stats { struct s_parent parent; struct s_queue queue; @@ -680,6 +685,7 @@ struct stats { struct s_session mta; struct s_mda mda; struct s_session smtp; + struct s_control control; }; struct sched { @@ -937,6 +943,7 @@ SPLAY_PROTOTYPE(batchtree, batch, b_nodes, batch_cmp); /* smtp.c */ pid_t smtp(struct smtpd *); +void smtp_resume(struct smtpd *); /* smtp_session.c */ void session_init(struct listener *, struct session *); @@ -1012,3 +1019,5 @@ char *message_get_errormsg(struct message *); void sa_set_port(struct sockaddr *, int); struct path *path_dup(struct path *); u_int64_t generate_uid(void); +void fdlimit(int); +int availdesc(void); |