Lines Matching refs:cu

339     struct bstp_config_unit *cu)  in bstp_decode_bpdu()  argument
343 cu->cu_pv.pv_root_id = in bstp_decode_bpdu()
352 cu->cu_pv.pv_dbridge_id = in bstp_decode_bpdu()
361 cu->cu_pv.pv_cost = ntohl(cpdu->cbu_rootpathcost); in bstp_decode_bpdu()
362 cu->cu_message_age = ntohs(cpdu->cbu_messageage); in bstp_decode_bpdu()
363 cu->cu_max_age = ntohs(cpdu->cbu_maxage); in bstp_decode_bpdu()
364 cu->cu_hello_time = ntohs(cpdu->cbu_hellotime); in bstp_decode_bpdu()
365 cu->cu_forward_delay = ntohs(cpdu->cbu_forwarddelay); in bstp_decode_bpdu()
366 cu->cu_pv.pv_dport_id = ntohs(cpdu->cbu_portid); in bstp_decode_bpdu()
367 cu->cu_pv.pv_port_id = bp->bp_port_id; in bstp_decode_bpdu()
368 cu->cu_message_type = cpdu->cbu_bpdutype; in bstp_decode_bpdu()
376 cu->cu_role = BSTP_ROLE_DESIGNATED; in bstp_decode_bpdu()
384 cu->cu_topology_change_ack = in bstp_decode_bpdu()
386 cu->cu_proposal = in bstp_decode_bpdu()
388 cu->cu_agree = in bstp_decode_bpdu()
390 cu->cu_learning = in bstp_decode_bpdu()
392 cu->cu_forwarding = in bstp_decode_bpdu()
394 cu->cu_topology_change = in bstp_decode_bpdu()
399 cu->cu_role = BSTP_ROLE_ROOT; in bstp_decode_bpdu()
402 cu->cu_role = BSTP_ROLE_ALTERNATE; in bstp_decode_bpdu()
405 cu->cu_role = BSTP_ROLE_DESIGNATED; in bstp_decode_bpdu()
636 struct bstp_config_unit *cu = &bp->bp_msg_cu; in bstp_received_stp() local
651 bstp_decode_bpdu(bp, &cpdu, cu); in bstp_received_stp()
652 bstp_received_bpdu(bs, bp, cu); in bstp_received_stp()
662 struct bstp_config_unit *cu = &bp->bp_msg_cu; in bstp_received_rstp() local
674 bstp_decode_bpdu(bp, &cpdu, cu); in bstp_received_rstp()
675 bstp_received_bpdu(bs, bp, cu); in bstp_received_rstp()
688 struct bstp_config_unit *cu) in bstp_received_bpdu() argument
701 type = bstp_pdu_rcvtype(bp, cu); in bstp_received_bpdu()
709 if (cu->cu_proposal && cu->cu_forwarding == 0) { in bstp_received_bpdu()
712 if (cu->cu_topology_change) { in bstp_received_bpdu()
715 if (cu->cu_topology_change_ack) { in bstp_received_bpdu()
725 bp->bp_port_pv = cu->cu_pv; in bstp_received_bpdu()
726 bp->bp_port_msg_age = cu->cu_message_age; in bstp_received_bpdu()
727 bp->bp_port_max_age = cu->cu_max_age; in bstp_received_bpdu()
728 bp->bp_port_fdelay = cu->cu_forward_delay; in bstp_received_bpdu()
730 (cu->cu_hello_time > BSTP_MIN_HELLO_TIME ? in bstp_received_bpdu()
731 cu->cu_hello_time : BSTP_MIN_HELLO_TIME); in bstp_received_bpdu()
741 if (cu->cu_proposal && cu->cu_forwarding == 0) { in bstp_received_bpdu()
744 if (cu->cu_topology_change) { in bstp_received_bpdu()
747 if (cu->cu_topology_change_ack) { in bstp_received_bpdu()
756 if (cu->cu_learning) { in bstp_received_bpdu()
767 if (cu->cu_agree && bp->bp_ptp_link) { in bstp_received_bpdu()
774 if (cu->cu_topology_change) { in bstp_received_bpdu()
777 if (cu->cu_topology_change_ack) { in bstp_received_bpdu()
790 bstp_pdu_rcvtype(struct bstp_port *bp, struct bstp_config_unit *cu) in bstp_pdu_rcvtype() argument
797 switch (cu->cu_role) { in bstp_pdu_rcvtype()
799 if (bstp_info_superior(&bp->bp_port_pv, &cu->cu_pv)) { in bstp_pdu_rcvtype()
802 } else if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) == in bstp_pdu_rcvtype()
804 if (bp->bp_port_msg_age != cu->cu_message_age || in bstp_pdu_rcvtype()
805 bp->bp_port_max_age != cu->cu_max_age || in bstp_pdu_rcvtype()
806 bp->bp_port_fdelay != cu->cu_forward_delay || in bstp_pdu_rcvtype()
807 bp->bp_port_htime != cu->cu_hello_time) { in bstp_pdu_rcvtype()
824 if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) <= INFO_SAME) { in bstp_pdu_rcvtype()