OUROBOROS-TUTORIAL

Section: Ouroboros User Manual (7)
Updated: 2018-10-05
Index Return to wiki

 

NAME

ouroboros-tutorial - A tutorial introduction to managing Ouroboros

 

SYNOPSIS

irm *

 

DESCRIPTION

This tutorial explains how to start and configure the Ouroboros Inter-Process Communication subsystem.

 

STARTING AND STOPPING THE IPC RESOURCE MANAGER DAEMON

For the tutorials, it is recommended to start the IRMd (you will need root privileges) as a user process, writing output to stdout (If your system has an IRMd running as a systemd service, you will need to stop it).

$ irmd --stdout

Terminating the irmd can be done by pressing Ctrl+C if it is running in the foreground or by sending it a kill command for its process ID:

$ kill 25959

The output should be

==25959== irmd(II): Ouroboros IPC Resource Manager daemon started...
==25959== irmd(II): IRMd shutting down...
==25959== irmd(II): Ouroboros IPC Resource Manager daemon exited. Bye.

 

PINGING A SERVER APPLICATION OVER THE LOOPBACK ADAPTER

With a running irmd, let's create an IPC process. For this tutorial, we will create a unicast IPCP, attach it to the loopback interface and bootstrap it. To observe what's going on, open another terminal window.

$ irm ipcp create name lan type unicast

==23918== irmd(II): Created IPCP 23932.

An IPCP needs a point of attachment: the transmission technology it sends and receives on. Attach it to the loopback interface (See ouroboros(8)).

$ irm ipcp poa attach name lan eth dev lo

==23918== irmd(II): Attached IPCP 23932.

$ irm ipcp bootstrap name lan layer lan

==23918== irmd(II): Bootstrapped IPCP 23932.

Now that we have the IPCP bootstrapped, it can act as a local network layer that can provide full connectivity between all processes in the system. Let's test it using the oping application. First, let's choose a name for the server ("my.oping.server") and register it in the lan layer.

$ irm name create my.oping.server
$ irm name register my.oping.server layer lan

The IRMd should respond with

==23918== irmd(II): Created new name: my.oping.server.
==23918== irmd(II): Registered my.oping.server with IPCP 23932 as d0b5d7eb.

Now start a server of oping in the background (or in a different terminal) and bind the process to the name "my.oping.server" (replace the correct process id for your system).

$ oping -l &
[1] 24063
$ irm bind process 24063 name my.oping.server

With the server up and running, let's connect a client and send 3 pings:

$ oping -n my.oping.server -c 3
Pinging my.oping.server with 64 bytes of data (3 packets):

64 bytes from my.oping.server: seq=0 time=0.136 ms
64 bytes from my.oping.server: seq=1 time=97.000 µs
64 bytes from my.oping.server: seq=2 time=0.107 ms

--- my.oping.server ping statistics ---
3 packets transmitted, 3 received, 0 out-of-order, 0% packet loss, time: 3000.977 ms
rtt min/avg/max/mdev = 0.097/0.113/0.136/0.020 ms

That's all there is to it! The IRMd logs the flow allocation. Client and server run on the same machine, so the IRMd connects them directly, bypassing the lan layer. Before the flow is allocated, the two ends run the Ouroboros Authentication Protocol (OAP). With no certificates and no key exchange configured for the name, the flow is neither authenticated nor encrypted.

==23918== irmd(II): Allocating flow for 24081 to my.oping.server (uid 0).
==23918== irmd/oap(II): No authentication certificates for my.oping.server.
==23918== irmd/oap(II): Key exchange not configured for my.oping.server.
==23918== irmd/oap(II): No authentication certificates for my.oping.server.
==23918== irmd/oap(II): Key exchange not configured for my.oping.server.
==23918== irmd/oap(II): [54ae7108870b7061] OAP request processed for my.oping.server.
==23918== irmd(II): Flow 2 accepted (direct) by 24063 for my.oping.server.
==23918== irmd/oap(II): [54ae7108870b7061] OAP completed for my.oping.server.
==23918== irmd(II): Flow 2 allocated (direct) for 24081 to my.oping.server.

When the communication is done, both ends deallocate the flow.

==23918== irmd(II): Deallocating flow 2 for process 24081 (timeout: 0 s).
==23918== irmd(II): Deallocating flow 2 for process 24063 (timeout: 0 s).

 

TERMINOLOGY

Please see ouroboros-glossary(7).

 

SEE ALSO

ouroboros(8)

 

COLOPHON

This page is part of the Ouroboros project, found at http://ouroboros.rocks

These man pages are licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/


 

Index

NAME
SYNOPSIS
DESCRIPTION
STARTING AND STOPPING THE IPC RESOURCE MANAGER DAEMON
PINGING A SERVER APPLICATION OVER THE LOOPBACK ADAPTER
TERMINOLOGY
SEE ALSO
COLOPHON

This document was created by man2html, using the manual pages.
Time: 07:33:59 GMT, October 12, 2026