Hi all

I'm having a strange problem when I send a unicast packet in ns-2 (I use the 
IEEE 802.15.4 module). 

I've created a new packet type, and when the IP-destination field 
(HDR_IP->daddr()) is set to broadcast, the packet is received by the nodes 
correctly. However, when I set a specific address in the IP-destination field 
(e.g. the node whose id is 4), this is received at physical layer (void 
Phy802_15_4::recv(Packet *p, Handler *h)), but the fisrt if (if (sendUp(p) == 
0)) is satisfied and the packet is not send to upper layers. This is the reason 
I said "strange".

-------------------------------------------------------- 

wpan/p802_15_4phy.cc
-------------------------------------------------------- 

void Phy802_15_4::recv(Packet *p, Handler *h)
{
hdr_lrwpan* wph = HDR_LRWPAN(p);
hdr_cmn *ch = HDR_CMN(p);
        FrameCtrl frmCtrl;

switch(ch->direction())
{
case hdr_cmn::DOWN:
/**/
break;
case hdr_cmn::UP:
default:
if (sendUp(p) == 0)
{
// The problem is that this if is satisfied and I don't know why
Packet::free(p);
return;
}
 /**/
}
} 

--------------------------------------------------------

I appreciate all the help possible, thanks

David

Reply via email to