]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: listener: create a new struct receiver
authorWilly Tarreau <w@1wt.eu>
Thu, 27 Aug 2020 05:48:42 +0000 (07:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 20:07:58 +0000 (22:07 +0200)
In order to start to split the listeners into the listener part and the
event receiver part, we introduce a new field "rx" into struct listener
that will eventually become a separate struct receiver. This patch only
adds the struct with an options field that the receivers will need.

include/haproxy/listener-t.h

index 8ea7621ed762c4d0d5452993152724e258454052..245436d08b94df85185f32da46b158022c37ca41 100644 (file)
@@ -191,6 +191,11 @@ struct bind_conf {
        } settings;                /* all the settings needed for the listening socket */
 };
 
+/* This describes a receiver with all its characteristics (address, status, etc) */
+struct receiver {
+       unsigned int flags;             /* receiver options (RX_F_*) */
+};
+
 /* The listener will be directly referenced by the fdtab[] which holds its
  * socket. The listener provides the protocol-specific accept() function to
  * the fdtab.
@@ -229,6 +234,7 @@ struct listener {
        struct list by_bind;            /* chaining in bind_conf's list of listeners */
        struct bind_conf *bind_conf;    /* "bind" line settings, include SSL settings among other things */
        struct list proto_list;         /* list in the protocol header */
+       struct receiver rx;             /* network receiver parts */
 
        /* warning: this struct is huge, keep it at the bottom */
        struct sockaddr_storage addr;   /* the address we listen to */