linux/net/bridge/br_stp.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	Spanning tree protocol; generic parts
 *	Linux ethernet bridge
 *
 *	Authors:
 *	Lennert Buytenhek		<[email protected]>
 */
#include <linux/kernel.h>
#include <linux/rculist.h>
#include <net/switchdev.h>

#include "br_private.h"
#include "br_private_stp.h"

/* since time values in bpdu are in jiffies and then scaled (1/256)
 * before sending, make sure that is at least one STP tick.
 */
#define MESSAGE_AGE_INCR

static const char *const br_port_state_names[] =;

void br_set_state(struct net_bridge_port *p, unsigned int state)
{}

u8 br_port_get_stp_state(const struct net_device *dev)
{}
EXPORT_SYMBOL_GPL();

/* called under bridge lock */
struct net_bridge_port *br_get_port(struct net_bridge *br, u16 port_no)
{}

/* called under bridge lock */
static int br_should_become_root_port(const struct net_bridge_port *p,
				      u16 root_port)
{}

static void br_root_port_block(const struct net_bridge *br,
			       struct net_bridge_port *p)
{}

/* called under bridge lock */
static void br_root_selection(struct net_bridge *br)
{}

/* called under bridge lock */
void br_become_root_bridge(struct net_bridge *br)
{}

/* called under bridge lock */
void br_transmit_config(struct net_bridge_port *p)
{}

/* called under bridge lock */
static void br_record_config_information(struct net_bridge_port *p,
					 const struct br_config_bpdu *bpdu)
{}

/* called under bridge lock */
static void br_record_config_timeout_values(struct net_bridge *br,
					    const struct br_config_bpdu *bpdu)
{}

/* called under bridge lock */
void br_transmit_tcn(struct net_bridge *br)
{}

/* called under bridge lock */
static int br_should_become_designated_port(const struct net_bridge_port *p)
{}

/* called under bridge lock */
static void br_designated_port_selection(struct net_bridge *br)
{}

/* called under bridge lock */
static int br_supersedes_port_info(const struct net_bridge_port *p,
				   const struct br_config_bpdu *bpdu)
{}

/* called under bridge lock */
static void br_topology_change_acknowledged(struct net_bridge *br)
{}

/* called under bridge lock */
void br_topology_change_detection(struct net_bridge *br)
{}

/* called under bridge lock */
void br_config_bpdu_generation(struct net_bridge *br)
{}

/* called under bridge lock */
static void br_reply(struct net_bridge_port *p)
{}

/* called under bridge lock */
void br_configuration_update(struct net_bridge *br)
{}

/* called under bridge lock */
void br_become_designated_port(struct net_bridge_port *p)
{}


/* called under bridge lock */
static void br_make_blocking(struct net_bridge_port *p)
{}

/* called under bridge lock */
static void br_make_forwarding(struct net_bridge_port *p)
{}

/* called under bridge lock */
void br_port_state_selection(struct net_bridge *br)
{}

/* called under bridge lock */
static void br_topology_change_acknowledge(struct net_bridge_port *p)
{}

/* called under bridge lock */
void br_received_config_bpdu(struct net_bridge_port *p,
			     const struct br_config_bpdu *bpdu)
{}

/* called under bridge lock */
void br_received_tcn_bpdu(struct net_bridge_port *p)
{}

/* Change bridge STP parameter */
int br_set_hello_time(struct net_bridge *br, unsigned long val)
{}

int br_set_max_age(struct net_bridge *br, unsigned long val)
{}

/* called under bridge lock */
int __set_ageing_time(struct net_device *dev, unsigned long t)
{}

/* Set time interval that dynamic forwarding entries live
 * For pure software bridge, allow values outside the 802.1
 * standard specification for special cases:
 *  0 - entry never ages (all permanent)
 *  1 - entry disappears (no persistence)
 *
 * Offloaded switch entries maybe more restrictive
 */
int br_set_ageing_time(struct net_bridge *br, clock_t ageing_time)
{}

clock_t br_get_ageing_time(const struct net_device *br_dev)
{}
EXPORT_SYMBOL_GPL();

/* called under bridge lock */
void __br_set_topology_change(struct net_bridge *br, unsigned char val)
{}

void __br_set_forward_delay(struct net_bridge *br, unsigned long t)
{}

int br_set_forward_delay(struct net_bridge *br, unsigned long val)
{}