Anet is a networking library for the Ada programming language.

Features

The Anet networking library has the following features:

  • BSD socket implementation

  • High abstraction level

  • Extendable socket type hierarchy

  • Socket receiver tasks (Stream and Datagram)

  • Ada type serialisation/deserialisation over sockets

  • Supported socket families

    • IPv4 (AF_INET)

    • IPv6 (AF_INET6)

    • Packet (AF_PACKET)

    • UNIX domain (AF_UNIX)

    • Netlink (AF_NETLINK)

  • Supported socket modes

    • Stream (TCP)

    • Datagram (UDP)

    • RAW

  • Support for IPv4/IPv6 multicast

  • UDP/IPv4 packet creation and validation

  • Binding to the Linux Packet Filter (LPF) system

Licence

Copyright (C) 2011-2013 secunet Security Networks AG
Copyright (C) 2011-2013 Reto Buerki <reet@codelabs.ch>
Copyright (C) 2011-2013 Adrian-Ken Rueegsegger <ken@codelabs.ch>

Free use of this software is granted under the terms of the GNAT Modified
General Public License (GMGPL).

Download

Release version

The current release version of Anet is available at http://www.codelabs.ch/download/.

Verify a Release

To verify the integrity and authenticity of the distribution tarball, import the key http://www.codelabs.ch/keys/0x3DC359DEpub.asc and type the following command:

$ gpg --verify libanet-{version}.tar.bz2.sig

The key fingerprint of the public key (0x3DC359DE) is:

Key fingerprint = 752C 4EBC 115D 5EAD 75F7  0F34 A0AE 8AD7 3DC3 59DE

Development version

The current development version of Anet is available through its git repository:

$ git clone http://git.codelabs.ch/git/anet.git

A browsable version of the repository is also available here: http://git.codelabs.ch/?p=anet.git

Build

To compile Anet on your system, you need to have the following software installed:

If you want to run the unit tests before installation of Anet (which is recommended) you furthermore need to have the following installed:

Testing

Anet contains a unit test suite which can be run by entering the following command:

$ make tests

All tests should be marked with PASS behind the test name.

Installation

To install Anet on your system, type the following:

$ make PREFIX=/usr/local install

If no PREFIX is specified, $(HOME)/libraries is used as install destination.

Example

Server (UNIX/TCP)