Hi All,

 I was playing with the ping packet tutorial by Marc Greis. I want to
send ping packets over a broadcast address in wireless media. I was
able to port ping program to wireless media.

My question is how do I set the destination  address as broadcast
address. In mailing list, I found that the solution is:

        hdr_ip* hdrip = (hdr_ip*)pkt->access(off_ip_);
        hdrip->daddr() = IP_BROADCAST;

        hdr_cmn* cmh = (hdr_cmn*)HDR_CMN(pkt);
       cmh->direction() = hdr_cmn::DOWN;
                cmh->next_hop_ = IP_BROADCAST;
                cmh->addr_type_ = NS_AF_INET;

However since PING is an user defined packet, there won't be an IP
part of it. So how do we set the next hop information so as to make it
as a broadcast packet?

Tarun

Reply via email to