MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bstp_received_stp

Function bstp_received_stp

freebsd/net/bridgestp.c:530–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530static void
531bstp_received_stp(struct bstp_state *bs, struct bstp_port *bp,
532 struct mbuf **mp, struct bstp_tbpdu *tpdu)
533{
534 struct bstp_cbpdu cpdu;
535 struct bstp_config_unit *cu = &bp->bp_msg_cu;
536 struct bstp_tcn_unit tu;
537
538 switch (tpdu->tbu_bpdutype) {
539 case BSTP_MSGTYPE_TCN:
540 tu.tu_message_type = tpdu->tbu_bpdutype;
541 bstp_received_tcn(bs, bp, &tu);
542 break;
543 case BSTP_MSGTYPE_CFG:
544 if ((*mp)->m_len < BSTP_BPDU_STP_LEN &&
545 (*mp = m_pullup(*mp, BSTP_BPDU_STP_LEN)) == NULL)
546 return;
547 memcpy(&cpdu, mtod(*mp, caddr_t), BSTP_BPDU_STP_LEN);
548
549 bstp_decode_bpdu(bp, &cpdu, cu);
550 bstp_received_bpdu(bs, bp, cu);
551 break;
552 }
553}
554
555static void
556bstp_received_rstp(struct bstp_state *bs, struct bstp_port *bp,

Callers 1

bstp_inputFunction · 0.85

Calls 5

bstp_received_tcnFunction · 0.85
m_pullupFunction · 0.85
bstp_decode_bpduFunction · 0.85
bstp_received_bpduFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected