~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/bridge/br_private_stp.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *      Linux ethernet bridge
  4  *
  5  *      Authors:
  6  *      Lennert Buytenhek               <buytenh@gnu.org>
  7  */
  8 
  9 #ifndef _BR_PRIVATE_STP_H
 10 #define _BR_PRIVATE_STP_H
 11 
 12 #define BPDU_TYPE_CONFIG 0
 13 #define BPDU_TYPE_TCN 0x80
 14 
 15 /* IEEE 802.1D-1998 timer values */
 16 #define BR_MIN_HELLO_TIME       (1*HZ)
 17 #define BR_MAX_HELLO_TIME       (10*HZ)
 18 
 19 #define BR_MIN_FORWARD_DELAY    (2*HZ)
 20 #define BR_MAX_FORWARD_DELAY    (30*HZ)
 21 
 22 #define BR_MIN_MAX_AGE          (6*HZ)
 23 #define BR_MAX_MAX_AGE          (40*HZ)
 24 
 25 #define BR_MIN_PATH_COST        1
 26 #define BR_MAX_PATH_COST        65535
 27 
 28 struct br_config_bpdu {
 29         unsigned int    topology_change:1;
 30         unsigned int    topology_change_ack:1;
 31         bridge_id       root;
 32         int             root_path_cost;
 33         bridge_id       bridge_id;
 34         port_id         port_id;
 35         int             message_age;
 36         int             max_age;
 37         int             hello_time;
 38         int             forward_delay;
 39 };
 40 
 41 /* called under bridge lock */
 42 static inline int br_is_designated_port(const struct net_bridge_port *p)
 43 {
 44         return !memcmp(&p->designated_bridge, &p->br->bridge_id, 8) &&
 45                 (p->designated_port == p->port_id);
 46 }
 47 
 48 
 49 /* br_stp.c */
 50 void br_become_root_bridge(struct net_bridge *br);
 51 void br_config_bpdu_generation(struct net_bridge *);
 52 void br_configuration_update(struct net_bridge *);
 53 void br_port_state_selection(struct net_bridge *);
 54 void br_received_config_bpdu(struct net_bridge_port *p,
 55                              const struct br_config_bpdu *bpdu);
 56 void br_received_tcn_bpdu(struct net_bridge_port *p);
 57 void br_transmit_config(struct net_bridge_port *p);
 58 void br_transmit_tcn(struct net_bridge *br);
 59 void br_topology_change_detection(struct net_bridge *br);
 60 void __br_set_topology_change(struct net_bridge *br, unsigned char val);
 61 
 62 /* br_stp_bpdu.c */
 63 void br_send_config_bpdu(struct net_bridge_port *, struct br_config_bpdu *);
 64 void br_send_tcn_bpdu(struct net_bridge_port *);
 65 
 66 #endif
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php