* 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. */
| 767 | * designated bridge and designated port as the port priority vector. |
| 768 | */ |
| 769 | static int |
| 770 | bstp_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 | |
| 780 | static void |
| 781 | bstp_assign_roles(struct bstp_state *bs) |
no test coverage detected