-
Notifications
You must be signed in to change notification settings - Fork 9
/
vrrp_ctrl.h
56 lines (44 loc) · 1.32 KB
/
vrrp_ctrl.h
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
48
49
50
51
52
53
54
55
56
/*
* vrrp_ctrl.h - control fifo header
*
* Copyright (C) 2016 Arnaud Andre
*
* This file is part of uvrrpd.
*
* uvrrpd 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.
*
* uvrrpd 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 uvrrpd. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _VRRP_CTRL_H_
#define _VRRP_CTRL_H_
#include <stdio.h>
/* from vrrp.h */
struct vrrp;
struct vrrp_net;
typedef enum _vrrp_event_type vrrp_event_t;
#define CTRL_MAXCHAR 64
#define CTRL_CMD_NTOKEN 3
/**
* vrrp_ctrl - infos about control fifo
*/
struct vrrp_ctrl {
/* control fifo fd */
int fd;
/* control fifo msg */
char msg[CTRL_MAXCHAR];
/* reformated command */
char **cmd;
};
int vrrp_ctrl_init(struct vrrp_ctrl *ctrl);
void vrrp_ctrl_cleanup(struct vrrp_ctrl *ctrl);
vrrp_event_t vrrp_ctrl_read(struct vrrp *vrrp, struct vrrp_net *vnet);
#endif /* _VRRP_CTRL_H_ */