Author: toad
Date: 2007-10-25 16:22:21 +0000 (Thu, 25 Oct 2007)
New Revision: 15558

Modified:
   trunk/freenet/src/freenet/io/comm/DMT.java
Log:
New path folding messages

Modified: trunk/freenet/src/freenet/io/comm/DMT.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/DMT.java  2007-10-25 16:10:49 UTC (rev 
15557)
+++ trunk/freenet/src/freenet/io/comm/DMT.java  2007-10-25 16:22:21 UTC (rev 
15558)
@@ -118,6 +118,9 @@
        public static final String OPENNET_NODEREF = "opennetNoderef";
        public static final String REMOVE = "remove";
        public static final String PURGE = "purge";
+       public static final String TRANSFER_UID = "transferUID";
+       public static final String NODEREF_LENGTH = "noderefLength";
+       public static final String PADDED_LENGTH = "paddedLength";

        //Diagnostic
        public static final MessageType ping = new MessageType("ping") {{
@@ -722,7 +725,7 @@
        // Opennet completions (not sent to darknet nodes)

        /** Sent when a request to an opennet node is completed, but the data 
source does not want to 
-        * path fold */
+        * path fold. Sent even on pure darknet. A better name might be 
FNPRequestCompletedAck. */
        public static MessageType FNPOpennetCompletedAck = new 
MessageType("FNPOpennetCompletedAck") {{
                addField(UID, Long.class);
        }};
@@ -733,7 +736,8 @@
                return msg;
        }

-       /** Sent when a request completes and the data source does want to path 
fold */
+       /** Sent when a request completes and the data source does want to path 
fold. Old version, includes 
+        * the inline variable-length noderef. Opens up a nasty traffic 
analysis (route tracing) vulnerability. */
        public static MessageType FNPOpennetConnectDestination = new 
MessageType("FNPOpennetConnectDestination") {{
                addField(UID, Long.class);
                addField(OPENNET_NODEREF, ShortBuffer.class);
@@ -746,7 +750,8 @@
                return msg;
        }

-       /** Path folding response */
+       /** Path folding response. Old version, includes the inline 
variable-length noderef. Opens up a 
+        * nasty traffic analysis (route tracing) vulnerability. */
        public static MessageType FNPOpennetConnectReply = new 
MessageType("FNPOpennetConnectReply") {{
                addField(UID, Long.class);
                addField(OPENNET_NODEREF, ShortBuffer.class);
@@ -759,6 +764,26 @@
                return msg;
        }

+       /** Sent when a request completes and the data source wants to path 
fold. Starts a bulk data 
+        * transfer including the (padded) noderef. 
+        */
+       public static MessageType FNPOpennetConnectDestinationNew = new 
MessageType("FNPConnectDestinationNew") {{
+               addField(UID, Long.class); // UID of original message chain
+               addField(TRANSFER_UID, Long.class); // UID of data transfer
+               addField(NODEREF_LENGTH, Integer.class); // Size of noderef
+               addField(PADDED_LENGTH, Integer.class); // Size of actual 
transfer i.e. padded length
+       }};
+       
+       /** Path folding response. Sent when the requestor wants to path fold 
and has received a noderef 
+        * from the data source. Starts a bulk data transfer including the 
(padded) noderef. 
+        */
+       public static MessageType FNPOpennetConnectReplyNew = new 
MessageType("FNPConnectReplyNew") {{
+               addField(UID, Long.class); // UID of original message chain
+               addField(TRANSFER_UID, Long.class); // UID of data transfer
+               addField(NODEREF_LENGTH, Integer.class); // Size of noderef
+               addField(PADDED_LENGTH, Integer.class); // Size of actual 
transfer i.e. padded length
+       }};
+       
        // Key offers (ULPRs)

        public static MessageType FNPOfferKey = new MessageType("FNPOfferKey") 
{{


Reply via email to