go home
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 28 Oct 2009 18:51:36 +0000 (18:51 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Wed, 28 Oct 2009 18:51:36 +0000 (18:51 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@490 e16421f0-f15b-0410-abcd-98678b794739

BUGS
datagram.cpp
ext/seq_picker.cpp
sendrecv.cpp
tests/connecttest.cpp

diff --git a/BUGS b/BUGS
index 5e3d004..2dfe512 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1,3 +1,12 @@
     * hints, data for non-existing ranges
     * opens multiple channels to the same address
-    * hints do not expire
+    v hints do not expire
+    * survive 10% loss
+    * unlimited ping pong
+    * git
+    * check hints agains ack_out?_
+    * check data against ack_in
+    * channel suspend/wake. 3 cong modes state machine - ???
+    * minimize the number of template instantiations
+    * Channel thinks how much it HINTs a second,
+      picker thinks which HINTs are snubbed
index 5776d98..08abef0 100644 (file)
@@ -14,6 +14,7 @@
 #else
     #include <arpa/inet.h>
 #endif
+#define RND_DROP 10
 #include <glog/logging.h>
 #include "datagram.h"
 
@@ -42,11 +43,13 @@ char* Datagram::TimeStr (tint time) {
 }
     
 int Datagram::Send () {
-    if (rand()%10==0) {
+#ifdef RND_DROP
+    if (rand()%RND_DROP==0) {
         Time();
         dprintf("%s datagram killed\n",TimeStr());
         return size();
     }
+#endif
        int r = sendto(sock,(const char *)buf+offset,length-offset,0,
                                   (struct sockaddr*)&(addr.addr),sizeof(struct sockaddr_in));
        //offset=0;
index cc8a782..a880100 100644 (file)
@@ -23,7 +23,7 @@ public:
     }
     
     virtual bin64_t Pick (bins& offer, uint8_t layer) {
-        
+
         bin64_t hint = offer.find_filtered
             (ack_hint_out_,bin64_t::ALL,layer,bins::FILLED);
         if (hint==bin64_t::NONE)
@@ -47,7 +47,7 @@ public:
     }
     
     virtual void    Expired (bins& b) {
-        ack_hint_out_.remove(b);
+        ack_hint_out_.remove(b); // may invalidate
     }
     
 };
index bd0dfe7..c31bf1c 100644 (file)
@@ -138,7 +138,7 @@ void        Channel::AddHint (Datagram& dgram) {
         
         uint8_t layer = 2; // actually, enough
         bin64_t hint = file().picker().Pick(ack_in_,layer);
-        // FIXME: any layer
+        // FIXME FIXME FIXME: any layer
         if (hint==bin64_t::NONE)
             hint = file().picker().Pick(ack_in_,0);
         
index b0bd23e..21ab809 100644 (file)
@@ -49,6 +49,8 @@ using namespace p2tp;
 
 
 TEST(P2TP,CwndTest) {
+
+    srand ( time(NULL) );
     
     unlink("doc/sofi-copy.jpg");
     struct stat st;
@@ -90,7 +92,7 @@ TEST(P2TP,CwndTest) {
        p2tp::Loop(TINT_SEC);
     
     int count = 0;
-    while (p2tp::SeqComplete(copy)!=size && count++<20)
+    while (p2tp::SeqComplete(copy)!=size && count++<600)
         p2tp::Loop(TINT_SEC);
     ASSERT_EQ(size,p2tp::SeqComplete(copy));