MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bstp_update_state

Function bstp_update_state

freebsd/net/bridgestp.c:898–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896}
897
898static void
899bstp_update_state(struct bstp_state *bs, struct bstp_port *bp)
900{
901 struct bstp_port *bp2;
902 int synced;
903
904 BSTP_LOCK_ASSERT(bs);
905
906 /* check if all the ports have syncronised again */
907 if (!bs->bs_allsynced) {
908 synced = 1;
909 LIST_FOREACH(bp2, &bs->bs_bplist, bp_next) {
910 if (!(bp2->bp_synced ||
911 bp2->bp_role == BSTP_ROLE_ROOT)) {
912 synced = 0;
913 break;
914 }
915 }
916 bs->bs_allsynced = synced;
917 }
918
919 bstp_update_roles(bs, bp);
920 bstp_update_tc(bp);
921}
922
923static void
924bstp_update_roles(struct bstp_state *bs, struct bstp_port *bp)

Callers 3

bstp_received_bpduFunction · 0.85
bstp_linkstateFunction · 0.85
bstp_tickFunction · 0.85

Calls 2

bstp_update_rolesFunction · 0.85
bstp_update_tcFunction · 0.85

Tested by

no test coverage detected