~ubuntu-branches/ubuntu/trusty/haproxy/trusty-backports

« back to all changes in this revision

Viewing changes to include/types/global.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-03-09 21:30:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080309213029-8oupnrc607mg5uqw
Tags: 1.3.14.3-1
* New Upstream Version
* Add status argument support to init-script to conform to LSB.
* Cleanup pidfile after stop in init script. Init script return code fixups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
  include/types/global.h
3
3
  Global variables.
4
4
 
5
 
  Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
 
5
  Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
6
6
  
7
7
  This library is free software; you can redistribute it and/or
8
8
  modify it under the terms of the GNU Lesser General Public
25
25
#include <netinet/in.h>
26
26
 
27
27
#include <common/config.h>
 
28
#include <types/log.h>
 
29
#include <types/protocols.h>
28
30
#include <types/task.h>
29
31
 
30
32
/* modes of operation (global.mode) */
31
 
#define MODE_DEBUG      1
32
 
#define MODE_STATS      2
33
 
#define MODE_LOG        4
34
 
#define MODE_DAEMON     8
35
 
#define MODE_QUIET      16
36
 
#define MODE_CHECK      32
37
 
#define MODE_VERBOSE    64
38
 
#define MODE_STARTING   128
39
 
#define MODE_FOREGROUND 256
 
33
#define MODE_DEBUG      0x01
 
34
#define MODE_DAEMON     0x02
 
35
#define MODE_QUIET      0x04
 
36
#define MODE_CHECK      0x08
 
37
#define MODE_VERBOSE    0x10
 
38
#define MODE_STARTING   0x20
 
39
#define MODE_FOREGROUND 0x40
40
40
 
41
41
/* list of last checks to perform, depending on config options */
42
42
#define LSTCHK_CAP_BIND 0x00000001      /* check that we can bind to any port */
55
55
        int rlimit_memmax;      /* default ulimit-d in megs value : 0=unset */
56
56
        int mode;
57
57
        int last_checks;
 
58
        int spread_checks;
58
59
        char *chroot;
59
60
        char *pidfile;
60
61
        int logfac1, logfac2;
61
62
        int loglev1, loglev2;
62
 
        struct sockaddr_in logsrv1, logsrv2;
 
63
        struct logsrv logsrv1, logsrv2;
63
64
        struct {
64
65
                int maxpollevents; /* max number of poll events at once */
 
66
                int maxaccept;     /* max number of consecutive accept() */
65
67
        } tune;
 
68
        struct listener stats_sock; /* unix socket listener for statistics */
 
69
        struct timeval stats_timeout;
66
70
};
67
71
 
68
72
extern struct global global;
69
73
extern char *progname;          /* program name */
70
74
extern int  pid;                /* current process id */
 
75
extern int  relative_pid;       /* process id starting at 1 */
71
76
extern int  actconn;            /* # of active sessions */
72
77
extern int listeners;
73
78
extern char trash[BUFSIZE];
74
79
extern const int zero;
75
80
extern const int one;
 
81
extern const struct linger nolinger;
76
82
extern int stopping;    /* non zero means stopping in progress */
77
83
 
78
84
#endif /* _TYPES_GLOBAL_H */