root/src/noit_check_log_helpers.h

Revision 304ec80b8cf842fc0abe5f9029790908b6455957, 2.5 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 months ago)

Convert to libmtev.

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2011, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  * Copyright (c) 2015, Circonus, Inc. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  *     * Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  *     * Redistributions in binary form must reproduce the above
13  *       copyright notice, this list of conditions and the following
14  *       disclaimer in the documentation and/or other materials provided
15  *       with the distribution.
16  *     * Neither the name OmniTI Computer Consulting, Inc. nor the names
17  *       of its contributors may be used to endorse or promote products
18  *       derived from this software without specific prior written
19  *       permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33
34 #ifndef _NOIT_CHECK_LOG_HELPERS_H
35 #define _NOIT_CHECK_LOG_HELPERS_H
36
37 typedef enum {
38   NOIT_COMPRESS_NONE = 0,
39   NOIT_COMPRESS_ZLIB = 1
40 } noit_compression_type_t;
41
42 int
43 noit_check_log_bundle_compress_b64(noit_compression_type_t ctype,
44                                    const char *buf_in,
45                                    unsigned int len_in,
46                                    char ** buf_out,
47                                    unsigned int *len_out);
48
49 int
50 noit_check_log_bundle_decompress_b64(noit_compression_type_t ctype,
51                                      const char *buf_in,
52                                      unsigned int len_in,
53                                      char *buf_out,
54                                      unsigned int len_out);
55
56 int
57 noit_check_log_b_to_sm(const char *line, int len, char ***out, int noit_ip);
58
59 #endif
Note: See TracBrowser for help on using the browser.