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

Function bstp_set_port_priority

freebsd/net/bridgestp.c:1588–1604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1586}
1587
1588int
1589bstp_set_port_priority(struct bstp_port *bp, int pri)
1590{
1591 struct bstp_state *bs = bp->bp_bs;
1592
1593 if (pri < 0 || pri > BSTP_MAX_PORT_PRIORITY)
1594 return (EINVAL);
1595
1596 /* Limit to steps of 16 */
1597 pri -= pri % 16;
1598
1599 BSTP_LOCK(bs);
1600 bp->bp_priority = pri;
1601 bstp_reinit(bs);
1602 BSTP_UNLOCK(bs);
1603 return (0);
1604}
1605
1606int
1607bstp_set_path_cost(struct bstp_port *bp, uint32_t path_cost)

Callers 1

bridge_ioctl_sifprioFunction · 0.85

Calls 1

bstp_reinitFunction · 0.85

Tested by

no test coverage detected