]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: conn-stream: Add mask from flags set by endpoint or app layer
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 4 May 2022 07:19:13 +0000 (09:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 May 2022 07:23:35 +0000 (09:23 +0200)
In flags set on the endpoints, some are set by endpoints itself and some are
set by the app layer. To help flags manipulations, 2 masks have been
added. The first one, CS_EP_ENDP_MASK, for all flags that an endpoint may
set. The other one, CS_EP_APP_MASK, for flags that the app layer may set.

This patch is mandatory for the next commit.

include/haproxy/conn_stream-t.h

index ed25c28486ba0e109c9de19a6418767b707aa317..d746d6e268decd1ccc4b7bb9e4e36b79d4961e4c 100644 (file)
@@ -64,6 +64,7 @@
        CS_EP_MAY_SPLICE = 0x00040000,  /* The endpoint may use the kernel splicing to forward data to the other side (implies CS_EP_CAN_SPLICE) */
        CS_EP_RCV_MORE   = 0x00080000,  /* Endpoint may have more bytes to transfer */
        CS_EP_WANT_ROOM  = 0x00100000,  /* More bytes to transfer, but not enough room */
+       CS_EP_ENDP_MASK  = 0x001ff000,  /* Mask for flags set by the endpoint */
 
        /* following flags are supposed to be set by the app layer and read by
         * the endpoint :
@@ -79,6 +80,7 @@
        CS_EP_RXBLK_SHUT    = 0x20000000,  /* input is now closed, nothing new will ever come */
        CS_EP_RXBLK_CONN    = 0x40000000,  /* other side is not connected */
        CS_EP_RXBLK_ANY     = 0x7C000000,  /* any of the RXBLK flags above */
+       CS_EP_APP_MASK      = 0x7fe00000,  /* Mask for flags set by the app layer */
  };
 
 /* conn_stream flags */