[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] stampPacket missing for format_msg(), VBR on UDP



I found the problem in packet.h. Here a UDP packet is not counted as a data packet.
I added the last entry. Were there any reason, why it wasn't there ? (snapshot-20001114)

  static bool data_packet(packet_t type) {
    return ( (type) == PT_TCP || \
       (type) == PT_TELNET || \
       (type) == PT_CBR || \
       (type) == PT_AUDIO || \
       (type) == PT_VIDEO || \
       (type) == PT_ACK || \
       (type) == PT_UDP \         // PT_UDP is also a data packet.
       );

On Fri, Dec 22, 2000 at 12:11:09PM +0200, Emre Celebi wrote:
> I see that for PT_UDP or PT_MESSAGE ( in cmu-trace.cc ) we don't dump any information. (See cmu-trace.cc: CMUTrace::format_msg()).
> I have modified, in order to do so, but I've seen that optimal number of forwards is not being calculated right somehow, therefore 0. TCP flows have it calculated right (-Po), but a tracefile input sent over UDP, malfunction.
> God must have it stamped, too before sending. In god.cc at stampPacket(), everything seems fine:
> 
> hdr_cmn *ch = HDR_CMN(p);
> struct hdr_ip *ih = HDR_IP(p);
> nsaddr_t src = ih->saddr();
> nsaddr_t dst = ih->daddr();
> assert(min_hops);
> if (!packet_info.data_packet(ch->ptype())) return;
> if (dst > num_nodes || src > num_nodes) return; // broadcast pkt
> ch->opt_num_forwards() = min_hops[src * num_nodes + dst];
> 
> So what's wrong?
> EC

-- 
Emre Celebi
Bogazici University, Department of Computer Engineering
CNRL Computer Networks Research Lab  Phone:+90 212 2631540 ext 2125
Wireless Mobile Ad-Hoc Networks Group - ANT. [email protected]
"Perilous to all of us are the devices of an art deeper than we ourselves possess." -  Gandalf The Grey, J.R.R. Tolkien, "Lord of the Rings"