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

Function bstp_set_priority

freebsd/net/bridgestp.c:1572–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1570}
1571
1572int
1573bstp_set_priority(struct bstp_state *bs, int pri)
1574{
1575 if (pri < 0 || pri > BSTP_MAX_PRIORITY)
1576 return (EINVAL);
1577
1578 /* Limit to steps of 4096 */
1579 pri -= pri % 4096;
1580
1581 BSTP_LOCK(bs);
1582 bs->bs_bridge_priority = pri;
1583 bstp_reinit(bs);
1584 BSTP_UNLOCK(bs);
1585 return (0);
1586}
1587
1588int
1589bstp_set_port_priority(struct bstp_port *bp, int pri)

Callers 1

bridge_ioctl_spriFunction · 0.85

Calls 1

bstp_reinitFunction · 0.85

Tested by

no test coverage detected