File: map.h

package info (click to toggle)
haproxy 1.5.8-3%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 8,248 kB
  • ctags: 6,924
  • sloc: ansic: 62,867; xml: 1,754; python: 925; makefile: 551; perl: 550; sh: 491
file content (45 lines) | stat: -rw-r--r-- 1,730 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * include/types/map.h
 * This file provides structures and types for MAPs.
 *
 * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation, version 2.1
 * exclusively.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef _TYPES_MAP_H
#define _TYPES_MAP_H

#include <types/pattern.h>
#include <types/sample.h>

/* These structs contains a string representation of the map. These struct is
 * sorted by file. Permit to hot-add and hot-remove entries.
 *
 * "maps" is the list head. This list cotains all the mao file name identifier.
 */
extern struct list maps;

struct map_descriptor {
	struct list list;              /* used for listing */
	struct sample_conv *conv;      /* original converter descriptor */
	struct pattern_head pat;       /* the pattern matching associated to the map */
	int do_free;                   /* set if <pat> is the orignal pat and must be freed */
	char *default_value;           /* a copy of default value. This copy is
	                                  useful if the type is str */
	struct sample_storage *def;    /* contain the default value */
};

#endif /* _TYPES_MAP_H */