[Sumover-dev] [svn commit] r4770 - vic/branches/cc/cc
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Apr 9 14:54:50 BST 2010
Author: soohyunc
Date: Fri Apr 9 14:54:50 2010
New Revision: 4770
Modified:
vic/branches/cc/cc/tfwc_sndr.cpp
vic/branches/cc/cc/tfwc_sndr.h
Log:
record packet size and print
Modified: vic/branches/cc/cc/tfwc_sndr.cpp
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.cpp (original)
+++ vic/branches/cc/cc/tfwc_sndr.cpp Fri Apr 9 14:54:50 2010
@@ -141,8 +141,8 @@
reorder_ = false;
// record of packet size in bytes
- record_ = (u_int16_t *)malloc(sizeof(u_int16_t) * RECORD);
- clear_record(RECORD);
+ record_ = (u_int16_t *)malloc(sizeof(u_int16_t) * PSR);
+ clear_record(PSR);
}
void TfwcSndr::tfwc_sndr_send(pktbuf* pb, double now) {
@@ -150,12 +150,13 @@
if(seqno_ == 0)
ts_off_ = tx_ts_offset();
- // number of bytes for this packet
- record_[seqno_%RECORD] = pb->len;
// parse seqno and mark timestamp for this data packet
rtphdr* rh = (rtphdr *) pb->data;
seqno_ = ntohs(rh->rh_seqno);
now_ = now;
+ // number of bytes for this packet
+ record_[seqno_%PSR] = pb->len;
+ //print_psize(now_, record_[seqno_%PSR]),
// timestamp vector for loss history update
tsvec_[seqno_%TSZ] = now_-SKEW;
Modified: vic/branches/cc/cc/tfwc_sndr.h
==============================================================================
--- vic/branches/cc/cc/tfwc_sndr.h (original)
+++ vic/branches/cc/cc/tfwc_sndr.h Fri Apr 9 14:54:50 2010
@@ -41,7 +41,7 @@
#define TSZ 1000 // tsvec_ size
#define SSZ 1000 // seqvec_ size
#define RSZ 1000 // refvec_ size
-#define RECORD 10000
+#define PSR 10000 // packet size record
#define SHORT_HISTORY // history size = 8
#ifdef SHORT_HISTORY
@@ -361,6 +361,11 @@
fprintf(stderr, " )\n");
}
+ // print packet size
+ inline void print_psize(double now, int size) {
+ fprintf(stderr, "\tnow: %d psize: %d\n", now, size);
+ }
+
int ndtp_; // number of data packet sent
int nakp_; // number of ackvec packet received
int ntep_; // number of ts echo packet received
More information about the Sumover-dev
mailing list