~ubuntu-branches/ubuntu/wily/dovecot/wily-proposed

« back to all changes in this revision

Viewing changes to src/master/common.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-08-02 14:00:15 UTC
  • mto: (1.11.1 upstream) (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080802140015-zbmjsgoodeyc9z4s
Tags: upstream-1.1.2
ImportĀ upstreamĀ versionĀ 1.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __COMMON_H
2
 
#define __COMMON_H
 
1
#ifndef COMMON_H
 
2
#define COMMON_H
3
3
 
4
4
struct ip_addr;
5
5
 
6
6
#include "lib.h"
7
 
#include "hash.h"
8
7
#include "master-settings.h"
9
8
 
10
 
enum process_type {
11
 
        PROCESS_TYPE_UNKNOWN,
12
 
        PROCESS_TYPE_AUTH,
13
 
        PROCESS_TYPE_AUTH_WORKER,
14
 
        PROCESS_TYPE_LOGIN,
15
 
        PROCESS_TYPE_IMAP,
16
 
        PROCESS_TYPE_POP3,
17
 
        PROCESS_TYPE_SSL_PARAM,
18
 
        PROCESS_TYPE_DICT,
19
 
 
20
 
        PROCESS_TYPE_MAX
21
 
};
22
 
 
23
9
extern struct ioloop *ioloop;
24
 
extern struct hash_table *pids;
25
10
extern int null_fd, inetd_login_fd;
26
11
extern uid_t master_uid;
27
12
extern char program_path[];
28
 
extern const char *process_names[];
29
13
extern char ssl_manual_key_password[];
 
14
extern const char *env_tz;
 
15
#ifdef DEBUG
 
16
extern bool gdb;
 
17
#endif
30
18
 
31
19
#define IS_INETD() \
32
20
        (inetd_login_fd != -1)
33
21
 
34
 
/* processes */
35
 
#define PID_GET_PROCESS_TYPE(pid) \
36
 
        POINTER_CAST_TO(hash_lookup(pids, POINTER_CAST(pid)), pid_t)
37
 
 
38
 
#define PID_ADD_PROCESS_TYPE(pid, type) \
39
 
        hash_insert(pids, POINTER_CAST(pid), POINTER_CAST(type))
40
 
 
41
 
#define PID_REMOVE_PROCESS_TYPE(pid) \
42
 
        hash_remove(pids, POINTER_CAST(pid))
43
 
 
44
 
void child_process_init_env(void);
45
 
void client_process_exec(const char *cmd, const char *title);
46
 
 
47
 
/* misc */
48
 
#define VALIDATE_STR(str) \
49
 
        validate_str(str, sizeof(str))
50
 
bool validate_str(const char *str, size_t max_len);
51
 
 
52
22
#endif