On Tue, Sep 02, 2003 at 06:31:33AM +0000, Raphael Manfredi wrote:
> Quoting Craig Barnes <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel:
> :
> : in LimeWire:
> :
> : // these specs may seem backwards, but they are not -
> : // ByteOrder.short2leb puts the low-order byte first, so over the
> : // network 0x0080 would look like 0x8000
> : public static final int SPECIAL_MINSPEED_MASK = 0x0080;
> : public static final int SPECIAL_FIREWALL_MASK = 0x0040;
> : public static final int SPECIAL_XML_MASK = 0x0020;
> : public static final int SPECIAL_OUTOFBAND_MASK = 0x0004;
> :
>
> I don't see any difference here. 0x8000 in GTKG (big-endian) is precisely
> 0x0080 (little-endian), and LimeWire's comment specifies that they are
> little-endian.
To rephrase better what I wrote in my last message, since LimeWire and
GTKG both use little-endian encoding for the MinSpeed bytes, but check
the bytes against different bitmasks, they must be using different bits.
Since my last message I have verified this is true. I had to patch the
latest LimeWire CVS not to do ultrapeer preferencing in order to get
LimeWire and GTKG to connect to each other. Then, I sent a query from
the LimeWire node and made gtk-gnutella print out what it received from
LimeWire in the MinSpeed field.
GTKG saw 0x00e0, which is a byte-swapped version of (QUERY_SPEED_MARK |
QUERY_SPEED_FIREWALLED | QUERY_SPEED_NO_XML), and doesn't match with any
of GTKG's bitmasks for those bits (0x8000, 0x4000, 0x2000).
Here is what was printed out. The output shows LimeWire and GTKG are
definitely using different bits at the moment:
minspeed=0x00e0, looking for=0xe000
--- src/share.c Tue Sep 2 22:58:29 2003
+++ src/share.c Wed Sep 3 17:46:28 2003
@@ -1856,6 +1856,9 @@ gboolean search_request(struct gnutella_
READ_GUINT16_LE(n->data, req_speed);
+ printf("minspeed=0x%04x, looking for=0x%04x\n", req_speed,
+ QUERY_SPEED_MARK | QUERY_SPEED_FIREWALLED | QUERY_SPEED_NO_XML);
+
/*
* Special processing for the "connection speed" field of queries.
*
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Gtk-gnutella-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel