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

Re: [coldsync-hackers] my patches for multiple users & multiple concurrent conections



On Fri, Nov 16, 2001 at 12:15:57PM -0300, Francisco Castro wrote:
>    The changes i made to coldysnc are in the attached patch. Here is the 
> summary of modifications in this patch:

	Thanks for the patch!

>        * Only tcp part of netsync is in coldsync, the udp part of the 
> protocol is handled by "pi-csd" daemon from pilot-link. Coldsync is 
> called from inetd in "nowait" mode (multiple simultaneous conections 
> allowed).

	This is a good idea, but I'm reluctant to make this change
right now, because ColdSync doesn't (yet) have a replacement for
pi-csd.

	In case you're interested in helping me write this: the
ColdSync version of pi-csd should be rather small and simple. For
version 1, it should probably simply be a matter of ripping out the
UDP parts of libpconn/PConnection_net.c into a standalone program that
can be run from inetd.

	After that, it can get a little bit fancier: what happens at
the beginning of a network Hotsync is that the client (the Palm) sends
out a UDP packet (which might conceivably be a broadcast packet) with
the host name, IP address, and network mask as given in the "Primary
PC Setup" fields in the Palm's Hotsync application. The server then
sends back a similar packet, also with hostname, IP address and
netmask.
	Now, Palm has been fairly good about not sending duplicate
information back and forth, so I suspect that the second packet is not
simply an acknowledgment. My theory is that the first packet means
"I've been told to sync with foo.ooblick.com, 192.168.100.12/24" and
the returned packet means "Yes, you should sync with foo.ooblick.com,
192.168.10.12/24." But perhaps it is also possible to say, "No, you
should sync with bar.ooblick.com 10.16.99.41/8".
	If this is the case, then the pi-csd replacement should do
something intelligent. Perhaps it can look up the host name in the
first packet and do the Right Thing. Furthermore, under Solaris, it
should be able to use /etc/nsswitch.conf, and look up the host in a
file in /etc, or DNS, or NIS, or Hesiod, or ...

>        * Use only one linux user for multiple palms, in daemon mode 
> (-md) there is no more ".palm" directory,  now this directory is created 
> with the same name as the palm user name. So if we use the "coldsync" 
> linux user, the directory structure will be /home/coldsync/<palm user 
> name 1>/, /home/coldsync/<palm user name 2>/, etc.

	It seems to me that this breaks one of the standard models. If
you have a small network, it is reasonable for all of the users to
have an account on all machines (including the sync server) and for
everyone's home directory to be accessible from any machine on the
network (including the sync server).
	In this model, I can either run ColdSync by hand and sync with
~arensb/.palm/ , or I can walk over to your office, put my Palm in
your cradle, and push the HotSync button. Either your machine handles
the sync itself, or else it forwards the connection to the main sync
server; in any case, my Palm winds up syncing with ~arensb/.palm/ .

	What you want to do can be achieved by specifying the same
Unix user ("coldsync") in /usr/local/etc/palms, and with multiple
pda{} blocks in the config file (~coldsync/.coldsyncrc by default).
These pda{} blocks can simply specify different directories for the
different users.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com                      views of ooblick.com
		   All right, who hid the keyboard?
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.