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

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

Version: ~ [ linux-5.8-rc4 ] ~ [ linux-5.7.7 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.50 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.131 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.187 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.229 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.229 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp