struct licounters;
/* listener state */
-enum {
+enum li_state {
LI_NEW = 0, /* not initialized yet */
LI_INIT, /* all parameters filled in, but not assigned yet */
LI_ASSIGNED, /* assigned to the protocol, but not listening yet */
LI_READY, /* started, listening and enabled */
LI_FULL, /* reached its connection limit */
LI_LIMITED, /* transient state: limits have been reached, listener is queued */
-};
+} __attribute__((packed));
/* Listener transitions
* calloc() set() add_listener() bind()
*/
struct listener {
enum obj_type obj_type; /* object type = OBJ_TYPE_LISTENER */
+ enum li_state state; /* state: NEW, INIT, ASSIGNED, LISTEN, READY, FULL */
+ short int nice; /* nice value to assign to the instanciated tasks */
int fd; /* the listen socket */
- char *name; /* */
+ char *name; /* listener's name */
int luid; /* listener universally unique ID, used for SNMP */
- int state; /* state: NEW, INIT, ASSIGNED, LISTEN, READY, FULL */
int options; /* socket options : LI_O_* */
struct licounters *counters; /* statistics counters */
struct protocol *proto; /* protocol this listener belongs to */
struct proxy *frontend; /* the frontend this listener belongs to, or NULL */
struct list wait_queue; /* link element to make the listener wait for something (LI_LIMITED) */
unsigned int analysers; /* bitmap of required protocol analysers */
- int nice; /* nice value to assign to the instanciated tasks */
- char *interface; /* interface name or NULL */
int maxseg; /* for TCP, advertised MSS */
+ char *interface; /* interface name or NULL */
struct list by_fe; /* chaining in frontend's list of listeners */
struct list by_bind; /* chaining in bind_conf's list of listeners */