Skip to content
Andy Lemin edited this page Aug 16, 2025 · 8 revisions

(WIP - Links are currently broken during migration into wiki)

Netatalk Project Developer Docs

This wiki branch contains documentation and knowledge about the Netatalk project for developers - a Free and Open Source implementation of the Apple Filing Protocol (AFP).

These developer docs are intended to supplement the main user docs (https://netatalk.io) to simplify and encourage contributions to Netatalk.

These developer docs include many Mermaid diagrams to make understanding easier and ease the learning curve (hopefully).

What is Netatalk?

Netatalk is a robust, lightweight and fast AFP 3.4 server implementation that enables Unix/Linux systems to act as native file servers for Mac clients, providing seamless integration with macOS features like Time Machine, Spotlight, and Bonjour service discovery.

Developer Docs Structure

Developer-Docs
├── index.md                    # Navigation index and table of contents
├── README.md                   # This overview document  
├── api/                        # API documentation
│   └── libatalk.md             # Core library functions and interfaces
├── architecture/               # System architecture documentation
│   ├── overview.md             # High-level system architecture
│   ├── protocol-stack.md       # Network protocol implementation
│   └── data-flow.md            # Component interactions and data flow
├── components/                 # Individual component documentation
│   ├── afpd.md                 # AFP daemon implementation
│   ├── netatalk.md             # Master daemon and service coordination
│   ├── cnid-system.md          # CNID database system
│   ├── authentication.md       # User Authentication Modules (UAM)
│   └── appletalk.md            # AppleTalk protocol support
├── configuration/              # Configuration reference guides
│   ├── setup.md                # Initial setup and configuration
│   └── volumes.md              # Volume configuration reference
├── deployment/                 # Deployment and platform guides
│   └── platforms.md            # Platform-specific deployment
├── development/                # Developer resources and guidelines
│   └── guidelines.md           # Coding standards and development practices
├── performance/                # Performance optimization guides
│   └── high-speed-networking.md # High-performance network tuning
└── troubleshooting/            # Diagnostic and debugging guides
    └── common-issues.md        # Frequently encountered problems and solutions

Source Code Organization

The main Netatalk implementation resides in these key directories:

  • libatalk/ - Core AFP library implementation and utility functions
  • etc/afpd/ - AFP daemon (afpd) source code and protocol handlers
  • etc/netatalk/ - Master daemon and service management
  • etc/cnid_dbd/ - CNID database daemon for file ID management
  • etc/uams/ - User Authentication Modules (UAM) implementations
  • include/atalk/ - Public header files and API definitions
  • meson.build - Build system configuration and dependency management
  • test/ - Test suite and benchmarking utilities
  • contrib/ - Additional scripts and integration tools

Key Features

  • AFP 3.4 Protocol Support - Full implementation with modern macOS compatibility Implementation: etc/afpd/afp_*.c, libatalk/dsi/, include/atalk/afp.h

  • AppleTalk Legacy Support - Maintains compatibility with classic Mac systems Implementation: libatalk/atp/, libatalk/asp/, include/atalk/atp.h, include/atalk/asp.h

  • Spotlight Integration - Search functionality via GNOME Tracker/TinySPARQL Implementation: etc/afpd/spotlight*.c, libatalk/util/server_ipc.c

  • Time Machine Support - Native macOS backup destination Implementation: etc/afpd/volume.c, etc/afpd/enumerate.c, etc/afpd/afp_options.c

  • Advanced Authentication - Multiple UAM modules including DHX, DHX2, PAM, Kerberos Implementation: etc/uams/, etc/afpd/auth.c, include/atalk/uam.h

  • High Performance - Optimized for large file transfers and concurrent connections Implementation: libatalk/dsi/dsi_tcp.c, etc/afpd/fork.c, etc/afpd/file.c

  • Cross-Platform - Supports Linux, BSD variants, macOS, and Solaris Implementation: meson.build, include/atalk/compat.h, libatalk/compat/

Quick Start

  1. Installation: See deployment/platforms.md for platform-specific instructions Build System: meson.build, meson_options.txt, contrib/shell_utils/

  2. Configuration: Review configuration/setup.md for initial setup Config Parsing: libatalk/iniparser/, etc/afpd/afp_config.c, etc/netatalk/netatalk.c

  3. Development: Check development/guidelines.md for contribution guidelines Development Tools: test/, .github/, include/atalk/standards.h

Project Information

  • Version: 4.3.0dev (active development) Version Definition: meson.build, include/atalk/version.h

  • License: GNU General Public License v2 License Files: COPYING, COPYRIGHT, header comments in source files

  • Language: C11 with GCC extensions Standards Compliance: meson.build (c_std setting)

  • Build System: Meson (migrated from Autotools) Build Configuration: meson.build, meson_options.txt, subprojects/

  • Repository: https://github.com/Netatalk/netatalk

  • Website: https://netatalk.io

  • Documentation: https://netatalk.io/manual/en/ Doc Sources: doc/manpages/, doc/developer/, README.md

Community

Clone this wiki locally