Lines Matching defs:cu
216 struct bstp_config_unit *cu)
244 bpdu.cbu_bpdutype = cu->cu_message_type;
245 bpdu.cbu_flags = (cu->cu_topology_change ? BSTP_FLAG_TC : 0) |
246 (cu->cu_topology_change_acknowledgment ? BSTP_FLAG_TCA : 0);
248 bpdu.cbu_rootpri = htons(cu->cu_rootid >> 48);
249 bpdu.cbu_rootaddr[0] = cu->cu_rootid >> 40;
250 bpdu.cbu_rootaddr[1] = cu->cu_rootid >> 32;
251 bpdu.cbu_rootaddr[2] = cu->cu_rootid >> 24;
252 bpdu.cbu_rootaddr[3] = cu->cu_rootid >> 16;
253 bpdu.cbu_rootaddr[4] = cu->cu_rootid >> 8;
254 bpdu.cbu_rootaddr[5] = cu->cu_rootid >> 0;
256 bpdu.cbu_rootpathcost = htonl(cu->cu_root_path_cost);
258 bpdu.cbu_bridgepri = htons(cu->cu_rootid >> 48);
259 bpdu.cbu_bridgeaddr[0] = cu->cu_rootid >> 40;
260 bpdu.cbu_bridgeaddr[1] = cu->cu_rootid >> 32;
261 bpdu.cbu_bridgeaddr[2] = cu->cu_rootid >> 24;
262 bpdu.cbu_bridgeaddr[3] = cu->cu_rootid >> 16;
263 bpdu.cbu_bridgeaddr[4] = cu->cu_rootid >> 8;
264 bpdu.cbu_bridgeaddr[5] = cu->cu_rootid >> 0;
266 bpdu.cbu_portid = htons(cu->cu_port_id);
267 bpdu.cbu_messageage = htons(cu->cu_message_age);
268 bpdu.cbu_maxage = htons(cu->cu_max_age);
269 bpdu.cbu_hellotime = htons(cu->cu_hello_time);
270 bpdu.cbu_forwarddelay = htons(cu->cu_forward_delay);
291 struct bstp_config_unit *cu)
293 if (cu->cu_rootid < bif->bif_designated_root)
295 if (cu->cu_rootid > bif->bif_designated_root)
298 if (cu->cu_root_path_cost < bif->bif_designated_cost)
300 if (cu->cu_root_path_cost > bif->bif_designated_cost)
303 if (cu->cu_bridge_id < bif->bif_designated_bridge)
305 if (cu->cu_bridge_id > bif->bif_designated_bridge)
308 if (sc->sc_bridge_id != cu->cu_bridge_id)
310 if (cu->cu_port_id <= bif->bif_designated_port)
317 struct bridge_iflist *bif, struct bstp_config_unit *cu)
319 bif->bif_designated_root = cu->cu_rootid;
320 bif->bif_designated_cost = cu->cu_root_path_cost;
321 bif->bif_designated_bridge = cu->cu_bridge_id;
322 bif->bif_designated_port = cu->cu_port_id;
323 bstp_timer_start(&bif->bif_message_age_timer, cu->cu_message_age);
593 struct bstp_config_unit cu;
638 cu.cu_rootid =
647 cu.cu_bridge_id =
656 cu.cu_root_path_cost = ntohl(cpdu.cbu_rootpathcost);
657 cu.cu_message_age = ntohs(cpdu.cbu_messageage);
658 cu.cu_max_age = ntohs(cpdu.cbu_maxage);
659 cu.cu_hello_time = ntohs(cpdu.cbu_hellotime);
660 cu.cu_forward_delay = ntohs(cpdu.cbu_forwarddelay);
661 cu.cu_port_id = ntohs(cpdu.cbu_portid);
662 cu.cu_message_type = cpdu.cbu_bpdutype;
663 cu.cu_topology_change_acknowledgment =
665 cu.cu_topology_change =
669 bstp_received_config_bpdu(sc, bif, &cu);
684 struct bstp_config_unit *cu)
691 if (bstp_supersedes_port_info(sc, bif, cu)) {
692 bstp_record_config_information(sc, bif, cu);
708 bstp_record_config_timeout_values(sc, cu);
711 if (cu->cu_topology_change_acknowledgment)