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

Function bstp_set_htime

freebsd/net/bridgestp.c:1471–1489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1469}
1470
1471int
1472bstp_set_htime(struct bstp_state *bs, int t)
1473{
1474 /* convert seconds to ticks */
1475 t *= BSTP_TICK_VAL;
1476
1477 /* value can only be changed in leagacy stp mode */
1478 if (bs->bs_protover != BSTP_PROTO_STP)
1479 return (EPERM);
1480
1481 if (t < BSTP_MIN_HELLO_TIME || t > BSTP_MAX_HELLO_TIME)
1482 return (EINVAL);
1483
1484 BSTP_LOCK(bs);
1485 bs->bs_bridge_htime = t;
1486 bstp_reinit(bs);
1487 BSTP_UNLOCK(bs);
1488 return (0);
1489}
1490
1491int
1492bstp_set_fdelay(struct bstp_state *bs, int t)

Callers 1

bridge_ioctl_shtFunction · 0.85

Calls 1

bstp_reinitFunction · 0.85

Tested by

no test coverage detected