[ns] Help concearning broadcasting messages - protocols
fhg07@c3sl.ufpr.br
fhg07 at c3sl.ufpr.br
Thu Aug 21 06:04:58 PDT 2008
Well.. I'm trying to learn how to implement protocols to NS2,30. And I did
not understand how to broadcast a message in wireless networks.
Here is what I've got:
Packet* pkt = allocpkt(); // new packet
hdr_protex* hdr = (hdr_protex*) pkt->access(off_protex_);
hdr->type = 0; // sending initial msg or answering another?
hdr->id = 0; // type of the message
send(pkt, 0);
hdr_protex is the structure of the message I want to send, after setting
all its parameters, how do I broadcast it? I guess the send command that
I'm using there won't work, as it is not to work on a wired network.
Fernando.
More information about the Ns-users
mailing list