linux/include/net/bond_3ad.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved.
 */

#ifndef _NET_BOND_3AD_H
#define _NET_BOND_3AD_H

#include <asm/byteorder.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/if_ether.h>

/* General definitions */
#define PKT_TYPE_LACPDU
#define AD_TIMER_INTERVAL

#define AD_LACP_SLOW
#define AD_LACP_FAST

mac_addr_t;

enum {};

/* rx machine states(43.4.11 in the 802.3ad standard) */
rx_states_t;

/* periodic machine states(43.4.12 in the 802.3ad standard) */
periodic_states_t;

/* mux machine states(43.4.13 in the 802.3ad standard) */
mux_states_t;

/* tx machine states(43.4.15 in the 802.3ad standard) */
tx_states_t;

/* churn machine states(43.4.17 in the 802.3ad standard) */
churn_state_t;

/* rx indication types */
pdu_type_t;

/* rx marker indication types */
bond_marker_subtype_t;

/* timers types(43.4.9 in the 802.3ad standard) */
ad_timers_t;

#pragma pack(1)

/* Link Aggregation Control Protocol(LACP) data unit structure(43.4.2.2 in the 802.3ad standard) */
lacpdu_t;

lacpdu_header_t;

/* Marker Protocol Data Unit(PDU) structure(43.5.3.2 in the 802.3ad standard) */
bond_marker_t;

bond_marker_header_t;

#pragma pack()

struct slave;
struct bonding;
struct ad_info;
struct port;

#ifdef __ia64__
#pragma pack(8)
#endif

struct bond_3ad_stats {};

/* aggregator structure(43.4.5 in the 802.3ad standard) */
aggregator_t;

struct port_params {};

/* port structure(43.4.6 in the 802.3ad standard) */
port_t;

/* system structure */
struct ad_system {};

#ifdef __ia64__
#pragma pack()
#endif

/* ========== AD Exported structures to the main bonding code ========== */
#define BOND_AD_INFO(bond)
#define SLAVE_AD_INFO(slave)

struct ad_bond_info {};

struct ad_slave_info {};

static inline const char *bond_3ad_churn_desc(churn_state_t state)
{}

/* ========== AD Exported functions to the main bonding code ========== */
void bond_3ad_initialize(struct bonding *bond);
void bond_3ad_bind_slave(struct slave *slave);
void bond_3ad_unbind_slave(struct slave *slave);
void bond_3ad_state_machine_handler(struct work_struct *);
void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout);
void bond_3ad_adapter_speed_duplex_changed(struct slave *slave);
void bond_3ad_handle_link_change(struct slave *slave, char link);
int  bond_3ad_get_active_agg_info(struct bonding *bond, struct ad_info *ad_info);
int  __bond_3ad_get_active_agg_info(struct bonding *bond,
				    struct ad_info *ad_info);
int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
			 struct slave *slave);
int bond_3ad_set_carrier(struct bonding *bond);
void bond_3ad_update_lacp_rate(struct bonding *bond);
void bond_3ad_update_ad_actor_settings(struct bonding *bond);
int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats);
size_t bond_3ad_stats_size(void);
#endif /* _NET_BOND_3AD_H */