#ifndef __HSR_PRIVATE_H
#define __HSR_PRIVATE_H
#include <linux/netdevice.h>
#include <linux/list.h>
#include <linux/if_vlan.h>
#include <linux/if_hsr.h>
#define HSR_LIFE_CHECK_INTERVAL …
#define HSR_NODE_FORGET_TIME …
#define HSR_PROXY_NODE_FORGET_TIME …
#define HSR_ANNOUNCE_INTERVAL …
#define HSR_ENTRY_FORGET_TIME …
#define MAX_SLAVE_DIFF …
#define HSR_SEQNR_START …
#define HSR_SUP_SEQNR_START …
#define PRUNE_PERIOD …
#define PRUNE_PROXY_PERIOD …
#define HSR_TLV_EOT …
#define HSR_TLV_ANNOUNCE …
#define HSR_TLV_LIFE_CHECK …
#define PRP_TLV_LIFE_CHECK_DD …
#define PRP_TLV_LIFE_CHECK_DA …
#define PRP_TLV_REDBOX_MAC …
#define HSR_V1_SUP_LSDUSIZE …
static inline void set_hsr_tag_path(struct hsr_tag *ht, u16 path)
{ … }
static inline void set_hsr_tag_LSDU_size(struct hsr_tag *ht, u16 LSDU_size)
{ … }
struct hsr_ethhdr { … } __packed;
struct hsr_vlan_ethhdr { … } __packed;
struct hsr_sup_tlv { … } __packed;
struct hsr_sup_tag { … } __packed;
struct hsr_sup_payload { … } __packed;
static inline void set_hsr_stag_path(struct hsr_sup_tag *hst, u16 path)
{ … }
static inline void set_hsr_stag_HSR_ver(struct hsr_sup_tag *hst, u16 HSR_ver)
{ … }
struct hsrv0_ethhdr_sp { … } __packed;
struct hsrv1_ethhdr_sp { … } __packed;
enum hsr_port_type { … };
struct prp_rct { … } __packed;
static inline u16 get_prp_LSDU_size(struct prp_rct *rct)
{ … }
static inline void set_prp_lan_id(struct prp_rct *rct, u16 lan_id)
{ … }
static inline void set_prp_LSDU_size(struct prp_rct *rct, u16 LSDU_size)
{ … }
struct hsr_port { … };
struct hsr_frame_info;
struct hsr_node;
struct hsr_proto_ops { … };
struct hsr_self_node { … };
struct hsr_priv { … };
#define hsr_for_each_port(hsr, port) …
struct hsr_port *hsr_port_get_hsr(struct hsr_priv *hsr, enum hsr_port_type pt);
static inline u16 hsr_get_skb_sequence_nr(struct sk_buff *skb)
{ … }
static inline struct prp_rct *skb_get_PRP_rct(struct sk_buff *skb)
{ … }
static inline u16 prp_get_skb_sequence_nr(struct prp_rct *rct)
{ … }
static inline bool prp_check_lsdu_size(struct sk_buff *skb,
struct prp_rct *rct,
bool is_sup)
{ … }
#if IS_ENABLED(CONFIG_DEBUG_FS)
void hsr_debugfs_rename(struct net_device *dev);
void hsr_debugfs_init(struct hsr_priv *priv, struct net_device *hsr_dev);
void hsr_debugfs_term(struct hsr_priv *priv);
void hsr_debugfs_create_root(void);
void hsr_debugfs_remove_root(void);
#else
static inline void hsr_debugfs_rename(struct net_device *dev)
{
}
static inline void hsr_debugfs_init(struct hsr_priv *priv,
struct net_device *hsr_dev)
{}
static inline void hsr_debugfs_term(struct hsr_priv *priv)
{}
static inline void hsr_debugfs_create_root(void)
{}
static inline void hsr_debugfs_remove_root(void)
{}
#endif
#endif