]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream-int: swap stream-int and appctx declarations
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Apr 2015 09:43:45 +0000 (11:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Apr 2015 09:43:45 +0000 (11:43 +0200)
This is just in order to remove two forward declarations of si_applet
and stream_interface that are not needed once properly ordered.

include/types/stream_interface.h

index d8865d5fc5ec2090936c7494ea832d020a83bb77..7436efd754ab3ed137fd0e6c75d04435d53e876a 100644 (file)
@@ -78,8 +78,39 @@ enum {
        SI_FL_SRC_ADDR   = 0x1000,  /* get the source ip/port with getsockname */
 };
 
-struct stream_interface;
-struct si_applet;
+/* A stream interface has 3 parts :
+ *  - the buffer side, which interfaces to the buffers.
+ *  - the remote side, which describes the state and address of the other side.
+ *  - the functions, which are used by the buffer side to communicate with the
+ *    remote side from the buffer side.
+ */
+
+/* Note that if an applet is registered, the update function will not be called
+ * by the session handler, so it may be used to resync flags at the end of the
+ * applet handler. See stream_int_update_embedded() for reference.
+ */
+struct stream_interface {
+       /* struct members used by the "buffer" side */
+       enum si_state state;     /* SI_ST* */
+       enum si_state prev_state;/* SI_ST*, copy of previous state */
+       unsigned short flags;    /* SI_FL_* */
+       unsigned int exp;       /* wake up time for connect, queue, turn-around, ... */
+       enum obj_type *end;     /* points to the end point (connection or appctx) */
+       struct si_ops *ops;     /* general operations at the stream interface layer */
+
+       /* struct members below are the "remote" part, as seen from the buffer side */
+       unsigned int err_type;  /* first error detected, one of SI_ET_* */
+       int conn_retries;       /* number of connect retries left */
+};
+
+/* An applet designed to run in a stream interface */
+struct si_applet {
+       enum obj_type obj_type;                      /* object type = OBJ_TYPE_APPLET */
+       /* 3 unused bytes here */
+       char *name;                                  /* applet's name to report in logs */
+       void (*fct)(struct stream_interface *);      /* internal I/O handler, may never be NULL */
+       void (*release)(struct stream_interface *);  /* callback to release resources, may be NULL */
+};
 
 /* operations available on a stream-interface */
 struct si_ops {
@@ -158,40 +189,6 @@ struct appctx {
        } ctx;                                  /* used by stats I/O handlers to dump the stats */
 };
 
-/* A stream interface has 3 parts :
- *  - the buffer side, which interfaces to the buffers.
- *  - the remote side, which describes the state and address of the other side.
- *  - the functions, which are used by the buffer side to communicate with the
- *    remote side from the buffer side.
- */
-
-/* Note that if an applet is registered, the update function will not be called
- * by the session handler, so it may be used to resync flags at the end of the
- * applet handler. See stream_int_update_embedded() for reference.
- */
-struct stream_interface {
-       /* struct members used by the "buffer" side */
-       enum si_state state;     /* SI_ST* */
-       enum si_state prev_state;/* SI_ST*, copy of previous state */
-       unsigned short flags;    /* SI_FL_* */
-       unsigned int exp;       /* wake up time for connect, queue, turn-around, ... */
-       enum obj_type *end;     /* points to the end point (connection or appctx) */
-       struct si_ops *ops;     /* general operations at the stream interface layer */
-
-       /* struct members below are the "remote" part, as seen from the buffer side */
-       unsigned int err_type;  /* first error detected, one of SI_ET_* */
-       int conn_retries;       /* number of connect retries left */
-};
-
-/* An applet designed to run in a stream interface */
-struct si_applet {
-       enum obj_type obj_type;                      /* object type = OBJ_TYPE_APPLET */
-       /* 3 unused bytes here */
-       char *name;                                  /* applet's name to report in logs */
-       void (*fct)(struct stream_interface *);      /* internal I/O handler, may never be NULL */
-       void (*release)(struct stream_interface *);  /* callback to release resources, may be NULL */
-};
-
 #endif /* _TYPES_STREAM_INTERFACE_H */
 
 /*