Lines Matching full:cu
269 struct bstp_config_unit *cu) in bstp_decode_bpdu() argument
273 cu->cu_pv.pv_root_id = in bstp_decode_bpdu()
282 cu->cu_pv.pv_dbridge_id = in bstp_decode_bpdu()
291 cu->cu_pv.pv_cost = ntohl(cpdu->cbu_rootpathcost); in bstp_decode_bpdu()
292 cu->cu_message_age = ntohs(cpdu->cbu_messageage); in bstp_decode_bpdu()
293 cu->cu_max_age = ntohs(cpdu->cbu_maxage); in bstp_decode_bpdu()
294 cu->cu_hello_time = ntohs(cpdu->cbu_hellotime); in bstp_decode_bpdu()
295 cu->cu_forward_delay = ntohs(cpdu->cbu_forwarddelay); in bstp_decode_bpdu()
296 cu->cu_pv.pv_dport_id = ntohs(cpdu->cbu_portid); in bstp_decode_bpdu()
297 cu->cu_pv.pv_port_id = bp->bp_port_id; in bstp_decode_bpdu()
298 cu->cu_message_type = cpdu->cbu_bpdutype; in bstp_decode_bpdu()
306 cu->cu_role = BSTP_ROLE_DESIGNATED; in bstp_decode_bpdu()
314 cu->cu_topology_change_ack = in bstp_decode_bpdu()
316 cu->cu_proposal = in bstp_decode_bpdu()
318 cu->cu_agree = in bstp_decode_bpdu()
320 cu->cu_learning = in bstp_decode_bpdu()
322 cu->cu_forwarding = in bstp_decode_bpdu()
324 cu->cu_topology_change = in bstp_decode_bpdu()
329 cu->cu_role = BSTP_ROLE_ROOT; in bstp_decode_bpdu()
332 cu->cu_role = BSTP_ROLE_ALTERNATE; in bstp_decode_bpdu()
335 cu->cu_role = BSTP_ROLE_DESIGNATED; in bstp_decode_bpdu()
536 struct bstp_config_unit *cu = &bp->bp_msg_cu; in bstp_received_stp() local
550 bstp_decode_bpdu(bp, &cpdu, cu); in bstp_received_stp()
551 bstp_received_bpdu(bs, bp, cu); in bstp_received_stp()
561 struct bstp_config_unit *cu = &bp->bp_msg_cu; in bstp_received_rstp() local
571 bstp_decode_bpdu(bp, &cpdu, cu); in bstp_received_rstp()
572 bstp_received_bpdu(bs, bp, cu); in bstp_received_rstp()
585 struct bstp_config_unit *cu) in bstp_received_bpdu() argument
599 if (cu->cu_message_age >= cu->cu_max_age) { in bstp_received_bpdu()
602 if (cu->cu_max_age < BSTP_MIN_MAX_AGE || in bstp_received_bpdu()
603 cu->cu_max_age > BSTP_MAX_MAX_AGE) { in bstp_received_bpdu()
606 if (cu->cu_forward_delay < BSTP_MIN_FORWARD_DELAY || in bstp_received_bpdu()
607 cu->cu_forward_delay > BSTP_MAX_FORWARD_DELAY) { in bstp_received_bpdu()
610 if (cu->cu_hello_time < BSTP_MIN_HELLO_TIME || in bstp_received_bpdu()
611 cu->cu_hello_time > BSTP_MAX_HELLO_TIME) { in bstp_received_bpdu()
615 type = bstp_pdu_rcvtype(bp, cu); in bstp_received_bpdu()
623 if (cu->cu_proposal && cu->cu_forwarding == 0) in bstp_received_bpdu()
625 if (cu->cu_topology_change) in bstp_received_bpdu()
627 if (cu->cu_topology_change_ack) in bstp_received_bpdu()
635 bp->bp_port_pv = cu->cu_pv; in bstp_received_bpdu()
636 bp->bp_port_msg_age = cu->cu_message_age; in bstp_received_bpdu()
637 bp->bp_port_max_age = cu->cu_max_age; in bstp_received_bpdu()
638 bp->bp_port_fdelay = cu->cu_forward_delay; in bstp_received_bpdu()
640 (cu->cu_hello_time > BSTP_MIN_HELLO_TIME ? in bstp_received_bpdu()
641 cu->cu_hello_time : BSTP_MIN_HELLO_TIME); in bstp_received_bpdu()
651 if (cu->cu_proposal && cu->cu_forwarding == 0) in bstp_received_bpdu()
653 if (cu->cu_topology_change) in bstp_received_bpdu()
655 if (cu->cu_topology_change_ack) in bstp_received_bpdu()
663 if (cu->cu_learning) { in bstp_received_bpdu()
674 if (cu->cu_agree && bp->bp_ptp_link) { in bstp_received_bpdu()
680 if (cu->cu_topology_change) in bstp_received_bpdu()
682 if (cu->cu_topology_change_ack) in bstp_received_bpdu()
694 bstp_pdu_rcvtype(struct bstp_port *bp, struct bstp_config_unit *cu) in bstp_pdu_rcvtype() argument
701 switch (cu->cu_role) { in bstp_pdu_rcvtype()
703 if (bstp_info_superior(&bp->bp_port_pv, &cu->cu_pv)) in bstp_pdu_rcvtype()
706 else if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) == in bstp_pdu_rcvtype()
708 if (bp->bp_port_msg_age != cu->cu_message_age || in bstp_pdu_rcvtype()
709 bp->bp_port_max_age != cu->cu_max_age || in bstp_pdu_rcvtype()
710 bp->bp_port_fdelay != cu->cu_forward_delay || in bstp_pdu_rcvtype()
711 bp->bp_port_htime != cu->cu_hello_time) in bstp_pdu_rcvtype()
726 if (bstp_info_cmp(&bp->bp_port_pv, &cu->cu_pv) <= INFO_SAME) in bstp_pdu_rcvtype()