Hi, You just need to do from your c++ code:
Packet *pk = Packet::alloc(); struct hdr_cmn *chpk = HDR_CMN(pk); struct hdr_ip *ihpk = HDR_IP(pk); chpk->addr_type() = NS_AF_INET; ihpk->daddr() = dest; // the addr of the destination node ihpk->saddr() = my_index; //currnet node address ihpk->sport() = MyAgent_PORT; //agent defined port ihpk->dport() = MyAgent_PORT; //destination agent defined port If you need to send packet in broadcast mode, you replace the addr_type and the daddr by : chpk->addr_type() = NS_AF_NONE; ihpk->daddr() = IP_BROADCAST; Hope it helps. Bye. On 1/30/06, Ashutosh Srivastava <[EMAIL PROTECTED]> wrote: > > dear all > please help me out how to define source and destination nodes > for a packet to be sent from any node (I wish to use DSR protocol) . > > with regards > ashutosh > > > > --------------------------------- > Jiyo cricket on Yahoo! India cricket >
