diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-09-02 19:41:06 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-09-08 19:26:27 -0400 |
commit | 13cf6a9c9d37a14ff46f6d512aab402616359570 (patch) | |
tree | 81b8dae12607b7df36c422191575c1a99009c060 /common/elapi/elapi_basic.h | |
parent | c5461b548d303e6e66e20048544814338b46efb5 (diff) | |
download | sssd_unused-13cf6a9c9d37a14ff46f6d512aab402616359570.tar.gz sssd_unused-13cf6a9c9d37a14ff46f6d512aab402616359570.tar.xz sssd_unused-13cf6a9c9d37a14ff46f6d512aab402616359570.zip |
ELAPI Adding file provider and CSV format
This patch creates the infrastructure for
logging of the event from the top of the interface
to the bottom. It is a start. A lot of functionality
is left aside.
The attempt of this patch is pass event from caller
of the ELAPI interface via targets to sinks
then to providers and do serialization creating
entity that is ready to be written to a file.
It also implements more specific provider related
configuration parameters.
Also it addresses couple suggestions that were
brought up against previous patch.
ELAPI Correcting issues
This patch addresses the issues found during the
review of the previous patches and addresses
ticket #166.
Diffstat (limited to 'common/elapi/elapi_basic.h')
-rw-r--r-- | common/elapi/elapi_basic.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/common/elapi/elapi_basic.h b/common/elapi/elapi_basic.h new file mode 100644 index 00000000..8d23c7db --- /dev/null +++ b/common/elapi/elapi_basic.h @@ -0,0 +1,48 @@ +/* + ELAPI + + Basic output buffer manipulation routines. + + Copyright (C) Dmitri Pal <dpal@redhat.com> 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef ELAPI_BASIC_H +#define ELAPI_BASIC_H + +#include <stdint.h> + +#ifndef EOK +#define EOK 0 +#endif + +/* Generic data structure for the data output */ +struct elapi_data_out { + unsigned char *buffer; + uint32_t size; + uint32_t length; + uint32_t written; +}; + +/* Function to free serialized data */ +void elapi_free_serialized_data(struct elapi_data_out *out_data); + +/* Allocate data structure */ +int elapi_alloc_serialized_data(struct elapi_data_out **out_data); + +/* Function to add memory to the output buffer */ +int elapi_grow_data(struct elapi_data_out *out_data, + uint32_t len, + uint32_t block); + +#endif |