hi, I am trying to send a MAC broadcast message in response to having overheard something. So I create and send a packet as follows (inside recvDATA before address filtering):
Packet* report_pkt = Packet::alloc(); hdr_ip* iph_report = hdr_ip::access(report_pkt); hdr_cmn* ch_report = hdr_cmn::access(report_pkt); hdr_wd* wd_report = hdr_wd::access(report_pkt); ch_report->direction() = hdr_cmn::DOWN; ch_report->next_hop() = IP_BROADCAST; ch_report->addr_type() = NS_AF_INET; ch_report->ptype() = PT_MAC; //method to set address iph_report->saddr() = Address::instance().create_ipaddr(NodeId,RT_PORT); iph_report->daddr() = IP_BROADCAST; iph_report->sport() = RT_PORT; iph_report->dport() = RT_PORT; iph_report->ttl() = IP_DEF_TTL; hdr_mac *mh_report = HDR_MAC(report_pkt); wd_report->is_bad_ = 1; wd_report->watchdog_id_ = NodeId; wd_report->watched_id_ = sorc; send(report_pkt,0); Then I put the following check in recvDATA: if(dst == MAC_BROADCAST) { if(ch->direction()==hdr_cmn::UP) if ( wd->BadCheck()==1 ) printf("In broadcast I am node %d and I heard a badness report for %d from ip src%d %d bad report %d dst is %d \n", netif_->node()->nodeid(), wd->WatchedID(), ssriph->saddr(), wd->WDID(), wd->BadCheck(), ssriph->daddr()); } The problem is, only node 0 is receiving these messages. No other node receives this message. Can anyone please give any suggestions, I have been stuck here for a week now. Should I put this functionality somewhere else maybe? thanks