Changeset 4770

Show
Ignore:
Timestamp:
04/09/10 14:54:50 (4 years ago)
Author:
soohyunc
Message:

record packet size and print

Location:
vic/branches/cc/cc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/cc/cc/tfwc_sndr.cpp

    r4764 r4770  
    142142 
    143143        // record of packet size in bytes 
    144         record_ = (u_int16_t *)malloc(sizeof(u_int16_t) * RECORD); 
    145         clear_record(RECORD); 
     144        record_ = (u_int16_t *)malloc(sizeof(u_int16_t) * PSR); 
     145        clear_record(PSR); 
    146146} 
    147147 
     
    151151        ts_off_ = tx_ts_offset(); 
    152152 
    153         // number of bytes for this packet 
    154         record_[seqno_%RECORD] = pb->len; 
    155153        // parse seqno and mark timestamp for this data packet 
    156154        rtphdr* rh = (rtphdr *) pb->data; 
    157155        seqno_  = ntohs(rh->rh_seqno); 
    158156        now_    = now; 
     157        // number of bytes for this packet 
     158        record_[seqno_%PSR] = pb->len; 
     159        //print_psize(now_, record_[seqno_%PSR]), 
    159160 
    160161        // timestamp vector for loss history update 
  • vic/branches/cc/cc/tfwc_sndr.h

    r4764 r4770  
    4242#define SSZ 1000        // seqvec_ size 
    4343#define RSZ 1000        // refvec_ size 
    44 #define RECORD 10000 
     44#define PSR 10000       // packet size record 
    4545 
    4646#define SHORT_HISTORY           // history size = 8 
     
    360360                fprintf(stderr, " %d", vec[i]); 
    361361        fprintf(stderr, " )\n"); 
     362        } 
     363 
     364        // print packet size 
     365        inline void print_psize(double now, int size) { 
     366        fprintf(stderr, "\tnow: %d psize: %d\n", now, size); 
    362367        } 
    363368