]> git.ipfire.org Git - people/ms/network.git/blob - src/networkd/port-bonding.h
Makefile: Fix typo in localstatedir
[people/ms/network.git] / src / networkd / port-bonding.h
1 /*#############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2023 IPFire Network Development Team #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 #############################################################################*/
20
21 #ifndef NETWORKD_PORT_BONDING_H
22 #define NETWORKD_PORT_BONDING_H
23
24 #include <linux/if_bonding.h>
25
26 #include "port.h"
27
28 typedef enum nw_port_bonding_mode {
29 NW_BONDING_MODE_ROUNDROBIN = BOND_MODE_ROUNDROBIN,
30 NW_BONDING_MODE_ACTIVEBACKUP = BOND_MODE_ACTIVEBACKUP,
31 NW_BONDING_MODE_XOR = BOND_MODE_XOR,
32 NW_BONDING_MODE_BROADCAST = BOND_MODE_BROADCAST,
33 NW_BONDING_MODE_8023AD = BOND_MODE_8023AD,
34 NW_BONDING_MODE_TLB = BOND_MODE_TLB,
35 NW_BONDING_MODE_ALB = BOND_MODE_ALB,
36 } nw_port_bonding_mode_t;
37
38 struct nw_port_bonding {
39 nw_port_bonding_mode_t mode;
40 };
41
42 extern const nw_port_type_t nw_port_type_bonding;
43
44 const char* nw_port_bonding_get_mode(nw_port* port);
45 int nw_port_bonding_set_mode(nw_port* port, const char* mode);
46
47 #endif /* NETWORKD_PORT_BONDING_H */