Hello

You should use in the ip header

ih->daddr() = IP_BROADCAST;

like this.

Hope it helps

Regards
Mubashir Husain Rehmani

2008/8/21 <[EMAIL PROTECTED]>

>
> 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.
>
>


-- 
Mubashir Husain Rehmani

Mobile : 00 33 (0)6 32 00 89 35

Reply via email to