File: elements.h

package info (click to toggle)
nftlb 1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 8,704 kB
  • sloc: ansic: 11,806; sh: 221; makefile: 35
file content (47 lines) | stat: -rw-r--r-- 1,536 bytes parent folder | download
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
46
47
 /*
 *   This file is part of nftlb, nftables load balancer.
 *
 *   Copyright (C) ZEVENET SL.
 *   Author: Laura Garcia <laura.garcia@zevenet.com>
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Affero General Public License as
 *   published by the Free Software Foundation, either version 3 of the
 *   License, or 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 Affero General Public License for more details.
 *
 *   You should have received a copy of the GNU Affero General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef _ELEMENTS_H_
#define _ELEMENTS_H_

#include "policies.h"


struct element {
	struct list_head	list;
	struct policy		*policy;
	char				*data;
	char				*time;
	int					action;
	char				*counter_pkts;
	char				*counter_bytes;
};

void element_s_print(struct policy *p);
struct element * element_lookup_by_name(struct policy *p, const char *data);
int element_set_action(struct element *e, int action);
int element_s_set_action(struct policy *p, int action);
int element_s_delete(struct policy *p);
int element_set_attribute(struct config_pair *c, int apply_action);
int element_pos_actionable(struct config_pair *c, int apply_action);
int element_get_list(struct policy *p);

#endif /* _ELEMENTS_H_ */