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

Function bstp_info_superior

freebsd/net/bridgestp.c:769–778  ·  view source on GitHub ↗

* This message priority vector is superior to the port priority vector and * will replace it if, and only if, the message priority vector is better than * the port priority vector, or the message has been transmitted from the same * designated bridge and designated port as the port priority vector. */

Source from the content-addressed store, hash-verified

767 * designated bridge and designated port as the port priority vector.
768 */
769static int
770bstp_info_superior(struct bstp_pri_vector *pv,
771 struct bstp_pri_vector *cpv)
772{
773 if (bstp_info_cmp(pv, cpv) == INFO_BETTER ||
774 (bstp_same_bridgeid(pv->pv_dbridge_id, cpv->pv_dbridge_id) &&
775 (cpv->pv_dport_id & 0xfff) == (pv->pv_dport_id & 0xfff)))
776 return (1);
777 return (0);
778}
779
780static void
781bstp_assign_roles(struct bstp_state *bs)

Callers 1

bstp_pdu_rcvtypeFunction · 0.85

Calls 2

bstp_info_cmpFunction · 0.85
bstp_same_bridgeidFunction · 0.85

Tested by

no test coverage detected