| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include <linux/if_link.h> |
| 5 |
|
| 6 |
#include "netdev.h" |
| 7 |
|
| 8 |
typedef enum HsrProtocol { |
| 9 |
NETDEV_HSR_PROTOCOL_HSR = HSR_PROTOCOL_HSR, |
| 10 |
NETDEV_HSR_PROTOCOL_PRP = HSR_PROTOCOL_PRP, |
| 11 |
_NETDEV_HSR_PROTOCOL_MAX, |
| 12 |
_NETDEV_HSR_PROTOCOL_INVALID = -EINVAL, |
| 13 |
} HsrProtocol; |
| 14 |
|
| 15 |
typedef struct Hsr { |
| 16 |
NetDev meta; |
| 17 |
|
| 18 |
char **ports; |
| 19 |
HsrProtocol protocol; |
| 20 |
uint8_t supervision; |
| 21 |
} Hsr; |
| 22 |
|
| 23 |
DEFINE_NETDEV_CAST(HSR, Hsr); |
| 24 |
extern const NetDevVTable hsr_vtable; |
| 25 |
|
| 26 |
DECLARE_STRING_TABLE_LOOKUP_FROM_STRING(hsr_protocol, HsrProtocol); |
| 27 |
|
| 28 |
CONFIG_PARSER_PROTOTYPE(config_parse_hsr_protocol); |