ip45d – Developer Notes

The ip45 user space host implementation

The source is available in the form of package or in the SVN repository.

Running the program

  • On the command line execute the ip45d:

    # ./ip45d -v 

It sets up virtual tun/tup interface and configure the address on it. On the windows platform ip45d.exe must be used instead.

    # ip45d.exe -v 

On the windows platform IPv6 address ::1:0:0/8 must be configured on the tap interface.

Building and Installation

  • For Unix-Like systems (Linux, OSX):

    # make

    Creates ip45d executable that can be run on system with root privileges.

  • To install binary into system use:

    # make install 
  • To build rpm packages:

    # rpmbuild -ba ip45d.spec
  • For Windows system (cross build on Unix):

    # make win 

    Builds binary package and creates ip45d.exe ip45serv.exe and ip45setup.exe

  • For Windows system (on Windows with mingw installed):

    # make.bat

    Builds ip45d.exe and ip45serv.exe

Structure of Files

The code is divided into several files:

  • ip45d.c – Entry routine, help screen (calls functions in ip45dcommon.c, ip45dposix.c, ip45d_win.c).

  • ip45d.h – Platform depended includes.

  • ip45d_common.c – Code shared by all platforms (conversion if IPv6 packet to Ip45 packet and back)

  • ip45d_posix.c – Code related to posix platforms (Linux, OSX), implemented as single thread application. For OSX it users platform specific code to use utun device.

  • ip45d_win.c – Code related to Windows platform, implemented as two thread application using non blocking system operations.

  • session_table.c – Implementation of session table. Implemented as the simple linked list.

  • inet_ntop45.c – Conversion to human readable IP45 address and back.

  • ip45serv.c – System service fog Windows (internally calls ip45d.exe). Use ip45serv.exe to get more help.

  • compatwin.c – Implementation inetpton and inet_ntop function for Windows platform.

  • ip45d-init-d – The starting script for Linux. The file should be copied to /etc/init.d/ip45d.

  • ip45d.spec – Specfile for creating rpm package. The rpm package can be installed later into Linux-based systems.

  • ip45.nsi – Installer script for NSIS. Creates installation package ip45seup.exe that can be used for installation of ip45 on Windows platforms.

  • *.h – The header files that are not shipped by default on all platforms.