File: grok_pattern.h

package info (click to toggle)
grok 1.20110708.1-4.3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,460 kB
  • sloc: ansic: 3,469; ruby: 987; makefile: 276; sh: 124; yacc: 106
file content (21 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _GROK_PATTERN_H_
#define _GROK_PATTERN_H_

#include "grok.h"
#include <tcutil.h>

TCLIST *grok_pattern_name_list(const grok_t *grok);

int grok_pattern_add(const grok_t *grok, const char *name, size_t name_len,
                      const char *regexp, size_t regexp_len);
int grok_pattern_find(const grok_t *grok, const char *name, size_t name_len,
                      const char **regexp, int *regexp_len);
int grok_patterns_import_from_file(const grok_t *grok, const char *filename);
int grok_patterns_import_from_string(const grok_t *grok, const char *buffer);

/* Exposed only for testing */
void _pattern_parse_string(const char *line,
                           const char **name, size_t *name_len,
                           const char **regexp, size_t *regexp_len);

#endif /* _GROK_PATTERN_H_ */