26 Commits

Author SHA1 Message Date
Markus Mäkelä
6067c21c1b MXS-1346: Use the filter template in dbfwfilter
The dbfwfilter now uses the MaxScale filter template. Also fixed up some
of the filter template documentation.
2017-09-08 09:31:37 +03:00
Johan Wikman
de7004cb95 Merge branch '2.1' into develop 2017-08-15 10:31:30 +03:00
geaaru
3485a32731 Fix compilation errors/warning with gcc-5.4.0 (#137)
Warning are like this:
 error: ‘delimiter’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
2017-08-15 09:56:22 +03:00
Markus Mäkelä
53a2139bb9 MXS-1267: Use filter template in tee
The tee filter now uses the MaxScale filter template.
2017-06-02 13:07:02 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
dd68069471 MXS-1220: Add back the old diagnostic entry point
This makes 2.2 maxadmin backwards compatible with 2.1.
2017-05-04 09:14:04 +03:00
Markus Mäkelä
076599ee5e MXS-1220: Make the parameters of the diagnostic entry points const
The diagnostic entry points should not modify the state of the object
being diagnosed.
2017-05-04 09:14:03 +03:00
Markus Mäkelä
12baa304e6 MXS-1220: Implement JSON diagnostics entry point in first part of filters
First part of the filters now implement the JSON version of the
diagnostics function. The rest are converted in a followup commit.
2017-05-04 09:12:15 +03:00
Johan Wikman
870a72ae71 Inherit maxscale::Filter from MXS_FILTER
All use of reinterpret_cast can be removed. No cast needed when
the C++ instances are returned, and static_cast is sufficient for
downcasting.
2017-02-27 11:11:04 +02:00
Johan Wikman
49cc2b52e3 Merge branch '2.1.0' into 2.1 2017-02-15 08:44:55 +02:00
Johan Wikman
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
Johan Wikman
2a49cd6451 getCapabilities now get the instance as argument
Allows the capabilities to be different depending on how the
filter/router has been configured.
2017-02-14 13:55:22 +02:00
Esa Korhonen
7d51864402 Clean config.h some more
Moved some typedefs to router.h and server.h, changed a few
constants to these enums. Renamed some types in config.h to
remove "Gateway".

There are still some functions in the public header which are
only used in core, but they seem to fit the theme of public functions
so were not moved.
2017-01-25 16:05:51 +02:00
Esa Korhonen
00f77bbe69 Fix some leftovers from the SESSION->MXS_SESSION and related renames
Renames only.
2017-01-18 11:50:52 +02:00
Esa Korhonen
fb771c8a2e Rename public types and constants in session.h
Preparing to split session.h into module and core sections.
2017-01-17 16:30:14 +02:00
Johan Wikman
424849a9a2 Rename UPSTREAM to MXS_UPSTREAM
And DOWNSTREAM to MXS_DOWNSTREAM
2017-01-13 13:40:03 +02:00
Johan Wikman
ce182e3788 Introduce opaque type for filter session data 2017-01-13 11:03:43 +02:00
Johan Wikman
d0cc246b79 Rename FILTER to MXS_FILTER 2017-01-13 10:21:51 +02:00
Johan Wikman
e7b951c434 Rename FILTER_OBJECT to MXS_FILTER_OBJECT
Other clarifications to follow.
2017-01-13 10:03:23 +02:00
Markus Mäkelä
2611f9a701 Give parameters as CONFIG_PARAMETER for FILTER::createInstance
The filters should use the same configuration parameters as other modules
use. This allows them to use the common configuration management functions
to get values from it.
2017-01-05 19:51:22 +02:00
Markus Mäkelä
c96bd64aa8 Rename MODULE_INFO to MXS_MODULE
The MODULE_INFO is now the main object which is used by modules to convey
information to the MaxScale core. The MXS_MODULE name is more apt as it
now contains the actual module definition.

The old MODULES structure was moved into load_utils.c as an internal
implementation and was renamed so that it is not confused with the new
MODULE structure.
2017-01-03 18:01:14 +02:00
Markus Mäkelä
b00e0328d5 Create a macro for module declarations
The modules are now declared with a common macro. This allows future
additions to the module loading process while also making the loaded
symbol name a constant.
2017-01-03 18:01:13 +02:00
Markus Mäkelä
ae0577c695 Move module object inside MODULE_INFO
This allows modules to only expose one entry point with a consistent
signature. In the future, this could be used to implement declarations of
module parameters.
2017-01-03 18:01:13 +02:00
Johan Wikman
4239182aa0 Fix diagnostics on filter template
Diagnostics can be required on both instance and session level,
so both cases need to be handled explicitly.

In addition, some reinterpret_casts were changed into static_casts.
Reinterpret_cast needs to be used with the instance, which is a
void** but static_cast is sufficient for the session, which is void*.
2016-12-13 12:28:31 +02:00
Johan Wikman
ce94170eae Rename maxscale/cpp.hh to maxscale/cppdefs.hh
Just like every c-header must include maxscale/cdefs.h as the first
file, every C++-header must include maxscale/cppdefs.hh as its first
header.
2016-12-09 13:08:10 +02:00
Johan Wikman
855ed415f8 Add support for filters implemented in C++
C++ header files have the .hh-suffix to distinguish them from C
header files, but also to allow a C++ header file (e.g. xyz.hh) for
an existing C header file (e.g. xyz.h).

- cpp.hh        : Basic C++ stuff. Introduces the namespace "maxscale"
                  and its synonym "mxs".
- filter.[hh|cc]: Template class Filter and companion class FilterSession
                  to be used when implementing filters in C++.
- spinlock.h    : Wrapper and lock guard class for SPINLOCK.
2016-12-09 13:08:10 +02:00