diff options
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 225 |
1 files changed, 111 insertions, 114 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index c95bbe25a34..ca4a489cb89 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.218 2011/04/17 12:46:46 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.219 2011/04/17 13:36:07 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -926,8 +926,8 @@ struct queue_backend { struct envelope *); }; -extern void (*imsg_callback)(struct smtpd *, struct imsgev *, struct imsg *); +extern void (*imsg_callback)(struct smtpd *, struct imsgev *, struct imsg *); /* aliases.c */ @@ -951,32 +951,34 @@ void bounce_event(int, short, void *); /* config.c */ -#define PURGE_LISTENERS 0x01 -#define PURGE_MAPS 0x02 -#define PURGE_RULES 0x04 -#define PURGE_SSL 0x08 -#define PURGE_EVERYTHING 0xff -void purge_config(struct smtpd *, u_int8_t); -void unconfigure(struct smtpd *); -void configure(struct smtpd *); -void init_pipes(struct smtpd *); -void config_pipes(struct smtpd *, struct peer *, u_int); -void config_peers(struct smtpd *, struct peer *, u_int); +#define PURGE_LISTENERS 0x01 +#define PURGE_MAPS 0x02 +#define PURGE_RULES 0x04 +#define PURGE_SSL 0x08 +#define PURGE_EVERYTHING 0xff +void purge_config(struct smtpd *, u_int8_t); +void unconfigure(struct smtpd *); +void configure(struct smtpd *); +void init_pipes(struct smtpd *); +void config_pipes(struct smtpd *, struct peer *, u_int); +void config_peers(struct smtpd *, struct peer *, u_int); /* control.c */ -pid_t control(struct smtpd *); -void session_socket_blockmode(int, enum blockmodes); -void session_socket_no_linger(int); -int session_socket_error(int); +pid_t control(struct smtpd *); +void session_socket_blockmode(int, enum blockmodes); +void session_socket_no_linger(int); +int session_socket_error(int); /* dns.c */ -void dns_query_host(struct smtpd *, char *, int, u_int64_t); -void dns_query_mx(struct smtpd *, char *, int, u_int64_t); -void dns_query_ptr(struct smtpd *, struct sockaddr_storage *, +void dns_query_host(struct smtpd *, char *, int, u_int64_t); +void dns_query_mx(struct smtpd *, char *, int, u_int64_t); +void dns_query_ptr(struct smtpd *, struct sockaddr_storage *, u_int64_t); -void dns_async(struct smtpd *, struct imsgev *, int, struct dns *); +void dns_async(struct smtpd *, struct imsgev *, int, struct dns *); +int dnssession_cmp(struct dnssession *, struct dnssession *); +SPLAY_PROTOTYPE(dnstree, dnssession, nodes, dnssession_cmp); /* enqueue.c */ @@ -999,84 +1001,81 @@ int forwards_get(int, struct expandtree *); /* lka.c */ -pid_t lka(struct smtpd *); -int lkasession_cmp(struct lkasession *, struct lkasession *); -int dnssession_cmp(struct dnssession *, struct dnssession *); +pid_t lka(struct smtpd *); +int lkasession_cmp(struct lkasession *, struct lkasession *); SPLAY_PROTOTYPE(lkatree, lkasession, nodes, lkasession_cmp); -SPLAY_PROTOTYPE(dnstree, dnssession, nodes, dnssession_cmp); /* map.c */ -void *map_lookup(struct smtpd *, objid_t, char *, enum map_kind); -struct map *map_find(struct smtpd *, objid_t); -struct map *map_findbyname(struct smtpd *, const char *); - +void *map_lookup(struct smtpd *, objid_t, char *, enum map_kind); +struct map *map_find(struct smtpd *, objid_t); +struct map *map_findbyname(struct smtpd *, const char *); /* mda.c */ -pid_t mda(struct smtpd *); +pid_t mda(struct smtpd *); /* mfa.c */ -pid_t mfa(struct smtpd *); +pid_t mfa(struct smtpd *); /* mta.c */ -pid_t mta(struct smtpd *); -int mta_session_cmp(struct mta_session *, struct mta_session *); +pid_t mta(struct smtpd *); +int mta_session_cmp(struct mta_session *, struct mta_session *); SPLAY_PROTOTYPE(mtatree, mta_session, entry, mta_session_cmp); /* parse.y */ -int parse_config(struct smtpd *, const char *, int); -int cmdline_symset(char *); +int parse_config(struct smtpd *, const char *, int); +int cmdline_symset(char *); /* queue.c */ -pid_t queue(struct smtpd *); -void queue_submit_envelope(struct smtpd *, struct envelope *); -void queue_commit_envelopes(struct smtpd *, struct envelope *); +pid_t queue(struct smtpd *); +void queue_submit_envelope(struct smtpd *, struct envelope *); +void queue_commit_envelopes(struct smtpd *, struct envelope *); /* queue_backend.c */ struct queue_backend *queue_backend_lookup(enum queue_type); -int queue_message_create(struct smtpd *, enum queue_kind, u_int32_t *); -int queue_message_delete(struct smtpd *, enum queue_kind, u_int32_t); -int queue_message_commit(struct smtpd *, enum queue_kind, u_int32_t); -int queue_message_fd_r(struct smtpd *, enum queue_kind, u_int32_t); -int queue_message_fd_rw(struct smtpd *, enum queue_kind, u_int32_t); -int queue_message_purge(struct smtpd *, enum queue_kind, u_int32_t); -int queue_envelope_create(struct smtpd *, enum queue_kind, +int queue_message_create(struct smtpd *, enum queue_kind, u_int32_t *); +int queue_message_delete(struct smtpd *, enum queue_kind, u_int32_t); +int queue_message_commit(struct smtpd *, enum queue_kind, u_int32_t); +int queue_message_fd_r(struct smtpd *, enum queue_kind, u_int32_t); +int queue_message_fd_rw(struct smtpd *, enum queue_kind, u_int32_t); +int queue_message_purge(struct smtpd *, enum queue_kind, u_int32_t); +int queue_envelope_create(struct smtpd *, enum queue_kind, struct envelope *); -int queue_envelope_delete(struct smtpd *, enum queue_kind, +int queue_envelope_delete(struct smtpd *, enum queue_kind, struct envelope *); -int queue_envelope_load(struct smtpd *, enum queue_kind, +int queue_envelope_load(struct smtpd *, enum queue_kind, u_int64_t, struct envelope *); -int queue_envelope_update(struct smtpd *, enum queue_kind, +int queue_envelope_update(struct smtpd *, enum queue_kind, struct envelope *); /* queue_shared.c */ -void queue_message_update(struct smtpd *, struct envelope *); +void queue_message_update(struct smtpd *, struct envelope *); struct qwalk *qwalk_new(char *); -int qwalk(struct qwalk *, char *); -void qwalk_close(struct qwalk *); -int bounce_record_message(struct smtpd *, struct envelope *, struct envelope *); -void show_queue(char *, int); +int qwalk(struct qwalk *, char *); +void qwalk_close(struct qwalk *); +int bounce_record_message(struct smtpd *, struct envelope *, struct envelope *); +void show_queue(char *, int); /* ramqueue.c */ -void ramqueue_init(struct smtpd *, struct ramqueue *); -int ramqueue_load(struct ramqueue *, time_t *); -int ramqueue_load_offline(struct ramqueue *); -int ramqueue_host_cmp(struct ramqueue_host *, struct ramqueue_host *); -void ramqueue_remove(struct ramqueue *, struct ramqueue_envelope *); -int ramqueue_is_empty(struct ramqueue *); -int ramqueue_is_empty(struct ramqueue *); -int ramqueue_batch_is_empty(struct ramqueue_batch *); -int ramqueue_host_is_empty(struct ramqueue_host *); -void ramqueue_remove_batch(struct ramqueue_host *, struct ramqueue_batch *); -void ramqueue_remove_host(struct ramqueue *, struct ramqueue_host *); +void ramqueue_init(struct smtpd *, struct ramqueue *); +int ramqueue_load(struct ramqueue *, time_t *); +int ramqueue_load_offline(struct ramqueue *); +int ramqueue_host_cmp(struct ramqueue_host *, struct ramqueue_host *); +void ramqueue_remove(struct ramqueue *, struct ramqueue_envelope *); +int ramqueue_is_empty(struct ramqueue *); +int ramqueue_is_empty(struct ramqueue *); +int ramqueue_batch_is_empty(struct ramqueue_batch *); +int ramqueue_host_is_empty(struct ramqueue_host *); +void ramqueue_remove_batch(struct ramqueue_host *, struct ramqueue_batch *); +void ramqueue_remove_host(struct ramqueue *, struct ramqueue_host *); struct ramqueue_envelope *ramqueue_first_envelope(struct ramqueue *); struct ramqueue_envelope *ramqueue_next_envelope(struct ramqueue *); struct ramqueue_envelope *ramqueue_batch_first_envelope(struct ramqueue_batch *); @@ -1084,45 +1083,43 @@ RB_PROTOTYPE(hosttree, ramqueue_host, host_entry, ramqueue_host_cmp); /* runner.c */ -pid_t runner(struct smtpd *); -void message_reset_flags(struct envelope *); +pid_t runner(struct smtpd *); +void message_reset_flags(struct envelope *); /* smtp.c */ -pid_t smtp(struct smtpd *); -void smtp_resume(struct smtpd *); +pid_t smtp(struct smtpd *); +void smtp_resume(struct smtpd *); /* smtp_session.c */ -void session_init(struct listener *, struct session *); -int session_cmp(struct session *, struct session *); -void session_pickup(struct session *, struct submit_status *); -void session_destroy(struct session *); -void session_respond(struct session *, char *, ...) - __attribute__ ((format (printf, 2, 3))); -void session_bufferevent_new(struct session *); - +void session_init(struct listener *, struct session *); +int session_cmp(struct session *, struct session *); +void session_pickup(struct session *, struct submit_status *); +void session_destroy(struct session *); +void session_respond(struct session *, char *, ...) + __attribute__ ((format (printf, 2, 3))); +void session_bufferevent_new(struct session *); SPLAY_PROTOTYPE(sessiontree, session, s_nodes, session_cmp); /* smtpd.c */ int child_cmp(struct child *, struct child *); +void imsg_event_add(struct imsgev *); +void imsg_compose_event(struct imsgev *, u_int16_t, u_int32_t, pid_t, + int, void *, u_int16_t); +void imsg_dispatch(int, short, void *); SPLAY_PROTOTYPE(childtree, child, entry, child_cmp); -void imsg_event_add(struct imsgev *); -void imsg_compose_event(struct imsgev *, u_int16_t, u_int32_t, pid_t, - int, void *, u_int16_t); -void imsg_dispatch(int, short, void *); /* ssl.c */ -void ssl_init(void); -void ssl_transaction(struct session *); - -void ssl_session_init(struct session *); -void ssl_session_destroy(struct session *); -int ssl_load_certfile(struct smtpd *, const char *, u_int8_t); -void ssl_setup(struct smtpd *, struct listener *); -int ssl_cmp(struct ssl *, struct ssl *); +void ssl_init(void); +void ssl_transaction(struct session *); +void ssl_session_init(struct session *); +void ssl_session_destroy(struct session *); +int ssl_load_certfile(struct smtpd *, const char *, u_int8_t); +void ssl_setup(struct smtpd *, struct listener *); +int ssl_cmp(struct ssl *, struct ssl *); SPLAY_PROTOTYPE(ssltree, ssl, ssl_nodes, ssl_cmp); @@ -1138,29 +1135,29 @@ struct arglist { u_int num; u_int nalloc; }; -void addargs(arglist *, char *, ...) - __attribute__((format(printf, 2, 3))); -int bsnprintf(char *, size_t, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -int safe_fclose(FILE *); -int hostname_match(char *, char *); -int recipient_to_path(struct path *, char *); -int valid_localpart(char *); -int valid_domainpart(char *); -char *ss_to_text(struct sockaddr_storage *); -int valid_message_id(char *); -int valid_message_uid(char *); -char *time_to_text(time_t); -int secure_file(int, char *, struct passwd *, int); -void lowercase(char *, char *, size_t); -void message_set_errormsg(struct envelope *, char *, ...); -char *message_get_errormsg(struct envelope *); -void sa_set_port(struct sockaddr *, int); -struct path *path_dup(struct path *); -u_int64_t generate_uid(void); -void fdlimit(double); -int availdesc(void); -u_int32_t evpid_to_msgid(u_int64_t); -u_int64_t msgid_to_evpid(u_int32_t); -u_int32_t filename_to_msgid(char *); -u_int64_t filename_to_evpid(char *); +void addargs(arglist *, char *, ...) + __attribute__((format(printf, 2, 3))); +int bsnprintf(char *, size_t, const char *, ...) + __attribute__ ((format (printf, 3, 4))); +int safe_fclose(FILE *); +int hostname_match(char *, char *); +int recipient_to_path(struct path *, char *); +int valid_localpart(char *); +int valid_domainpart(char *); +char *ss_to_text(struct sockaddr_storage *); +int valid_message_id(char *); +int valid_message_uid(char *); +char *time_to_text(time_t); +int secure_file(int, char *, struct passwd *, int); +void lowercase(char *, char *, size_t); +void message_set_errormsg(struct envelope *, char *, ...); +char *message_get_errormsg(struct envelope *); +void sa_set_port(struct sockaddr *, int); +struct path *path_dup(struct path *); +u_int64_t generate_uid(void); +void fdlimit(double); +int availdesc(void); +u_int32_t evpid_to_msgid(u_int64_t); +u_int64_t msgid_to_evpid(u_int32_t); +u_int32_t filename_to_msgid(char *); +u_int64_t filename_to_evpid(char *); |