From: <ser...@gm...> - 2008-01-04 11:28:12
|
Hi all, I've been trying to install sipdht2 on my ubuntu but I am experiencing a problem and just think that maybe you could give me a hand with it. I have compiled and installed libxpp, libsipdht2, sofia and all required libs and also gsim-sipdht2 (finally) without errors, but when trying to execute gsim it didn't find libxpp.so (i have it in usr/local/lib). The thing is that I'm sure the path is correctly set inside configure file of gsim.... Did anyone have the same problem? DO you know how can i fix this? Thank you in advance. --=20 Sergi Puigvent=F3s |
From: <vic...@gm...> - 2008-01-04 11:32:14
|
SGkgU2VyZ2ksCgpPbiBKYW4gNCwgMjAwOCAxMjoyOCBQTSwgU2VyZ2kgUHVpZ3ZlbnTDs3MgPHNl cmdpMjMwNEBnbWFpbC5jb20+IHdyb3RlOgo+IEkgaGF2ZSBjb21waWxlZCBhbmQgaW5zdGFsbGVk IGxpYnhwcCwgbGlic2lwZGh0Miwgc29maWEgYW5kIGFsbCByZXF1aXJlZAo+IGxpYnMgYW5kIGFs c28gZ3NpbS1zaXBkaHQyIChmaW5hbGx5KSB3aXRob3V0IGVycm9ycywgYnV0IHdoZW4gdHJ5aW5n IHRvCj4gZXhlY3V0ZSBnc2ltIGl0IGRpZG4ndCBmaW5kIGxpYnhwcC5zbyAoaSBoYXZlIGl0IGlu IHVzci9sb2NhbC9saWIpLgo+IFRoZSB0aGluZyBpcyB0aGF0IEknbSBzdXJlIHRoZSBwYXRoIGlz IGNvcnJlY3RseSBzZXQgaW5zaWRlIGNvbmZpZ3VyZSBmaWxlCj4gb2YgZ3NpbS4uLi4KCk1heSB5 b3UgcGFzdGUgdGhlIGVycm9yIHRyYWNlPwoKS2luZCByZWdhcmRzLAotLSAKVmljdG9yIFBhc2N1 YWwgw4F2aWxhCg== |
From: Enrico M. <enr...@te...> - 2008-01-04 11:34:24
Attachments:
smime.p7s
|
Sergi Puigvent=F3s wrote: > I have compiled and installed libxpp, libsipdht2, sofia and all require= d > libs and also gsim-sipdht2 (finally) without errors, but when trying to= > execute gsim it didn't find libxpp.so (i have it in usr/local/lib). > The thing is that I'm sure the path is correctly set inside configure > file of gsim.... >=20 > Did anyone have the same problem? DO you know how can i fix this? Probably you can make it work just telling the linker where to find libxpp.so, as /usr/local/lib is not a standard path. There are many ways to do that; a simple one is to set the LD_LIBRARY_PATH environment variable with something like: $ export LD_LIBRARY_PATH=3D/usr/local/lib --=20 Ciao, Enrico |
From: <ser...@gm...> - 2008-01-04 11:55:57
|
Thanks to both of you! It works fine now! On Jan 4, 2008 12:36 PM, Enrico Marocco <enr...@te...> wrote: > Sergi Puigvent=F3s wrote: > > I have compiled and installed libxpp, libsipdht2, sofia and all require= d > > libs and also gsim-sipdht2 (finally) without errors, but when trying to > > execute gsim it didn't find libxpp.so (i have it in usr/local/lib). > > The thing is that I'm sure the path is correctly set inside configure > > file of gsim.... > > > > Did anyone have the same problem? DO you know how can i fix this? > > Probably you can make it work just telling the linker where to find > libxpp.so, as /usr/local/lib is not a standard path. There are many > ways to do that; a simple one is to set the LD_LIBRARY_PATH environment > variable with something like: > $ export LD_LIBRARY_PATH=3D/usr/local/lib > > -- > Ciao, > Enrico > > --=20 Sergi |
From: Adetola O. <ao...@es...> - 2008-02-11 08:58:44
|
Hello, I am getting a common error when i try to kill nodes in the simulator. Please find below the errors in 2 different scenarios died: sip:peer43@p2p died: sip:peer99@p2p [sip:peer58@p2p] I'm authoritative for neighbor: sip:peer43@p2p [sip:peer36@p2p] I'm authoritative for neighbor: sip:peer99@p2p died: sip:peer52@p2p died: sip:peer51@p2p [sip:peer21@p2p] I'm authoritative for neighbor: sip:peer52@p2p Segmentation fault what do you think can be causing this? Thanks and Regards, Tola |
From: stefano <st....@gm...> - 2008-02-11 10:37:59
|
Hi tola, we need a gdb backtrace for finding a segfault. Moreover these two conditions help us a lot: - max 5/10 peers; - repeatable procedure for causing the segfault. Ciao, Stefano 2008/2/11, Adetola Oredope <ao...@es...>: > > Hello, > > I am getting a common error when i try to kill nodes in the simulator. > Please find below the errors in 2 different scenarios > > died: sip:peer43@p2p > died: sip:peer99@p2p > [sip:peer58@p2p] I'm authoritative for neighbor: sip:peer43@p2p > [sip:peer36@p2p] I'm authoritative for neighbor: sip:peer99@p2p > > died: sip:peer52@p2p > died: sip:peer51@p2p > [sip:peer21@p2p] I'm authoritative for neighbor: sip:peer52@p2p > Segmentation fault > > what do you think can be causing this? > > Thanks and Regards, > > Tola > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Sipdht-devel mailing list > Sip...@li... > https://lists.sourceforge.net/lists/listinfo/sipdht-devel > |
From: Oredope, A. <ao...@es...> - 2008-02-12 22:15:11
|
Hello All, Thanks a lot for all your help so far, I really do appreciate it. I am actually trying to run some experiments to measure the amount of packets that are exchanged during churn using sipdht. I am having problems achieving this using the simulator; because I don't think I can kill and add peers at the same time. The simulator actually breaks when trying to do this. What am I doing wrong? Also as an alternative, I am thinking of using real sipdht peers, i.e. running like 10 instances of a sipdht peers on a single node and then maybe across 10 to 20 nodes. What do you think about this? Also if I follow this approach is there a way a seeing an overall map of the overlay? Is there a way of getting exact overall measurements of time, packets exchanged and active sessions? I also thinking doing this with the next weeks, do you think this is a feasible time or do I need leave out more time. I look forward from hearing from you all and all suggestions will be highly appreciated. Thanks a lot in advance. Regards, Tola |
From: Oredope, A. <ao...@es...> - 2008-02-15 14:39:18
|
Hi, I sent an email earlier on (please see below) Please is there anyone out there that can help? I look forward to hearing from you. Regards, Tola ________________________________ From: sip...@li... [mailto:sip...@li...] On Behalf Of Oredope, Adetola Sent: 12 February 2008 22:14 To: sip...@li... Subject: [Sipdht-devel] SIPDHT Experiments Hello All, Thanks a lot for all your help so far, I really do appreciate it. I am actually trying to run some experiments to measure the amount of packets that are exchanged during churn using sipdht. I am having problems achieving this using the simulator; because I don't think I can kill and add peers at the same time. The simulator actually breaks when trying to do this. What am I doing wrong? Also as an alternative, I am thinking of using real sipdht peers, i.e. running like 10 instances of a sipdht peers on a single node and then maybe across 10 to 20 nodes. What do you think about this? Also if I follow this approach is there a way a seeing an overall map of the overlay? Is there a way of getting exact overall measurements of time, packets exchanged and active sessions? I also thinking doing this with the next weeks, do you think this is a feasible time or do I need leave out more time. I look forward from hearing from you all and all suggestions will be highly appreciated. Thanks a lot in advance. Regards, Tola |
From: Enrico M. <enr...@te...> - 2008-02-18 07:55:24
Attachments:
smime.p7s
|
Oredope, Adetola wrote: > I am actually trying to run some experiments to measure the amount of > packets that are exchanged during churn using sipdht. > > I am having problems achieving this using the simulator; because I don’t > think I can kill and add peers at the same time. The simulator actually > breaks when trying to do this. What am I doing wrong? Probably nothing, the code is still full of bugs, plus the simulator tends to hang when running many nodes because of too many refresh operations happening in the GUI. > Also as an alternative, I am thinking of using real sipdht peers, i.e. > running like 10 instances of a sipdht peers on a single node and then > maybe across 10 to 20 nodes. That may be a viable option. I'd suggest to use csipdht2 which is the lightest tool in the suite. If you are interested in churn handling only, I'd also suggest to try and disable outbound and gruu (don't remember the command line option), which haven't been tested extensively. > What do you think about this? Also if I follow this approach is there a > way a seeing an overall map of the overlay? Is there a way of getting > exact overall measurements of time, packets exchanged and active sessions? No, running the peers as standalone processes there's no way to have an overall picture of the CAN geometry. > I also thinking doing this with the next weeks, do you think this is a > feasible time or do I need leave out more time. I really cannot answer this question. What I just can say is that in such a distributed and stressed scenario you'll certainly find many bugs. We'll help to fix them, but I really can say anything about timings. > I look forward from hearing from you all and all suggestions will be > highly appreciated. I'm sorry for answering this late: it's been a busy busy week. -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-19 10:07:07
|
Hello Enrinco, Thanks a lot for your help. We are considering going back to the first version of SIPDHT (based on chord) but I will keep you informed on how it goes. Kind Regards, Tola -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 18 February 2008 07:58 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments Oredope, Adetola wrote: > I am actually trying to run some experiments to measure the amount of > packets that are exchanged during churn using sipdht. > > I am having problems achieving this using the simulator; because I don't > think I can kill and add peers at the same time. The simulator actually > breaks when trying to do this. What am I doing wrong? Probably nothing, the code is still full of bugs, plus the simulator tends to hang when running many nodes because of too many refresh operations happening in the GUI. > Also as an alternative, I am thinking of using real sipdht peers, i.e. > running like 10 instances of a sipdht peers on a single node and then > maybe across 10 to 20 nodes. That may be a viable option. I'd suggest to use csipdht2 which is the lightest tool in the suite. If you are interested in churn handling only, I'd also suggest to try and disable outbound and gruu (don't remember the command line option), which haven't been tested extensively. > What do you think about this? Also if I follow this approach is there a > way a seeing an overall map of the overlay? Is there a way of getting > exact overall measurements of time, packets exchanged and active sessions? No, running the peers as standalone processes there's no way to have an overall picture of the CAN geometry. > I also thinking doing this with the next weeks, do you think this is a > feasible time or do I need leave out more time. I really cannot answer this question. What I just can say is that in such a distributed and stressed scenario you'll certainly find many bugs. We'll help to fix them, but I really can say anything about timings. > I look forward from hearing from you all and all suggestions will be > highly appreciated. I'm sorry for answering this late: it's been a busy busy week. -- Ciao, Enrico |
From: Adetola O. <ao...@es...> - 2008-02-19 18:19:42
|
Hello All, I am very aware that you no longer support the first version of sipdht.. But, is it possible that anyone may know how increase the maximum number of tcp connections in the sipdht version 1, cos at the moment it is limiting me to just 20 connection after which there is a callback failure. Thanks and Regards, Tola On Tue, 2008-02-19 at 10:06 +0000, Oredope, Adetola wrote: > Hello Enrinco, > > Thanks a lot for your help. > We are considering going back to the first version of SIPDHT (based on > chord) but I will keep you informed on how it goes. > > Kind Regards, > > Tola > > -----Original Message----- > From: Enrico Marocco [mailto:enr...@te...] > Sent: 18 February 2008 07:58 > To: Oredope, Adetola > Cc: sip...@li... > Subject: Re: [Sipdht-devel] SIPDHT Experiments > > Oredope, Adetola wrote: > > I am actually trying to run some experiments to measure the amount of > > packets that are exchanged during churn using sipdht. > > > > I am having problems achieving this using the simulator; because I > don't > > think I can kill and add peers at the same time. The simulator > actually > > breaks when trying to do this. What am I doing wrong? > > Probably nothing, the code is still full of bugs, plus the simulator > tends to hang when running many nodes because of too many refresh > operations happening in the GUI. > > > Also as an alternative, I am thinking of using real sipdht peers, i.e. > > running like 10 instances of a sipdht peers on a single node and then > > maybe across 10 to 20 nodes. > > That may be a viable option. I'd suggest to use csipdht2 which is the > lightest tool in the suite. If you are interested in churn handling > only, I'd also suggest to try and disable outbound and gruu (don't > remember the command line option), which haven't been tested > extensively. > > > What do you think about this? Also if I follow this approach is there > a > > way a seeing an overall map of the overlay? Is there a way of getting > > exact overall measurements of time, packets exchanged and active > sessions? > > No, running the peers as standalone processes there's no way to have an > overall picture of the CAN geometry. > > > I also thinking doing this with the next weeks, do you think this is a > > feasible time or do I need leave out more time. > > I really cannot answer this question. What I just can say is that in > such a distributed and stressed scenario you'll certainly find many > bugs. We'll help to fix them, but I really can say anything about > timings. > > > I look forward from hearing from you all and all suggestions will be > > highly appreciated. > > I'm sorry for answering this late: it's been a busy busy week. > |
From: Enrico M. <enr...@te...> - 2008-02-20 07:55:51
Attachments:
smime.p7s
|
Adetola Oredope wrote: > I am very aware that you no longer support the first version of sipdht.. > But, is it possible that anyone may know how increase the maximum number > of tcp connections in the sipdht version 1, cos at the moment it is > limiting me to just 20 connection after which there is a callback > failure. As far as I remember we didn't impose a limit to the number of tcp connections. I suspect it is something related to sofia-sip, but probably some debug information could help us to better understand what's going on. -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-20 10:50:32
|
Hello Enrico, Thanks a lot for your quick response. I have a script that starts 25 nodes but there is always a callback failure from the 20th node onwards I was initially thinking maybe the amount of tcp connections are limited to 20, but I will appreciate you advise on this. Please find attached the log files and the prompt output. Please also fine below a section of the code I use in generating the nodes I look forward to hear from you Regards, Tola #Define Paramenters a=127.0.0.1 c=127.0.0. x=1 p=5060 s=1s t=60 n=1 tn=10 for ((x=1; x<=25; x++ )); do if [ $x -eq 1 ]; then sipdht -a $a -p $p -s$t & sleep 3s else z=`expr $x - 1` rm -f /tmp/sipdhtlog/$x.log; SIPDHT_DEBUG=9 TPORT_DUMP=/tmp/sipdhtlog/$x.log sipdht -a $c$x -p $p -s$t sip:$c$z:$p & sleep $s echo "node $x has Joined" fi done -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 20 February 2008 07:59 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments Adetola Oredope wrote: > I am very aware that you no longer support the first version of sipdht.. > But, is it possible that anyone may know how increase the maximum number > of tcp connections in the sipdht version 1, cos at the moment it is > limiting me to just 20 connection after which there is a callback > failure. As far as I remember we didn't impose a limit to the number of tcp connections. I suspect it is something related to sofia-sip, but probably some debug information could help us to better understand what's going on. -- Ciao, Enrico |
From: Enrico M. <enr...@te...> - 2008-02-20 13:13:18
Attachments:
smime.p7s
|
Oredope, Adetola wrote: > Please attached the logs Could you also tell us where to look for the error? -- Ciao, Enrico |
From: Adetola O. <ao...@es...> - 2008-02-20 13:31:11
|
According to my last email, the errors starts to occur from the creation of the 20th node its a callback failure error Regards, Tola On Wed, 2008-02-20 at 14:16 +0100, Enrico Marocco wrote: > Oredope, Adetola wrote: > > Please attached the logs > > Could you also tell us where to look for the error? > |
From: Enrico M. <enr...@te...> - 2008-02-20 13:36:54
Attachments:
smime.p7s
|
Adetola Oredope wrote: > According to my last email, > > the errors starts to occur from the creation of the 20th node > its a callback failure error Yes, I got it, I'm just having an hard time skimming half a meg of compressed logs. Can you please indicate in which file and at which line I can see the error? -- Ciao, Enrico |
From: Adetola O. <ao...@es...> - 2008-02-20 13:52:43
|
In the output.log file, the last successful connection was indicated in Line 2420. I think the error probably occured after this line because sipdht was unable to invoke a callback. i.e node 20, 21, 22, 23, 24, and 25 refused to join the existing dht network The sip log files for the corresponding nodes are 20.log - 25. log Kind Regards, Tola On Wed, 2008-02-20 at 14:39 +0100, Enrico Marocco wrote: > Adetola Oredope wrote: > > According to my last email, > > > > the errors starts to occur from the creation of the 20th node > > its a callback failure error > > Yes, I got it, I'm just having an hard time skimming half a meg of > compressed logs. Can you please indicate in which file and at which > line I can see the error? > |
From: Enrico M. <enr...@te...> - 2008-02-20 14:15:24
Attachments:
smime.p7s
|
Adetola Oredope wrote: > In the output.log file, the last successful connection was indicated in > Line 2420. I think the error probably occured after this line because > sipdht was unable to invoke a callback. i.e node 20, 21, 22, 23, 24, and > 25 refused to join the existing dht network > The sip log files for the corresponding nodes are 20.log - 25. log It seems like node 21 sends its REGISTER to node 20 when node 20 still has not joined the overlay (it keeps getting redirected, probably because the overlay isn't consistent yet). This is probably due to the fact that the interval between successive joins is much smaller than the stabilization interval. I'd suggest to try and use the same value for both intervals, just to be sure it is not a problem related to tcp. -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-20 15:22:30
|
Thanks a lot Enrico, I have tried it as suggested but it does not still seem to fin node 19, please look below Trying with node sip:127.0.0.19:5060... Trying with node sip:80@127.0.0.1:5060;user=node... Trying with node sip:88@127.0.0.9:5060;user=node... Trying with node sip:b0@127.0.0.10:5060;user=node... Trying with node sip:b1@127.0.0.11:5060;user=node... Trying with node sip:b2@127.0.0.12:5060;user=node... callback failure invoked: 0 Regards, Tola -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 20 February 2008 14:18 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments -- with attachment Adetola Oredope wrote: > In the output.log file, the last successful connection was indicated in > Line 2420. I think the error probably occured after this line because > sipdht was unable to invoke a callback. i.e node 20, 21, 22, 23, 24, and > 25 refused to join the existing dht network > The sip log files for the corresponding nodes are 20.log - 25. log It seems like node 21 sends its REGISTER to node 20 when node 20 still has not joined the overlay (it keeps getting redirected, probably because the overlay isn't consistent yet). This is probably due to the fact that the interval between successive joins is much smaller than the stabilization interval. I'd suggest to try and use the same value for both intervals, just to be sure it is not a problem related to tcp. -- Ciao, Enrico |
From: Enrico M. <enr...@te...> - 2008-02-20 15:55:45
Attachments:
smime.p7s
|
Oredope, Adetola wrote: > I have tried it as suggested but it does not still seem to fin node 19, > please look below > > Trying with node sip:127.0.0.19:5060... > Trying with node sip:80@127.0.0.1:5060;user=node... > Trying with node sip:88@127.0.0.9:5060;user=node... > Trying with node sip:b0@127.0.0.10:5060;user=node... > Trying with node sip:b1@127.0.0.11:5060;user=node... > Trying with node sip:b2@127.0.0.12:5060;user=node... > callback failure invoked: 0 After a second look, I noticed that node 20 has the same id as node 11 ("b1" for both, in the user part of the SIP URI). That is due to the weakness of the hash function and of course makes the join fail. I've made available the latest version of libsipdht and sipdht-tools where the support for SHA-1 was certainly implemented; unfortunately I can't remember if it was enabled by default or if some tricks were needed. -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-20 17:33:51
|
Hello Enrico, Thanks a lot for your help, it is highly appreciated. I have tried compiling the new version for sipdht tools and there seems to be an error with an undefined parameter (sipdht_peer_set_routing). Please see error below [root@psr106 sipdht-tools-0.4.1]# make make all-recursive make[1]: Entering directory `/root/sipdht-tools-0.4.1' Making all in src make[2]: Entering directory `/root/sipdht-tools-0.4.1/src' gcc -g -O2 -o sipdht sipdht.o -lsipdht sipdht.o: In function `main': /root/sipdht-tools-0.4.1/src/sipdht.c:286: undefined reference to `sipdht_peer_set_routing' collect2: ld returned 1 exit status make[2]: *** [sipdht] Error 1 make[2]: Leaving directory `/root/sipdht-tools-0.4.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/sipdht-tools-0.4.1' make: *** [all] Error 2 Regards, Tola -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 20 February 2008 15:58 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments -- with attachment Oredope, Adetola wrote: > I have tried it as suggested but it does not still seem to fin node 19, > please look below > > Trying with node sip:127.0.0.19:5060... > Trying with node sip:80@127.0.0.1:5060;user=node... > Trying with node sip:88@127.0.0.9:5060;user=node... > Trying with node sip:b0@127.0.0.10:5060;user=node... > Trying with node sip:b1@127.0.0.11:5060;user=node... > Trying with node sip:b2@127.0.0.12:5060;user=node... > callback failure invoked: 0 After a second look, I noticed that node 20 has the same id as node 11 ("b1" for both, in the user part of the SIP URI). That is due to the weakness of the hash function and of course makes the join fail. I've made available the latest version of libsipdht and sipdht-tools where the support for SHA-1 was certainly implemented; unfortunately I can't remember if it was enabled by default or if some tricks were needed. -- Ciao, Enrico |
From: Enrico M. <enr...@te...> - 2008-02-21 07:38:42
Attachments:
smime.p7s
|
Oredope, Adetola wrote: > Thanks a lot for your help, it is highly appreciated. > I have tried compiling the new version for sipdht tools and there seems > to be an error with an undefined parameter (sipdht_peer_set_routing). > Please see error below Which version of libsipdht are you using? -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-21 09:47:42
|
Hello Enrico, I am using sipdht-tools-0.4.1 and libsipdht-0.7.0. I have actually just done a clean install using the .deb packages on an Ubuntu machine but I'm still encountering the same errors. What are your opinions on this? Also can please point me to the files responsible for generating the nodes and creating the hash? King Regards, Tola -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 21 February 2008 07:41 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments -- with attachment Oredope, Adetola wrote: > Thanks a lot for your help, it is highly appreciated. > I have tried compiling the new version for sipdht tools and there seems > to be an error with an undefined parameter (sipdht_peer_set_routing). > Please see error below Which version of libsipdht are you using? -- Ciao, Enrico |
From: Enrico M. <enr...@te...> - 2008-02-21 10:31:10
Attachments:
smime.p7s
|
Oredope, Adetola wrote: > I am using sipdht-tools-0.4.1 and libsipdht-0.7.0. > I have actually just done a clean install using the .deb packages on an > Ubuntu machine but I'm still encountering the same errors. > What are your opinions on this? > Also can please point me to the files responsible for generating the > nodes and creating the hash? The hash function used by sipdht is implemented in the C function "hash_function" in sipdht.c (sipdht-tools), and then set to the peer through the "sipdht_peer_set_hash_cb" function. How it works is quite well documented in the "peer" module documentation, available at http://sipdht.sourceforge.net/api/index.html. I'd suggest to implement a better hash function (the current one just sums the char values and then casts the result in 8 bits) and then replace the current one with it. -- Ciao, Enrico |
From: Oredope, A. <ao...@es...> - 2008-02-22 11:09:48
|
Hello Enrico, Thanks a lot for you help on this. I have been able to play around with the hash function in which I discovered it parameters had char properties which is quite small, thus causing repetition. I have change this to long and also used the system time as a seed to generate random numbers. Although there some errors while compling (of course!), it still worked. Please see below the revised code. static void hash_function(url_t *url, unsigned long *buf, void *user_data) { unsigned long ans; const unsigned long *ptr; unsigned long tmp_yixuan; srand(time()); for (ans = 0, ptr = url->url_host; *ptr != '\0'; ptr++) tmp_yixuan=1+(100000.0*rand()/(RAND_MAX+1.0)); ans ^= (tmp_yixuan + *ptr); if (url->url_user) for (ptr = url->url_user; *ptr != '\0'; ptr++) tmp_yixuan=1+(100000.0*rand()/(RAND_MAX+1.0)); ans ^= (tmp_yixuan + *ptr); if (url->url_port) for (ptr = url->url_port; *ptr != '\0'; ptr++) tmp_yixuan=1+(100000.0*rand()/(RAND_MAX+1.0)); ans ^= (tmp_yixuan + *ptr); buf[0] = ans; } At the moment this is working but there are like one duplicate out of every 30, which is fair enough for now. I have already now simulate over 200 nodes Do you think this changes may affect anytime else in the full architecture? Or is there anything else I am missing or should what out for? Thanks a lot again for you help.. Kind Regards Tola -----Original Message----- From: Enrico Marocco [mailto:enr...@te...] Sent: 21 February 2008 10:34 To: Oredope, Adetola Cc: sip...@li... Subject: Re: [Sipdht-devel] SIPDHT Experiments -- with attachment Oredope, Adetola wrote: > I am using sipdht-tools-0.4.1 and libsipdht-0.7.0. > I have actually just done a clean install using the .deb packages on an > Ubuntu machine but I'm still encountering the same errors. > What are your opinions on this? > Also can please point me to the files responsible for generating the > nodes and creating the hash? The hash function used by sipdht is implemented in the C function "hash_function" in sipdht.c (sipdht-tools), and then set to the peer through the "sipdht_peer_set_hash_cb" function. How it works is quite well documented in the "peer" module documentation, available at http://sipdht.sourceforge.net/api/index.html. I'd suggest to implement a better hash function (the current one just sums the char values and then casts the result in 8 bits) and then replace the current one with it. -- Ciao, Enrico |