対象のMACプロトコルはMAC_DOT11でなくMAC_802_11ですか?
であれば、phy_802_11.cppに
を追加して、さらにそのファイル内のPhy802_11SignalEndFromChannel()関数の以下の箇所で
01430 if (!receiveErrorOccurred) {
01431 newMsg = MESSAGE_Duplicate(node, propRxInfo->txMsg);
01432
01433 MESSAGE_RemoveHeader(
01434 node, newMsg, sizeof(Phy802_11PlcpHeader), TRACE_802_11);
01435
01436 MESSAGE_SetInstanceId(newMsg, (short) phyIndex);
01437 MAC_ReceivePacketFromPhy(
01438 node,
01439 node->phyData[phyIndex]->macInterfaceIndex,
01440 newMsg);
01441
01442 phy802_11->stats.totalRxSignalsToMac++;
01443 }
01444 else {
01445 Phy802_11ReportStatusToMac(
01446 node,
01447 phyIndex,
01448 phy802_11->mode);
01449
01450 phy802_11->stats.totalSignalsWithErrors++;
01451 }//if//
以下のようなことをやれば出来るんじゃないかと思います。
01430 if (!receiveErrorOccurred) {
01431 newMsg = MESSAGE_Duplicate(node, propRxInfo->txMsg);
01432
01433 MESSAGE_RemoveHeader(
01434 node, newMsg, sizeof(Phy802_11PlcpHeader), TRACE_802_11);
01435
01436 MESSAGE_SetInstanceId(newMsg, (short) phyIndex);
*****
***** int macInterfaceIndex = node->phyData[phyIndex]->macInterfaceIndex;
*****
***** switch (node->macData[macInterfaceIndex]->macProtocol)
***** {
***** case MAC_PROTOCOL_802_11:
***** {
***** MacData802_11* M802 = (MacData802_11*)node->macData[macInterfaceIndex]->macVar;
***** M802_11ShortControlFrame* hdr = (M802_11ShortControlFrame*) MESSAGE_ReturnPacket(newMsg);
*****
***** if (M802->selfAddr == hdr->destAddr) {
***** switch (hdr->frameType) {
***** case M802_11_RTS: {
***** //
***** // Write your own code
***** //
***** break;
***** }
***** case M802_11_CTS: {
***** //
***** // Write your own code
***** //
***** break;
***** }
***** default: {
***** //
***** // Write your own code
***** //
***** break;
***** }
***** }//switch//
***** }
***** }
***** default:
***** {
***** break;
***** }
***** }
01437 MAC_ReceivePacketFromPhy(
01438 node,
01439 node->phyData[phyIndex]->macInterfaceIndex,
01440 newMsg);
01441
01442 phy802_11->stats.totalRxSignalsToMac++;
01443 }
01444 else {
01445 Phy802_11ReportStatusToMac(
01446 node,
01447 phyIndex,
01448 phy802_11->mode);
01449
01450 phy802_11->stats.totalSignalsWithErrors++;
01451 }//if//
対象のMACプロトコルがMAC_DOT11の場合も、まぁ同じようにやればできるんじゃないかと思います。。