mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Tue, 14 Nov 2006 18:43:00 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/11/14 18:43:00

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonServer.ml guiDecoding.ml guiTypes.ml 
        src/networks/donkey: donkeyGlobals.ml donkeyImport.ml 
                             donkeyInteractive.ml donkeyProtoServer.ml 
                             donkeyServers.ml donkeyTypes.ml 

Log message:
        patch #5549

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1093&r2=1.1094
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonServer.ml?cvsroot=mldonkey&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiDecoding.ml?cvsroot=mldonkey&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiTypes.ml?cvsroot=mldonkey&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyGlobals.ml?cvsroot=mldonkey&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyImport.ml?cvsroot=mldonkey&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyInteractive.ml?cvsroot=mldonkey&r1=1.135&r2=1.136
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyProtoServer.ml?cvsroot=mldonkey&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyServers.ml?cvsroot=mldonkey&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyTypes.ml?cvsroot=mldonkey&r1=1.50&r2=1.51

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1093
retrieving revision 1.1094
diff -u -b -r1.1093 -r1.1094
--- distrib/ChangeLog   14 Nov 2006 16:35:52 -0000      1.1093
+++ distrib/ChangeLog   14 Nov 2006 18:42:59 -0000      1.1094
@@ -15,6 +15,7 @@
 =========
 
 2006/11/14
+5549: EDK: Parse all data from server.met, new HTML javascript popup
 5553: EDK/OV/KAD: small updates (bogeyman)
 - EDK: log unknown client tags with verbosity mct
 - OV/KAD: ignore OvernetPeerNotFound and log number of peers every

Index: src/daemon/common/commonServer.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonServer.ml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- src/daemon/common/commonServer.ml   25 Oct 2006 18:16:56 -0000      1.36
+++ src/daemon/common/commonServer.ml   14 Nov 2006 18:42:59 -0000      1.37
@@ -117,6 +117,7 @@
     T.server_lowid_users = 0L;
     T.server_ping = 0;
     T.server_published_files = 0;
+    T.server_features = None;
   }
 
 let server_num s =
@@ -370,6 +371,10 @@
       info.G.server_banner
 
 let server_print_html_header buf ext =
+     if !!html_mods_use_js_tooltips then Printf.bprintf buf
+"\\<div id=\\\"object1\\\" style=\\\"position:absolute; 
background-color:#FFFFDD;color:black;border-color:black;border-width:20px;font-size:8pt;
 visibility:visible; left:25px; top:
+-100px; z-index:+1\\\" onmouseover=\\\"overdiv=1;\\\"  
onmouseout=\\\"overdiv=0; 
setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>\\&nbsp;\\</div\\>";
+
     html_mods_table_header buf "serversTable" (Printf.sprintf "servers%s" ext) 
([
     ( "1", "srh", "Server number", "#" ) ;
     ( "0", "srh", "Connect|Disconnect", "C/D" ) ;
@@ -408,11 +413,31 @@
   
   if use_html_mods o then begin
   let snum = (server_num s) in
+    let ip_port_string = 
+      Printf.sprintf "%s:%s%s" 
+      (Ip.string_of_addr info.G.server_addr)
+       (string_of_int info.G.server_port)
+       (if info.G.server_realport <> 0 
+          then "(" ^ (string_of_int info.G.server_realport) ^ ")" 
+            else ""
+        )
+    in
+
+    Printf.bprintf buf "\\<tr class=\\\"dl-%d\\\""
+    (html_mods_cntr ());
+
+    (if !!html_mods_use_js_tooltips then
+       Printf.bprintf buf " 
onMouseOver=\\\"mOvr(this);setTimeout('popLayer(\\\\\'%s 
%s<br>%s\\\\\')',%d);setTimeout('hideLayer()',%d);return true;\\\" 
onMouseOut=\\\"mOut(this);hideLayer();setTimeout('hideLayer()',%d)\\\"\\>"
+        info.G.server_name ip_port_string 
+       (match info.G.server_features with
+       | None -> ""
+       | Some f -> "server features: " ^ f)
+       !!html_mods_js_tooltips_wait
+       !!html_mods_js_tooltips_timeout
+       !!html_mods_js_tooltips_wait);
 
-    Printf.bprintf buf "\\<tr class=\\\"dl-%d\\\"\\>
-    \\<td class=\\\"srb\\\" %s \\>%d\\</td\\>
-      %s %s %s"
-    (html_mods_cntr ())
+    Printf.bprintf buf 
+" \\<td class=\\\"srb\\\" %s \\>%d\\</td\\> %s %s %s"
     (match impl.impl_server_state with
         Connected _ -> 
             Printf.sprintf "title=\\\"Server Banner\\\"
@@ -494,16 +519,6 @@
       | _ -> string_of_connection_state impl.impl_server_state
     in
 
-    let ip_port_string = 
-      Printf.sprintf "%s:%s%s" 
-      (Ip.string_of_addr info.G.server_addr)
-       (string_of_int info.G.server_port)
-       (if info.G.server_realport <> 0 
-          then "(" ^ (string_of_int info.G.server_realport) ^ ")" 
-            else ""
-        )
-    in
-
     let cc,cn = Geoip.get_country (Ip.ip_of_addr info.G.server_addr) in
     html_mods_td buf ([
       ("", "srb", if info.G.server_master then "M" else "-");

Index: src/daemon/common/guiDecoding.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiDecoding.ml,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- src/daemon/common/guiDecoding.ml    9 Nov 2006 21:32:26 -0000       1.64
+++ src/daemon/common/guiDecoding.ml    14 Nov 2006 18:42:59 -0000      1.65
@@ -759,6 +759,7 @@
     server_hard_limit = ha;
     server_ping = pi;
     server_published_files = 0;
+    server_features = None;
   }, pos
 
 let get_client_type s pos = 

Index: src/daemon/common/guiTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiTypes.ml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/daemon/common/guiTypes.ml       31 Oct 2006 15:40:05 -0000      1.33
+++ src/daemon/common/guiTypes.ml       14 Nov 2006 18:42:59 -0000      1.34
@@ -178,6 +178,7 @@
     mutable server_lowid_users : int64;
     mutable server_ping : int;
     mutable server_published_files : int;
+    mutable server_features : string option;
 
   } 
 

Index: src/networks/donkey/donkeyGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- src/networks/donkey/donkeyGlobals.ml        12 Nov 2006 12:36:14 -0000      
1.104
+++ src/networks/donkey/donkeyGlobals.ml        14 Nov 2006 18:42:59 -0000      
1.105
@@ -509,14 +509,27 @@
         server_id_requests = Fifo.create ();
         server_flags = 0;
         server_has_zlib = false;
+        server_has_newtags = false;
+        server_has_unicode = false;
+        server_has_related_search = false;
+        server_has_tag_integer = false;
+        server_has_largefiles = false;
+        server_has_udp_obfuscation = false;
+        server_has_tcp_obfuscation = false;
         server_version = "";
         server_lowid_users = None;
         server_soft_limit = None;
         server_hard_limit = None;
+        server_obfuscation_port_tcp = None;
+        server_obfuscation_port_udp = None;
+        server_udp_key = None;
+        server_udp_keyip = None;
         server_sent_shared = [];
         server_max_users = None;
         server_last_ping = 0.;
         server_ping = 0;
+        server_dynip = "";
+        server_auxportslist = "";
 
       }
       and server_impl =

Index: src/networks/donkey/donkeyImport.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyImport.ml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- src/networks/donkey/donkeyImport.ml 3 Apr 2006 20:50:09 -0000       1.9
+++ src/networks/donkey/donkeyImport.ml 14 Nov 2006 18:42:59 -0000      1.10
@@ -54,14 +54,28 @@
     
     
     let names_of_tag =
+(* eMule sourcefile opcodes.h //server.met *)
       [
-        "\001", Field_UNKNOWN "name";
-        "\015", Field_UNKNOWN "port";
-        "\016", Field_UNKNOWN "ip";
-        "\012", Field_UNKNOWN "ping";
-        "\014", Field_UNKNOWN "prof";
-        "\013", Field_UNKNOWN "history";
-        "\011", Field_UNKNOWN "description";
+        "\001", Field_UNKNOWN "name";                (* 0x01 string *)
+        "\011", Field_UNKNOWN "description";         (* 0x0B string *)
+        "\012", Field_UNKNOWN "ping";                (* 0x0C uint32 *)
+        "\013", Field_UNKNOWN "history";             (* 0x0D ST_FAIL *)
+        "\014", Field_UNKNOWN "prof";                (* 0x0E ST_PREFERENCE *)
+        "\015", Field_UNKNOWN "port";                (* 0x0F uint32 *)
+        "\016", Field_UNKNOWN "ip";                  (* 0x10 uint32 *)
+        "\133", Field_UNKNOWN "dynip";               (* 0x85 string *)
+        "\135", Field_UNKNOWN "maxusers";            (* 0x87 uint32 *)
+        "\136", Field_UNKNOWN "softfiles";           (* 0x88 uint32 *)
+        "\137", Field_UNKNOWN "hardfiles";           (* 0x89 uint32 *)
+        "\144", Field_UNKNOWN "lastping";            (* 0x90 uint32 *)
+        "\145", Field_UNKNOWN "version";             (* 0x91 string|uint32 *)
+        "\146", Field_UNKNOWN "udpflags";            (* 0x92 uint32 *)
+        "\147", Field_UNKNOWN "auxportslist";        (* 0x93 string *)
+        "\148", Field_UNKNOWN "lowidusers";          (* 0x94 uint32 *)
+        "\149", Field_UNKNOWN "udpkey";              (* 0x95 uint32 *)
+        "\150", Field_UNKNOWN "udpkeyip";            (* 0x96 uint32 *)
+        "\151", Field_UNKNOWN "tcpportobfuscation";  (* 0x97 uint16 *)
+        "\152", Field_UNKNOWN "udpportobfuscation";  (* 0x98 uint16 *)
       ]
     
     

Index: src/networks/donkey/donkeyInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -b -r1.135 -r1.136
--- src/networks/donkey/donkeyInteractive.ml    12 Nov 2006 12:44:24 -0000      
1.135
+++ src/networks/donkey/donkeyInteractive.ml    14 Nov 2006 18:42:59 -0000      
1.136
@@ -21,6 +21,8 @@
 open Printf2
 open Md4
 open Options
+open LittleEndian
+open AnyEndian
 
 open BasicSocket
 open TcpBufferedSocket
@@ -111,12 +113,40 @@
           let server = check_add_server r.S.ip r.S.port in
           List.iter (fun tag ->
               match tag with
-                { tag_name = Field_UNKNOWN "name"; tag_value = String s } ->
+              |  { tag_name = Field_UNKNOWN "name"; tag_value = String s } ->
                   server.server_name <- s;
               |  { tag_name = Field_UNKNOWN "description" ; tag_value = String 
s } ->
                   server.server_description <- s
+              |  { tag_name = Field_UNKNOWN "ping" ; tag_value = Uint64 s } ->
+                  server.server_ping <- (Int64.to_int s)
+              |  { tag_name = Field_UNKNOWN "dynip" ; tag_value = String s } ->
+                  server.server_dynip <- s
+              |  { tag_name = Field_UNKNOWN "maxusers" ; tag_value = Uint64 s 
} ->
+                  (match server.server_max_users with
+                 | None -> server.server_max_users <- Some s | _ -> ())
+              |  { tag_name = Field_UNKNOWN "softfiles" ; tag_value = Uint64 s 
} ->
+                  (match server.server_soft_limit with
+                 | None -> server.server_soft_limit <- Some s | _ -> ())
+              |  { tag_name = Field_UNKNOWN "hardfiles" ; tag_value = Uint64 s 
} ->
+                  (match server.server_hard_limit with
+                 | None -> server.server_hard_limit <- Some s | _ -> ())
+              |  { tag_name = Field_UNKNOWN "auxportslist" ; tag_value = 
String s } ->
+                  server.server_auxportslist <- s
+              |  { tag_name = Field_UNKNOWN "lowidusers" ; tag_value = Uint64 
s } ->
+                  (match server.server_lowid_users with
+                 | None -> server.server_lowid_users <- Some s | _ -> ())
+              |  { tag_name = Field_UNKNOWN "udpkey" ; tag_value = Uint64 s } 
->
+                  (match server.server_udp_key with
+                 | None -> server.server_udp_key <- Some (Int64.to_int s) | _ 
-> ())
+              |  { tag_name = Field_UNKNOWN "tcpportobfuscation" ; tag_value = 
Uint64 s } ->
+                  (match server.server_obfuscation_port_tcp with
+                 | None -> server.server_obfuscation_port_tcp <- Some 
(Int64.to_int s) | _ -> ())
+              |  { tag_name = Field_UNKNOWN "udpportobfuscation" ; tag_value = 
Uint64 s } ->
+                  (match server.server_obfuscation_port_udp with
+                 | None -> server.server_obfuscation_port_udp <- Some 
(Int64.to_int s) | _ -> ())
               | _ -> ()
-          ) r.S.tags
+          ) r.S.tags;
+         server_must_update server
         with _ -> ()
     ) ss;
     List.length ss
@@ -1086,7 +1116,20 @@
           P.server_hard_limit = (match s.server_hard_limit with None -> 0L | 
Some v -> v);
           P.server_lowid_users = (match s.server_lowid_users with None -> 0L | 
Some v -> v);
           P.server_ping = s.server_ping;
-
+          P.server_features = let temp_buf = Buffer.create 100 in
+            if s.server_has_zlib then Printf.bprintf temp_buf "zlib ";
+            if s.server_has_newtags then Printf.bprintf temp_buf "newtags ";
+            if s.server_has_unicode then Printf.bprintf temp_buf "unicode ";
+            if s.server_has_related_search then Printf.bprintf temp_buf 
"related_search ";
+            if s.server_has_tag_integer then Printf.bprintf temp_buf 
"tag_integer ";
+            if s.server_has_largefiles then Printf.bprintf temp_buf 
"largefiles ";
+            (match s.server_obfuscation_port_tcp with
+             | Some p -> Printf.bprintf temp_buf "tcp_obfuscation(%d) " p | _ 
-> ());
+            (match s.server_obfuscation_port_udp with
+             | Some p -> Printf.bprintf temp_buf "udp_obfuscation(%d) " p | _ 
-> ());
+            if s.server_auxportslist <> "" then Printf.bprintf temp_buf 
"auxportslist %s " s.server_auxportslist;
+            if s.server_dynip <> "" then Printf.bprintf temp_buf "dynip %s " 
s.server_dynip;
+            if Buffer.contents temp_buf <> "" then Some (Buffer.contents 
temp_buf) else None;
         }
       else raise Not_found
   )

Index: src/networks/donkey/donkeyProtoServer.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyProtoServer.ml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/networks/donkey/donkeyProtoServer.ml    6 Oct 2005 10:21:09 -0000       
1.21
+++ src/networks/donkey/donkeyProtoServer.ml    14 Nov 2006 18:42:59 -0000      
1.22
@@ -154,22 +154,30 @@
 module SetID = struct
     type t = {
       ip : Ip.t;
+      port : int option;
       zlib : bool;
-      port : int option
+      newtags : bool;
+      unicode : bool;
+      related_search : bool;
+      tag_integer : bool;
+      largefiles : bool;
+      udp_obfuscation : bool;
+      tcp_obfuscation : bool;
     }
 
     let parse len s =
-      let ip = get_ip s 1 in
-       let zlib = (0x01 land get_int s 5) = 0x01 in
-       let port =
-         if len <= 9 then
-           None
-         else
-           Some (get_int s 9) in
+      let flags = get_int s 5 in
        {
-         ip = ip;
-         zlib = zlib;
-         port = port;
+         ip = get_ip s 1;
+         port = if len <= 9 then None else Some (get_int s 9);
+         zlib = 0x01 land flags = 0x01;
+         newtags = 0x08 land flags = 0x08;
+         unicode = 0x10 land flags = 0x10;
+         related_search = 0x40 land flags = 0x40;
+         tag_integer = 0x80 land flags = 0x80;
+         largefiles =  0x100 land flags = 0x100;
+         udp_obfuscation = 0x200 land flags = 0x200;
+         tcp_obfuscation = 0x400 land flags = 0x400;
        }
 
     let print t =

Index: src/networks/donkey/donkeyServers.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyServers.ml,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- src/networks/donkey/donkeyServers.ml        12 Nov 2006 14:04:02 -0000      
1.62
+++ src/networks/donkey/donkeyServers.ml        14 Nov 2006 18:42:59 -0000      
1.63
@@ -279,6 +279,13 @@
   match t with
       M.SetIDReq t ->
         s.server_has_zlib <- t.M.SetID.zlib;
+        s.server_has_newtags <- t.M.SetID.newtags;
+        s.server_has_unicode <- t.M.SetID.unicode;
+        s.server_has_related_search <- t.M.SetID.related_search;
+        s.server_has_tag_integer <- t.M.SetID.tag_integer;
+        s.server_has_largefiles <- t.M.SetID.largefiles;
+        s.server_has_udp_obfuscation <- t.M.SetID.udp_obfuscation;
+        s.server_has_tcp_obfuscation <- t.M.SetID.tcp_obfuscation;
         if low_id t.M.SetID.ip && !!force_high_id then
           disconnect_server s (Closed_for_error "Low ID")
         else begin

Index: src/networks/donkey/donkeyTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyTypes.ml,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- src/networks/donkey/donkeyTypes.ml  31 Oct 2006 15:40:06 -0000      1.50
+++ src/networks/donkey/donkeyTypes.ml  14 Nov 2006 18:42:59 -0000      1.51
@@ -478,6 +478,19 @@
     mutable server_waiting_queries : file list;
     mutable server_sent_all_queries : bool;
     mutable server_has_zlib : bool;
+    mutable server_has_newtags : bool;
+    mutable server_has_unicode : bool;
+    mutable server_has_related_search : bool;
+    mutable server_has_tag_integer : bool;
+    mutable server_has_largefiles : bool;
+    mutable server_has_udp_obfuscation : bool;
+    mutable server_has_tcp_obfuscation : bool;
+    mutable server_obfuscation_port_tcp : int option;
+    mutable server_obfuscation_port_udp : int option;
+    mutable server_udp_key : int option;
+    mutable server_udp_keyip : Ip.t option;
+    mutable server_dynip : string;
+    mutable server_auxportslist : string;
 
     mutable server_flags : int;
     mutable server_version : string;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]