• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Netatalk 2.3.0 available

Mk.558

Well-known member
Yeah IDK. I don't know how to prove it besides going up the version chains from S3.3/F5.4 all the way up to Mac OS 8/8.1 which is when I believe they introduced AFP 2.2.


This document describes extensions to version 2.0 of the AppleTalk Filing Protocol (AFP), the version currently used in AppleShare 2.0.1 and
documented in Inside AppleTalk, that support extra features in AFP servers and new calls that have been added to the hierarchical file system
(HFS) for system software version 7.0. These protocol extensions are called AFP 2.1. The AFPVersion string for AFP 2.1 is AFPVersion 2.1.

I don't know where to look for that. I poked in the System file of 7.1 Pro, inside the atalk resource, and in a ASFS 1.1 installer disk (which has the AppleTalk extension separate from the System stack), and couldn't find anything about AFPVersion. It's almost like the more I look the more confused I get.
 

NJRoadfan

Well-known member
The AFP server in netatalk logs what protocol revision a client is connecting with. You can also sniff the packets "over the wire" to see what it is using.
 

Mk.558

Well-known member
Right on...hmmm that sounds like a long weekend project...I can't boot AppleShare WS 1.1 but I'm pretty sure I can install it on a System 6 folder.
 

slipperygrey

Well-known member
I don't know where to look for that. I poked in the System file of 7.1 Pro, inside the atalk resource, and in a ASFS 1.1 installer disk (which has the AppleTalk extension separate from the System stack), and couldn't find anything about AFPVersion. It's almost like the more I look the more confused I get.
I would bet AFPVersion is compiled into the binary machine code, rather than stored in the resource fork...

As NJRoadfan says, when you authenticate a client with Netatalk you will get messages like this in the log (note level):

Code:
afpd[97] {auth.c:228} (note:AFPDaemon): Login by atalk (AFP2.2)

The above is from an OS9 client.

BTW, a quick detour into the code: this is how the supported AFP protocol versions are defined in auth.h in Netatalk 2.x (note the absence of AFP 3.4, which was introduced with Netatalk 3.x).

C:
static const struct afp_versions  afp_versions[] = {
#ifndef NO_DDP
    { "AFPVersion 1.1", 11 },
    { "AFPVersion 2.0", 20 },
    { "AFPVersion 2.1", 21 },
#endif /* ! NO_DDP */
    { "AFP2.2", 22 },
    { "AFPX03", 30 },
    { "AFP3.1", 31 },
    { "AFP3.2", 32 },
    { "AFP3.3", 33 }
};

auth.c starts out by hard coding "int afp_version = 11;" as a fallback and then proceeds to detect the AFP version in get_version() by comparing the size of a particular buffer it gets from the AFP client, and reassigns afp_version. There are branches sprinkled across the codebase that then checks the value of afp_version to accommodate the differences in the AFP specs.
 

Mk.558

Well-known member
Good stuff. I added the log option to afpd.conf (1) and then figured I should parse the log with grep, like so:

Code:
grep "Login by slicked" /var/log/afpd.log

...so whenever I do a new login it'll pop right up with what I need. If I was smart I would pipe tail into grep to have it automatically update...



(1) this is on Ubuntu 10.04 LTS inside a VM with Netatalk 2.1.6, as using Netatalk 2.3.2 would require me to reboot into Linux.
 

Mk.558

Well-known member
Some progress today.

1st entry top to bottom: OS X 10.4
2nd: System 6 with default install of WS 2.0
3rd: System 6 with AppleShare WS 1.1
4th: System 6 with AppleShare WS 3.5

Untitled.png

I'll work on System 7.0.1, 7.1 with OT 1.3/ASC 3.7.4, 7.5, 7.6 and 8.0 soonish. Based on these results so far it's safe to predict that it's a function of the AppleShare client version/server as well, not the underlying operating system underneath. Yet.
 

pl212

Active member
That bit about “AFP 1.0 was developed with Centram” is intriguing… they were the original developers of TOPS, right?
 

Mk.558

Well-known member
Nice find there NJRoadfan. The other Developer Preview version I got doesn't have those technical notes. Wonder if we could somehow find the technical notes for AFP 2.0 and AFP 2.1.

As for AFP 2.2, working on it at the moment from 7.0.1 up to 8.1, pretty sure 8.0 or 8.1 will be the one to include AFP 2.2 by default because 7.6.1 still uses AFP 2.1. If you use OT 1.3 (which requires ASC 3.7.4 +) then you get AFP 2.2.
 

NJRoadfan

Well-known member
Inside AppleTalk is the definitive source for AFP 2.0 documentation. Apple still has their AFP developer info online which covers the additions in later versions: https://developer.apple.com/library...VersionDifferences/AFPVersionDifferences.html

More AFP 2.1 and 2.2 specific docs can be found here: https://archive.org/details/manualzilla-id-5724064

One interesting note in the docs is that AFP 2.1 can be used over TCP/IP since it has the commands needed to properly support it. Apple also states that earlier versions can possibly be used over TCP/IP, but the FPGetSrvrInfo command isn't available to get the server's IP address. This theory was put to use with the AFPBridge software on the Apple IIgs. I'm pretty sure the GS/OS client only supports AFP 2.0, but it has no problem connecting to netatalk via TCP/IP.
 
Last edited:

finkmac

NORTHERN TELECOM
is there an easy way to change the icon served up for netatalk shares? the default seems to be a MacOS 8 icon, which looks silly on earlier OS versions
 

slipperygrey

Well-known member
is there an easy way to change the icon served up for netatalk shares? the default seems to be a MacOS 8 icon, which looks silly on earlier OS versions
I think the default icon originates with the AppleShare Client itself, not Netatalk.

Netatalk 2.x has an afpd.conf option "-icon" (inversed as "-noicon") that gives you a custom Netatalk icon, namely the Netatalk mascot on a tray. :)
 
Top