| 553 | } |
| 554 | |
| 555 | static void |
| 556 | bstp_received_rstp(struct bstp_state *bs, struct bstp_port *bp, |
| 557 | struct mbuf **mp, struct bstp_tbpdu *tpdu) |
| 558 | { |
| 559 | struct bstp_cbpdu cpdu; |
| 560 | struct bstp_config_unit *cu = &bp->bp_msg_cu; |
| 561 | |
| 562 | if (tpdu->tbu_bpdutype != BSTP_MSGTYPE_RSTP) |
| 563 | return; |
| 564 | |
| 565 | if ((*mp)->m_len < BSTP_BPDU_RSTP_LEN && |
| 566 | (*mp = m_pullup(*mp, BSTP_BPDU_RSTP_LEN)) == NULL) |
| 567 | return; |
| 568 | memcpy(&cpdu, mtod(*mp, caddr_t), BSTP_BPDU_RSTP_LEN); |
| 569 | |
| 570 | bstp_decode_bpdu(bp, &cpdu, cu); |
| 571 | bstp_received_bpdu(bs, bp, cu); |
| 572 | } |
| 573 | |
| 574 | static void |
| 575 | bstp_received_tcn(struct bstp_state *bs, struct bstp_port *bp, |
no test coverage detected