blob: f1f9b468859446a76496ca9eca449205d60ace20 (
plain)
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
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <linux/batman_adv.h>
#include "conf-parser.h"
#include "netdev.h"
#define BATADV_GENL_NAME "batadv"
typedef enum BatadvGatewayModes {
BATADV_GATEWAY_MODE_OFF = BATADV_GW_MODE_OFF,
BATADV_GATEWAY_MODE_CLIENT = BATADV_GW_MODE_CLIENT,
BATADV_GATEWAY_MODE_SERVER = BATADV_GW_MODE_SERVER,
_BATADV_GATEWAY_MODE_MAX,
_BATADV_GATEWAY_MODE_INVALID = -EINVAL,
} BatadvGatewayModes;
typedef enum BatadvRoutingAlgorithm {
BATADV_ROUTING_ALGORITHM_BATMAN_V,
BATADV_ROUTING_ALGORITHM_BATMAN_IV,
_BATADV_ROUTING_ALGORITHM_MAX,
_BATADV_ROUTING_ALGORITHM_INVALID = -EINVAL,
} BatadvRoutingAlgorithm;
typedef struct Batadv {
NetDev meta;
BatadvGatewayModes gateway_mode;
uint32_t gateway_bandwidth_down;
uint32_t gateway_bandwidth_up;
uint8_t hop_penalty;
BatadvRoutingAlgorithm routing_algorithm;
usec_t originator_interval;
bool aggregation;
bool bridge_loop_avoidance;
bool distributed_arp_table;
bool fragmentation;
} BatmanAdvanced;
DEFINE_NETDEV_CAST(BATADV, BatmanAdvanced);
extern const NetDevVTable batadv_vtable;
CONFIG_PARSER_PROTOTYPE(config_parse_batadv_gateway_mode);
CONFIG_PARSER_PROTOTYPE(config_parse_batadv_routing_algorithm);
CONFIG_PARSER_PROTOTYPE(config_parse_badadv_bandwidth);
|