Lines Matching defs:bpdu

254 	struct bstp_cbpdu bpdu;
258 bpdu.cbu_rootpri = htons(bp->bp_desg_pv.pv_root_id >> 48);
259 PV2ADDR(bp->bp_desg_pv.pv_root_id, bpdu.cbu_rootaddr);
261 bpdu.cbu_rootpathcost = htonl(bp->bp_desg_pv.pv_cost);
263 bpdu.cbu_bridgepri = htons(bp->bp_desg_pv.pv_dbridge_id >> 48);
264 PV2ADDR(bp->bp_desg_pv.pv_dbridge_id, bpdu.cbu_bridgeaddr);
266 bpdu.cbu_portid = htons(bp->bp_port_id);
267 bpdu.cbu_messageage = htons(bp->bp_desg_msg_age);
268 bpdu.cbu_maxage = htons(bp->bp_desg_max_age);
269 bpdu.cbu_hellotime = htons(bp->bp_desg_htime);
270 bpdu.cbu_forwarddelay = htons(bp->bp_desg_fdelay);
272 bpdu.cbu_flags = bstp_pdu_flags(bp);
276 bpdu.cbu_bpdutype = BSTP_MSGTYPE_CFG;
280 bpdu.cbu_bpdutype = BSTP_MSGTYPE_RSTP;
284 bstp_send_bpdu(bs, bp, &bpdu);
290 struct bstp_tbpdu bpdu;
308 m->m_pkthdr.len = sizeof(*eh) + sizeof(bpdu);
315 eh->ether_type = htons(sizeof(bpdu));
317 bpdu.tbu_ssap = bpdu.tbu_dsap = LLC_8021D_LSAP;
318 bpdu.tbu_ctl = LLC_UI;
319 bpdu.tbu_protoid = 0;
320 bpdu.tbu_protover = 0;
321 bpdu.tbu_bpdutype = BSTP_MSGTYPE_TCN;
323 memcpy(mtod(m, caddr_t) + sizeof(*eh), &bpdu, sizeof(bpdu));
404 struct bstp_cbpdu *bpdu)
423 bpdu->cbu_ssap = bpdu->cbu_dsap = LLC_8021D_LSAP;
424 bpdu->cbu_ctl = LLC_UI;
425 bpdu->cbu_protoid = htons(BSTP_PROTO_ID);
430 switch (bpdu->cbu_bpdutype) {
432 bpdu->cbu_protover = BSTP_PROTO_STP;
435 memcpy(mtod(m, caddr_t) + sizeof(*eh), bpdu,
440 bpdu->cbu_protover = BSTP_PROTO_RSTP;
441 bpdu->cbu_versionlen = htons(0);
444 memcpy(mtod(m, caddr_t) + sizeof(*eh), bpdu,
765 /* bpdu priority is superior */
773 /* bpdu priority is equal and timers differ */
776 /* bpdu is equal */
779 /* bpdu priority is worse */