Subject: Re: Only Guest Login with 1.4.99
From: Sak Wathanasin (sw@nan.co.uk)
Date: Fri Oct 06 2000 - 08:41:36 EDT
> > 1. If the client starts by double-clicking on the server name in the
>> Chooser, the client's Mac talks to the server via DDP and asks, "Hey, are
>> you on IP?
>> 2. Server says "Yup."
>> 3. Client asks, "What's your IP?"
>> 4. Server looks in /etc/hosts, and if there's an entry matching what
>> appears in ATALK_NAME=<servername>, it uses that IP and sends it back.
Close, but not quite. When you click on the server in the Chooser,
the Mac sends an FPGetSrvrInfo request to the server. In the reply,
the server sends its hostname, the versions of AFP that it supports,
the UAMs that it supports, etc etc and right at the end, it sends the
addresses it can be contacted on.
You can get the details from .../etc/afpd/status.c; the routine
status_netaddress has the following comment:
/* format:
Address count (byte)
len (byte = sizeof(length + address type + address)
address type (byte, ip address = 0x01, ip + port = 0x02,
ddp address = 0x03, fqdn = 0x04)
address (up to 254 bytes, ip = 4, ip + port = 6, ddp = 4)
*/
I.e., it sends a count of the different ways it can be contacted, and
for each of them it sends the type (AppleTalk, IP addr or name) and
then the respective address or name. It's up to the client what it
does with this info: AppleShare tries the TCP connection(s?) first,
then the AppleTalk ones.
If it is given an incorrect IP addr, the attempt to talk to ASIP will
fail. netatalk obtains this addr using the std gethostbyname() call,
and this will use DNS, NIS or /etc/hosts depending on your
nsswitch.conf settings. In my case, I had an entry for my Linux box
in my /etc/hosts that mapped it to 127.0.0.1, which of course worked
just fine on the Linux box itself, but failed miserably when the Mac
tried to use it. Once I fixed this, everything worked as expected.
-- Sak Wathanasin Network Analysis Limited 178 Wainbody Ave South, Coventry CV3 6BX, UKInternet: sw@nan.co.uk Phone: (+44) 24 76 41 99 96 Mobile: (+44) 79 70 75 19 12 Fax: (+44) 24 76 69 06 90
This archive was generated by hypermail 2b28 : Wed Jan 17 2001 - 14:32:20 EST