Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Server Location Protocol (SLP) #1370

Open
rdmark opened this issue Aug 2, 2024 · 4 comments
Open

Support for Server Location Protocol (SLP) #1370

rdmark opened this issue Aug 2, 2024 · 4 comments

Comments

@rdmark
Copy link
Member

rdmark commented Aug 2, 2024

This is about forward-porting SLP (a.k.a. srvloc a.k.a. Server Location Protocol) from 2.x to the main branch.

It should be integrated in a better way, ideally to allow Zeroconf and SLP to co-exist side by side. But if unfeasible, the build system should only allow building with one or the other enabled.

In 2.x, the current state is that you can configure and build with both service discovery protocols, but only one will actually function.

SLP was used for service discovery in OSX 10.0 and 10.1, and reportedly also supported in OS9.

@NJRoadfan
Copy link
Contributor

MacOS 9 supports SLP 2.0, which works with Netatalk 2.x out of the box. MacOS 8.5 and 8.6 shipped with SLP 1.0, which is not compatible with the later protocol. Copying the extension from an OS9 install works though. In 3.x, any addition of SLP would be to the netatalk daemon, as all the Zeroconf setup was moved there.

I don't know why SLP would conflict with Zeroconf/mDNS as they use separate ports.

@rdmark
Copy link
Member Author

rdmark commented Aug 30, 2024

I don't know why SLP would conflict with Zeroconf/mDNS as they use separate ports.

I'm certain this is simply a bug in netatalk.

@rdmark
Copy link
Member Author

rdmark commented Aug 30, 2024

One situation we have to deal with here is the fact that OpenSLP is an abandoned project (2.0.0 released in 2013). As a result, it's started getting dropped from various repositories. Notably Debian and Alpine (both in 2016). And on macOS, the homebrew package is Intel-only with no support for Apple Silicon. Just to mention a few.

Fedora still distributes a package, however.

One idea to entertain here would be to bundle OpenSLP with netatalk, like we do with WolfSSL. The license is BSD-3-clause, which is compatible with GPLv2 to my best understanding.

This is the amount of code we would be dealing with:

~/dev/openslp/openslp$ cloc .
     284 text files.
     242 unique files.                                          
      46 files ignored.

github.com/AlDanial/cloc v 1.96  T=0.26 s (944.5 files/s, 345241.2 lines/s)
------------------------------------------------------------------------------------
Language                          files          blank        comment           code
------------------------------------------------------------------------------------
C                                    68           4631          12684          23702
Text                                 15           8128              0          14671
HTML                                 43           1338            756           6464
MSBuild script                       18              0              0           5004
C/C++ Header                         50            854           3022           2208
XML                                  14              0              0           1907
yacc                                  2             70            103            593
m4                                    2             29             10            306
Bourne Shell                         13             61             58            283
make                                 10             75            284            283
lex                                   2             70            107            257
Visual Studio Solution                3              3              3            256
Bourne Again Shell                    2             29             44            164
------------------------------------------------------------------------------------
SUM:                                242          15288          17071          56098
------------------------------------------------------------------------------------

Additionally, we would have to write Meson build scripts for it. Currently Autotools.

@NJRoadfan
Copy link
Contributor

Maybe contact the author @jcalcote about doing another release? There are commits from the past few years that haven't seen release.

From the netatalk perspective, are there any users actually using clients that only support SLP? MacOS X 10.0 and 10.1 were rare out on the field, even back in the early 2000s. When 10.2 came out, pretty much everybody upgraded and didn't look back! As for MacOS 9, most folks are/were likely relying on AppleTalk for service location.

I think the main reason why SLP was removed is that the original implementation was janky and hacked into afp_config.c. It likely also needed additional work to support the new multi-interface listener option. Instead of refactoring as a module of the netatalk daemon, it was dropped due to lack of use.

@rdmark rdmark changed the title Support for SLP Support for Server Location Protocol (SLP) Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants